Thoughts on how to communicate to VFS functions that a CREATE is occurring

Richard Sharpe realrichardsharpe at gmail.com
Mon Apr 4 14:26:46 UTC 2016


On Sun, Apr 3, 2016 at 11:15 PM, Volker Lendecke
<Volker.Lendecke at sernet.de> wrote:
> On Sun, Apr 03, 2016 at 10:26:40AM -0700, Richard Sharpe wrote:
>> Well, we have implemented it, but it involved changes in Samba that I
>> would like to get rid of.
>>
>> The feature is sharding of directories across multiple servers in a
>> cluster and using DFS referrals to get clients connected to the
>> correct server in the cluster.
>>
>> When a client asks you for a DFS referral for the directory that is on
>> the node they are connected to (which they do, from time to time) we
>> need to return the correct information.
>>
>> To do all of the above successfully, we have found that we need to
>> know, in the VFS layer (and particularly, in STAT, which is pretty
>> much the earliest VFS function called) whether we were called for a
>> CREATE or for something else.
>
> What is the sequence of events? You get a SMB_CREATE, and you return a
> PATH_NOT_COVERED. Then you get an ioctl that asks for the target path.
> Is that right?

Yeah, that's the sequence.

> Intercepting create_fn is not sufficient, because it is called from other
> highlevel SMB requests too?

That too. However,. more importantly, things like stat_fn is called
before create_fn is called.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list