Filesystem driver documentation

Hi,

I’d like to write a filesystem driver. Something like fs-dos.so
Anyone has documentation on how to achieve this? Any example ?

Regards,
Nicolas

I would first check out Robert Krten’s book: The QNX Cookbook: Recipes for Programmers.

Much of it is online here
qnx.com/developers/docs/qnxc … about.html

Several chapters on writing filesystems. The RAM filesystem is probably the best bet. There is code examples too.

Tim

Hi Tim,

Thanks for the link. This is very instructive. However, there’s not enough information to create de file-system driver like fs-dos.so.

Nicolas

Hi Nicolas,

If your QNX license/support agreement is up to date, then you could join the filesystem group on Foundry27 and get access to the source code for all the filesystem drivers:

community.qnx.com/sf/projects/filesystems/

Tim

Hi Tim,

I was waiting for the renew of my support plan before answering.
I already joined several Foundry27 project but I have found no way to join Filesystem project. There is no “Join This Project” button.
How can I join the Filesystems project ?

Nicolas

Nico,

Did you log in with your QNX credentials?

See the screen shot with the join button (left side under Team Forge) when I am logged in with my QNX credentials.

Tim

Tim,

I did. Please, see the attached picture.

Just realised I already joined the project years ago. :unamused:
But no source code there.

Nicolas

[attachment=0]Capture 2019-12-10 165906.jpg[/attachment]

Nico,

You may have to ask for it in the Forum. The sourceforge link was broken for me but I also didn’t join the project.

Tim

Hi Tim,

There is a topic on the Forum posted on 04/09/2010 which title is " QNX Source Access Policy Update".
It’s content is :

The link displays : “Please contact your QNX Sales or Support representative if you require access to QNX source code.”

I’ll try a request anyway. But I know the end of the story…

Nicolas

Hi Nicolas,

In this case, you should frame your request for a specific driver. Say NFS which isn’t QNX but is an open standard that just has a QNX wrapper around it for interfacing with the QNX O/S. That’s really just the part you are interested in (the wrapper).

You might have better luck with that since you aren’t asking for QNX specific secrets (ie their filesystem). If it doesn’t work out, then your next bet is to comb the torrent sites for the QNX source code that was released a few years ago when they made everything open source (I don’t think it will be hard to find).

Tim

Hi Tim,

I’m waiting for my sales representative answer (who’s waiting for QNX answer).

I’m not used to torrents. Any pointer for a QNX one ?

Nicolas

Hi Nicolas,

While looking for a filesystem torrent I stumbled across this link about an open source NTFS-3G filesystem driver that claims QNX compatibility.
tuxera.com/community/open-source-ntfs-3g/

It even has it’s own QNX wiki entry (linked to from the link above)
community.qnx.com/sf/wiki/do/vie … i/HomePage

So maybe this is the source code you need to see an example of a filesytem driver (you’d have to grab the source and build).

Tim

Hi Tim,

I found exactly the same links this afternnon :stuck_out_tongue:
This is not exactly what I want.
This filesystem driver uses a FUSE architecture. It works but the drawback is performance. With a “native” filesystem, performance is much higher. That’s what Tuxera say. They sell a “high performance” alternative.

As expected, QNX requests 10000$ to get access to the sources.

It seems I have to settle for a FUSE filesystem.

Nicolas

Nicolas,

That’s too funny we both found it at virtually same time.

Exactly how much slower is it compared to Native? The original code seems to be 6.32 based looking at the screen shots. Maybe the test was on a mechanical drive and you’ll get much better performance on an SSD and/or with a much better CPU (esp if they weren’t running multi-core).

Also, how much throughput do you need?

Tim

Tim,

I don’t know the performance difference between both versions on modern hardware/QNX version. I currently have no way to test.

Speed has to be as high as possible since file copies are done by the user (who is always in a hurry).

I made an experiment : I created a exFAT FUSE driver with the following components :

First quick tests show the following :

  • mkexfatfs seems to work correctly
  • exfatlabel seems to work correctly
  • Mounting a exFAT drive with exfat-fuse works almost correctly. Creating files is ok. Reading files is ok. Listing files is ok. BUT : when the drive is connected to a Windows10 machine, Windows complains and ask the disk to be repaired. Once repaired, content created by QNX target is ok. This might be because I have not found how to unmount the filesystem.
  • There is no automount like with a native filesystem driver (but maybe this is achievable).

!!! The above works only with release v1.2.8 (from github.com/relan/exfat/releases). It does not work with release v1.3.0. I have not investigated further. Neither I have tried current content in master branch.

I will investigate further when I have time.

Nicolas