[PATCH] libcsupport: Add no_reg_make_node as a mount option to the mount table

Chris Johns chrisj at rtems.org
Tue Jan 26 21:20:37 UTC 2021

On 27/1/21 2:43 am, Gedare Bloom wrote:
> On Mon, Jan 25, 2021 at 9:02 AM Sebastian Huber
> <sebastian.huber at embedded-brains.de <mailto:sebastian.huber at embedded-brains.de>>
> wrote:
>     On 25/01/2021 02:10, chrisj at rtems.org <mailto:chrisj at rtems.org> wrote:
>     > From: Chris Johns<chrisj at rtems.org <mailto:chrisj at rtems.org>>
>     >
>     > - Add the bool flag no_reg_make_mode to the mount table so a file
>     >    system can indicate creating regular files is not done by
>     >    use the mknod handler. The file system will handle creating a
>     >    file node in the open handler.
>     >
>     > - Note, the mount option is an enum which means there is only one
>     >    exclusive option supported. As a result no encapsulation is
>     >    provided and file systems need to set no_reg_make_node directly.
>     I think this workaround is all right if it helps you to more easily use
>     the FreeBSD file system layer. In the long run we should keep only one
>     approach.

Yes it is needed to integrate FreeBSD's file system interface. I am not sure I
would use the term work around. Integrating a fully featured file system like
VFS presents some challenges and there is a fine line between the FreeBSD system
call interfaces and the VFS interfaces used. A system call provides a nice clean
and wrapped interface to the complexities present and a VFS interface is fast
once you have the vnode. I have used a mix of these. The issue is libio does not
completely handle all the node interactions needed and it seems only does in
this specific case. For example it creates a regular file node for open but does
not truncate a file at the mode level. The VFS does and much more and why the
FreeBSD open system call is used.

This change is as small as possible. I feel we need a major project to rework
libio and to consider this and more. I am wondering if our sys call interface
could use handlers and we could then make FreeBSD a root file system? This would
let us look at FreeBSD kernel servers like NFS running on RTEMS. It would also
improve performance for those with high speed networking. This however is not
important for this patch or the current efforts under way.

>     I would rename no_reg_make_node in no_regular_file_mknod.
> +1 on the name, I had no clue what it meant.

Sure. The ticket explains the problem being solved if that helps.


More information about the devel mailing list