Best practices: Adding Persistent Handle support
Christopher R. Hertel
crh at samba.org
Thu Jun 1 22:09:30 UTC 2017
I'm working on Persistent (and Durable) handles. For Persistent handles, I
need to enable a connection-level capability plus a share-level capability.
It seems (to me) that I should add a per-share configuration variable that
indicates that the specified share supports Continuous Availability (CA;
My other thought, however, is this:
- I am implementing CA using a VFS module. I believe that this is a valid
approach, because it allows us to adapt to whatever underlying mechanism
the file system might support on its own.
- We can also write a "generic" Persistent Handle VFS module that works
with whatever mechanism Martin and Amitay develop.
That's my thinking, but it leads to another idea. The Persistent Handle VFS
module would need to be loaded on a per-share bases, since not all shares
would have CA capabilities. So, shouldn't loading the module, by itself,
trigger both SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY on the share and
SMB2_GLOBAL_CAP_PERSISTENT_HANDLES for the server as a whole. I imagine
that there would need to be a call in vfs_<whatevver>_init() function that
would tell smbd to send SMB2_GLOBAL_CAP_PERSISTENT_HANDLES if SMB3+ is
More information about the samba-technical