Consolidating kernel-related parts of opening a file?

James Peach jpeach at samba.org
Thu Jun 21 21:11:43 GMT 2007


On Jun 21, 2007, at 1:56 PM, Volker Lendecke wrote:

> On Thu, Jun 21, 2007 at 01:17:59PM -0700, James Peach wrote:
>> This looks nice. I don't think you have to pass share_access around,
>> because by this time, fsp->share_access has been set.
>
> Thanks for that hint!
>
>> 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 :)
>
> Wait -- OS/X has share modes?

not in the kernel

> Do you have hints to docs?

There is the O_SHLOCK and O_EXLOCK flags to open(2) which take out BSD  
flocks at open time, see

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/open.2.html

--
James Peach | jpeach at samba.org



More information about the samba-technical mailing list