A useful VFS change ...

Dustin Oprea myselfasunder at gmail.com
Fri Mar 14 09:28:59 MDT 2014


>
> You can always install your own VFS before the opaque
> terminator in the chain. If skel_opaque.c does not build and
> there were fixes on the list, please apologize: I must have
> missed that patch. If you point me again at it, I'll take a
> look.
>
> So the setup would be
>
> vfs_objects = dustin opaque
>
> "vfs_dustin" would implement the bare mininum necessary
> (open/close/etc) and not call the _NEXT_ functions, thus not
> pass them on to the opaque module. The opaque module being
> the last in the list avoids passing anything to the
> vfs_default behaviour that you want to avoid.
>
> Or are you asking for a bare minimum module that for example
> provides a static "hello.txt" file with contents "world"?
>
> The latter. It would be a lot easier to market VFS if it were that simple.

Think about FUSE... If a feature isn't supported, it gracefully handles it
without panicking. Consequently, you don't have to implement all 30 (or
40?, 50?, ...) functions in order to get going. This obviously makes it
easier to iteratively develop and debug.

I've attached the patch for the example.

The change was this (copied from the original email on 22 Feb):
Original:

NTSTATUS vfs_skel_transparent_init(void)
{
    return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_transparent",
&skel_transparent_fns);
}

Updated:

NTSTATUS init_samba_module(void)
{
    return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
&skel_transparent_fns);
}

This conversation is also not unrelated to the build problems that Richard
was investigating, back then.

Richard: If you're out there, did you get any traction with this?


Dustin


> Volker
>
> --
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de
>
-------------- next part --------------
--- a/skel_opaque.c	2014-02-22 18:23:49.419900254 -0500
+++ b/skel_opaque.c	2014-02-22 18:23:56.523900219 -0500
@@ -929,7 +929,7 @@
 	.set_offline = skel_set_offline
 };
 
-NTSTATUS vfs_skel_transparent_init(void)
+NTSTATUS init_samba_module(void)
 {
-	return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_transparent", &skel_transparent_fns);
+	return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque", &skel_transparent_fns);
 }


More information about the samba-technical mailing list