Re: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-31 Thread Pavel Shilovsky
2014-01-17 Pavel Shilovsky : > This patchset adds support of O_DENY* flags for Linux fs layer. These flags > can be used by any application that needs share reservations to organize a > file access. VFS already has some sort of this capability - now it's done > through flock/LOCK_MAND mechanis,

RE: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-27 Thread Frank Filz
> 2014/1/17 Frank Filz : > > This looks wonderful and will be useful to the Ganesha user space NFS > > server also. > > > > I do have a couple questions. > > > > 1. How will this interact with the idea of private locks from the > > patch set Jeff Layton has been pushing? > > They don't touch each

Re: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-21 Thread Volker Lendecke
On Tue, Jan 21, 2014 at 05:31:39PM +0400, Pavel Shilovsky wrote: > It's not possible with the current API to do it through open syscall. > Another possibility is to look at /proc/locks. But I think we really > need O_DELETE flag that will force a file to be removed on close - we > will be able to d

Re: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-21 Thread Pavel Shilovsky
2014/1/20 Volker Lendecke : >> You can try to use O_PATH flag. It doesn't give you a delete access >> but should be ok because further deleting will be done without file >> descriptor -- through unlink syscall. > > Ok, I did not know about O_PATH. Thanks for that! > > So I do an open with O_PATH. H

Re: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-20 Thread Volker Lendecke
On Mon, Jan 20, 2014 at 02:20:43PM +0400, Pavel Shilovsky wrote: > > One question: If Samba wants to open a file for delete > > access, there's no corresponding flag in the open > > permissions. There can be the case where Samba wants to open > > *just* for future unlink, no read or write access re

Re: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-20 Thread Pavel Shilovsky
2014/1/20 Volker Lendecke : > Hi! > > On Fri, Jan 17, 2014 at 02:07:05PM +0400, Pavel Shilovsky wrote: >> If O_DENYDELETE flag is specified and the open succeded, >> any further unlink operation will fail with -ESHAREDENIED >> untill this open is closed. Now this flag is processed by >> VFS and CIF

Re: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-20 Thread Pavel Shilovsky
2014/1/17 Frank Filz : > This looks wonderful and will be useful to the Ganesha user space NFS server > also. > > I do have a couple questions. > > 1. How will this interact with the idea of private locks from the patch set > Jeff Layton has been pushing? They don't touch each other. > > 2. If a

Re: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-20 Thread Volker Lendecke
Hi! On Fri, Jan 17, 2014 at 02:07:05PM +0400, Pavel Shilovsky wrote: > If O_DENYDELETE flag is specified and the open succeded, > any further unlink operation will fail with -ESHAREDENIED > untill this open is closed. Now this flag is processed by > VFS and CIFS filesystem. NFS returns -EINVAL for

RE: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-17 Thread Frank Filz
wine-de...@winehq.org > Subject: [PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS > > This patchset adds support of O_DENY* flags for Linux fs layer. These flags > can be used by any application that needs share reservations to organize a > file access. VFS already has some sor

[PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2014-01-17 Thread Pavel Shilovsky
This patchset adds support of O_DENY* flags for Linux fs layer. These flags can be used by any application that needs share reservations to organize a file access. VFS already has some sort of this capability - now it's done through flock/LOCK_MAND mechanis, but that approach is non-atomic. This

[PATCH v7 0/7] Add O_DENY* support for VFS and CIFS/NFS

2013-07-01 Thread Pavel Shilovsky
Main changes from v6: 1) Fix LOCK_DELETE mandatory lock detection for O_DENYDELETE opens. 2) Add ESHAREDENIED error code definition for alpha, mips, parisc and sparc arches. 3) Remove code changes in do_last function if sharelocks are disabled. Main changes from v5: 1) O_DENYDELETE is now support