View topic - Filesystem driver documentation

Page 1 of 1

Filesystem driver documentation

PostPosted: Wed Nov 20, 2019 4:05 pm
by nico04
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

Re: Filesystem driver documentation

PostPosted: Wed Nov 20, 2019 6:15 pm
by Tim
I would first check out Robert Krten's book: The QNX Cookbook: Recipes for Programmers.

Much of it is online here
http://www.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

Re: Filesystem driver documentation

PostPosted: Tue Nov 26, 2019 8:40 am
by nico04
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

Re: Filesystem driver documentation

PostPosted: Tue Dec 03, 2019 2:37 pm
by Tim
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:

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

Tim

Re: Filesystem driver documentation

PostPosted: Tue Dec 10, 2019 8:58 am
by nico04
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

Re: Filesystem driver documentation

PostPosted: Tue Dec 10, 2019 2:38 pm
by Tim
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

Re: Filesystem driver documentation

PostPosted: Tue Dec 10, 2019 4:05 pm
by nico04
Tim,

Did you log in with your QNX credentials?

I did. Please, see the attached picture.

...

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

Nicolas

Capture 2019-12-10 165906.jpg
Capture of Foundry27 Filesystem project page.
(94.3 KiB) Not downloaded yet

Re: Filesystem driver documentation

PostPosted: Tue Dec 10, 2019 9:29 pm
by Tim
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

Re: Filesystem driver documentation

PostPosted: Wed Dec 11, 2019 7:57 am
by nico04
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 :
QNX Source Access Policy Update


This message is to inform you that QNX Software Systems has updated its
source code access policy.

Although these changes affect a very limited number of QNX community
members, they do change the process of how source-code access is
granted.

Please refer to the FAQ
(http://community.qnx.com/sf/wiki/do/vie ... ty/wiki/Up
datedQNXSourceAccessPolicyFAQ) for details.

Regards

QNX Community Management Group


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

Re: Filesystem driver documentation

PostPosted: Wed Dec 11, 2019 2:45 pm
by Tim
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

Re: Filesystem driver documentation

PostPosted: Fri Dec 13, 2019 9:02 am
by nico04
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

Re: Filesystem driver documentation

PostPosted: Fri Dec 13, 2019 3:09 pm
by Tim
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.
https://www.tuxera.com/community/open-source-ntfs-3g/

It even has it's own QNX wiki entry (linked to from the link above)
http://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

Re: Filesystem driver documentation

PostPosted: Fri Dec 13, 2019 4:15 pm
by nico04
Hi Tim,

I found exactly the same links this afternnon :P
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

Re: Filesystem driver documentation

PostPosted: Fri Dec 13, 2019 5:46 pm
by Tim
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

Re: Filesystem driver documentation

PostPosted: Mon Dec 16, 2019 9:24 am
by nico04
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 :
- FUSE static library : "lib" and include "dirs" from http://community.qnx.com/viewvc/trunk/l ... m=exsy1011
- From this repo : https://github.com/relan/exfat (it seems to be "official" linux FUSE exFAT driver).
    - exFAT_lib static library
    - exfat-fuse executable
    - exfatlabel executable
    - mkexfatfs executable
    - exfatfsck executable

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 https://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