Best practices: Adding Persistent Handle support
Christopher R. Hertel
crh at samba.org
Tue Jun 6 21:53:09 UTC 2017
Tom, Metze, et. al.,
Tom:
Question for you: If SMB2_GLOBAL_CAP_PERSISTENT_HANDLES is clear on the
connection, can a share still send SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY?
That is, are the two completely independent or can the share indicate CA
even if the connection doesn't provide Persistent Handles?
Everyone:
Here's what I'm thinking...
Two new smb.conf parameters:
* global persistent handles (G) = Yes|Auto|No
* continuous availability (S) = Yes|Auto|No
The first of those would control the SMB2_GLOBAL_CAP_PERSISTENT_HANDLES bit,
and the second would control (per share) the
SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY bit in the Tree Connect response.
The default, in both cases, would be Auto, and here's how it would work:
global persistent handles:
Yes = SMB2_GLOBAL_CAP_PERSISTENT_HANDLES will be set by the server to
indicate that the server supports Persistent Handles.
Auto = The default. This behaves just like "No" under normal
circumstances. More in a moment.
No = SMB2_GLOBAL_CAP_PERSISTENT_HANDLES will not be set by the server.
In the case of Auto, the VFS module would be permitted to change the value
to "Yes" at run-time. Basically, SMB2_GLOBAL_CAP_PERSISTENT_HANDLES would
be disabled unless this value is set to Auto and a VFS module enables it.
continuous availability:
Essentially the same behavior, but at the Share level. The only
outstanding question is whether or not the setting of 'global persistent
handles' will impact the interpretation of 'continuous availability'.
I'll go work on some code now, but let me know what you think.
Chris -)-----
> * Monolithic: "One Big Rock" :-)
Yeah... I knew that, actually! ;-)
More information about the samba-technical
mailing list