Consolidating kernel-related parts of opening a file?
James Peach
jpeach at samba.org
Thu Jun 21 20:17:59 GMT 2007
On Jun 21, 2007, at 10:34 AM, Volker Lendecke wrote:
> Hi!
>
> Attached find a patch that consolidates the open(2) call,
> setting the kernel share mode and kernel oplocks into
> fd_open(). Survives make test, I'm now doing tests with
> kernel oplocks activated.
This looks nice. I don't think you have to pass share_access around,
because by this time, fsp->share_access has been set.
> Why? People with more createfile semantics (i.e. real share
> modes and/or real oplocks) have a cleaner place to plug in,
> and from my point of view these three steps logically belong
> together, thus our error paths might be cleaned up a bit.
I have a module that detect share mode conflicts in SMB_VFS_OPEN
rather than SMB_VFS_KERNEL_FLOCK, so it would be nice if this was
supported more directly. If not, then it still reduces my patch
nicely :)
--
James Peach | jpeach at samba.org
More information about the samba-technical
mailing list