Work on SMB3 persistent handles

Christopher R. Hertel crh at
Mon Oct 23 18:17:36 UTC 2017

Michael:  Thanks for calling my attention to this thread.

You wrote:
> Maybe, if appropriate, someone could summarize the latest
> state of the discussions/design/prototyping...

I can summarize my own status:

* I have done the work necessary to negotiate Persistent Handle support in
the Session Setup.  Similarly, I have added per-share configuration to
support Continuous Availability in the Tree Connect.  Both of these
additions work nicely.

* Internally to Samba, I have added fields and flags that identify a share
as being CA, and a file handle as being Persistent.

Those are basic steps needed to negotiate Continuous Availability on the
wire, and to signal internally that CA is in use.

In theory, given the way that Durable Handle data is stored, we *should* be
able to pass Persistent Handle tests in this configuration.  As long as the
Samba node that owns the handle does not actually go down (that is, as long
as the test is performed by dropping the network connection), the data
should be maintained and we should be able to re-establish the Persistent

I'm not quite there yet.  I am not yet sending back the correct blob
following the recovery.  This *should* be an easy fix.

Once that all works, the next step is to actually make the handle data
persistent.  My first attempt at doing this was to modify the Open calls on
four [C]TDB databases that store the handle state.  Doing so *should* have
made the data persistent, but instead it caused Samba to crash with the
stack trace showing errors generated in libtevent.

As Michael mentioned, my hope is that we can expose the calls that are
needed to store and retrieve the Durable/Persistent handle data in such a
way that individual vendors (like VMware) can leverage their own product's

So... That's an introduction.  Let me know if there are questions I can answer.

Chris -)-----

On 10/20/2017 07:46 AM, Michael Adam wrote:
> Hi all,
> recently, the topic of implementing SMB3 persistent handles
> in Samba has been taking on some traction again. Mainly
> driven by Chris Hertel. We need to make sure that we have
> a general purpose implementation that works on any file system,
> but we should also make sure to offer hooks that allow
> special file systems in the back-end to expose some features
> of making handle info persistent. It was originally Chris who
> raised this requirement.
> Now I have recently talked to the nice folks from vmware
> (copied in this mail) who are very interested in implementing
> persistent handles in Samba with a similar file-system support,
> and would like to get involved in the development process.
> Hence we though I'd start this thread in the open so that we
> can align our efforts and hopefully come up with a good set
> of changes that are generic enough to satisfy the various
> backend storage solutions. So I copied samba-technical
> as well as explicitly the Samba people who have recently been
> looking into persistent handles most actively. (Apologies
> if I forgot anyone..)
> So Chris, Ralph, Metze, samba folks, meet Rick, Wenguang,
> Albert, and Satish.
> Maybe, if appropriate, someone could summarize the latest
> state of the discussions/design/prototyping...
> Cheers - Michael

More information about the samba-technical mailing list