Best practices: Adding Persistent Handle support
realrichardsharpe at gmail.com
Thu Jun 1 22:38:08 UTC 2017
On Thu, Jun 1, 2017 at 3:09 PM, Christopher R. Hertel via
samba-technical <samba-technical at lists.samba.org> wrote:
> 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;
> Persistent Handles).
> 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
VFS modules are specified on a per-share basis, so they are loaded on
a per-share basis ... but maybe you knew that already, it was not
clear from the question that you did, however.
More information about the samba-technical