Re: [PATCH 1/6] xstat: Add a pair of system calls to make extended file stats available

2012-04-25 Thread J. Bruce Fields
On Thu, Apr 19, 2012 at 03:06:12PM +0100, David Howells wrote: Add a pair of system calls to make extended file stats available, including file creation time, inode version and data version where available through the underlying filesystem. The idea was initially proposed as a set of xattrs

Re: [PATCH 1/6] xstat: Add a pair of system calls to make extended file stats available

2012-04-27 Thread J. Bruce Fields
On Thu, Apr 26, 2012 at 02:40:17PM +0100, David Howells wrote: J. Bruce Fields bfie...@fieldses.org wrote: (11) Include granularity fields in the time data to indicate the granularity of each of the times (NFSv4 time_delta) [Steve French]. It looks like you're including

Re: [PATCH 1/6] xstat: Add a pair of system calls to make extended file stats available

2012-04-27 Thread J. Bruce Fields
On Thu, Apr 26, 2012 at 02:45:54PM +0100, David Howells wrote: Steve French smfre...@gmail.com wrote: I also would prefer that we simply treat the time granularity as part of the superblock (mounted volume) ie returned on fstat rather than on every stat of the filesystem. For cifs

Re: [PATCH 0/6] Extended file stat system call

2012-04-27 Thread J. Bruce Fields
On Fri, Apr 27, 2012 at 11:13:06PM +1000, Dave Chinner wrote: Right now it is, but there's ben patches in the past to introduce project quotas to ext4. That didn't go far because it was done in a way that was semantically different to XFS (for no reason that I could understand) and nobody

Re: [PATCH 0/3] Add O_DENY* flags to fcntl and cifs

2012-12-10 Thread J. Bruce Fields
On Fri, Dec 07, 2012 at 01:08:46PM +0400, Pavel Shilovsky wrote: 2012/12/6 Pavel Shilovsky pias...@etersoft.ru: Network filesystems CIFS, SMB2.0, SMB3.0 and NFSv4 have such flags - this change can benefit cifs and nfs modules. While this change is ok for network filesystems, itsn't not

Re: [PATCH 0/3] Add O_DENY* flags to fcntl and cifs

2012-12-10 Thread J. Bruce Fields
On Fri, Dec 07, 2012 at 10:37:45AM -0500, simo wrote: On Fri, 2012-12-07 at 09:52 -0500, J. Bruce Fields wrote: On Fri, Dec 07, 2012 at 01:08:46PM +0400, Pavel Shilovsky wrote: 2012/12/6 Pavel Shilovsky pias...@etersoft.ru: Network filesystems CIFS, SMB2.0, SMB3.0 and NFSv4 have

Re: [PATCH 0/3] Add O_DENY* flags to fcntl and cifs

2012-12-10 Thread J. Bruce Fields
On Sat, Dec 08, 2012 at 12:43:14AM +0400, Pavel Shilovsky wrote: The problem is the possibility of denial-of-service attacks here. We can try to prevent them by: 1) specifying an extra security bit on the file that indicates that share flags are accepted (like we have for mandatory locks now)

Re: [PATCH 0/3] Add O_DENY* flags to fcntl and cifs

2012-12-17 Thread J. Bruce Fields
On Fri, Dec 14, 2012 at 01:19:18PM -0600, Steve French wrote: On Fri, Dec 14, 2012 at 9:30 AM, Alan Cox a...@lxorguk.ukuu.org.uk wrote: We can make this feature (passing O_DENY* flags received from clients to filesystem) can be turned on/off on Samba/NFS server to let this particular use

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

2013-01-30 Thread J. Bruce Fields
On Thu, Jan 17, 2013 at 08:52:09PM +0400, Pavel Shilovsky wrote: 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

Re: [PATCH v2 3/8] vfs: Add O_DENYREAD/WRITE flags support for open syscall

2013-01-30 Thread J. Bruce Fields
On Thu, Jan 17, 2013 at 08:52:59PM +0400, Pavel Shilovsky wrote: If O_DENYMAND flag is specified, O_DENYREAD/WRITE/MAND flags are translated to flock's flags: !O_DENYREAD - LOCK_READ !O_DENYWRITE - LOCK_WRITE O_DENYMAND - LOCK_MAND and set through flock_lock_file on a file. This

Re: [PATCH v2 4/8] CIFS: Add O_DENY* open flags support

2013-01-30 Thread J. Bruce Fields
On Thu, Jan 17, 2013 at 08:53:00PM +0400, Pavel Shilovsky wrote: Make CIFSSMBOpen take share_flags as a parm that allows us to pass new O_DENY* flags to the server. Signed-off-by: Pavel Shilovsky pias...@etersoft.ru --- fs/cifs/cifsacl.c | 10 ++ fs/cifs/cifsglob.h | 12

Re: [PATCH v2 3/8] vfs: Add O_DENYREAD/WRITE flags support for open syscall

2013-02-05 Thread J. Bruce Fields
On Tue, Feb 05, 2013 at 03:45:31PM +0400, Pavel Shilovsky wrote: 2013/1/31 J. Bruce Fields bfie...@fieldses.org: On Thu, Jan 17, 2013 at 08:52:59PM +0400, Pavel Shilovsky wrote: If O_DENYMAND flag is specified, O_DENYREAD/WRITE/MAND flags are translated to flock's flags: !O_DENYREAD

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

2013-02-05 Thread J. Bruce Fields
On Tue, Feb 05, 2013 at 03:33:21PM +0400, Pavel Shilovsky wrote: 2013/1/31 J. Bruce Fields bfie...@fieldses.org: On Thu, Jan 17, 2013 at 08:52:09PM +0400, Pavel Shilovsky wrote: This patchset adds support of O_DENY* flags for Linux fs layer. These flags can be used by any application

Re: [PATCH v2 3/8] vfs: Add O_DENYREAD/WRITE flags support for open syscall

2013-02-08 Thread J. Bruce Fields
On Thu, Feb 07, 2013 at 01:53:46PM +0400, Pavel Shilovsky wrote: 2013/2/5 J. Bruce Fields bfie...@fieldses.org: On Tue, Feb 05, 2013 at 03:45:31PM +0400, Pavel Shilovsky wrote: 2013/1/31 J. Bruce Fields bfie...@fieldses.org: On Thu, Jan 17, 2013 at 08:52:59PM +0400, Pavel Shilovsky wrote

Re: [PATCH v2 3/8] vfs: Add O_DENYREAD/WRITE flags support for open syscall

2013-02-08 Thread J. Bruce Fields
On Thu, Feb 07, 2013 at 06:32:38PM +0400, Pavel Shilovsky wrote: 2013/2/7 J. Bruce Fields bfie...@fieldses.org: On Thu, Feb 07, 2013 at 01:53:46PM +0400, Pavel Shilovsky wrote: Nothing prevents it. If somebody grabbed a share mode lock on a file before we call deny_lock_file, we simply

Re: [PATCH v2 3/8] vfs: Add O_DENYREAD/WRITE flags support for open syscall

2013-02-08 Thread J. Bruce Fields
On Thu, Feb 07, 2013 at 08:00:13PM +0400, Pavel Shilovsky wrote: 2013/2/7 J. Bruce Fields bfie...@fieldses.org: On Thu, Feb 07, 2013 at 06:32:38PM +0400, Pavel Shilovsky wrote: 2013/2/7 J. Bruce Fields bfie...@fieldses.org: On Thu, Feb 07, 2013 at 01:53:46PM +0400, Pavel Shilovsky wrote

Re: [PATCH v2 3/8] vfs: Add O_DENYREAD/WRITE flags support for open syscall

2013-02-08 Thread J. Bruce Fields
On Thu, Feb 07, 2013 at 08:50:16PM +0400, Pavel Shilovsky wrote: 2013/2/7 J. Bruce Fields bfie...@fieldses.org: That would be a bug, I think. E.g. man 3posix open: No files shall be created or modified if the function returns -1. Looking at the code... See

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

2013-03-04 Thread J. Bruce Fields
On Thu, Feb 28, 2013 at 01:53:25PM -0800, Andy Lutomirski wrote: [possible resend -- sorry] On 02/28/2013 07:25 AM, Pavel Shilovsky wrote: 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

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

2013-03-05 Thread J. Bruce Fields
On Mon, Mar 04, 2013 at 05:49:46PM -0500, Simo wrote: On 03/04/2013 04:19 PM, J. Bruce Fields wrote: On Thu, Feb 28, 2013 at 01:53:25PM -0800, Andy Lutomirski wrote: [possible resend -- sorry] On 02/28/2013 07:25 AM, Pavel Shilovsky wrote: This patchset adds support of O_DENY* flags

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

2013-03-12 Thread J. Bruce Fields
On Mon, Mar 11, 2013 at 11:18:15AM -0700, Andy Lutomirski wrote: On Tue, Mar 5, 2013 at 11:07 AM, Simo s...@samba.org wrote: On 03/05/2013 01:13 PM, J. Bruce Fields wrote: On Mon, Mar 04, 2013 at 05:49:46PM -0500, Simo wrote: On 03/04/2013 04:19 PM, J. Bruce Fields wrote: On Thu

Re: [PATCH v3 7/7] NFSD: Pass share reservations flags to VFS

2013-03-12 Thread J. Bruce Fields
On Mon, Mar 11, 2013 at 03:05:40PM -0400, Jeff Layton wrote: knfsd has some code already to handle share reservations internally. Nothing outside of knfsd is aware of these reservations, of course so moving to a vfs-level object for it would be a marked improvement. It doesn't look like this

Re: [PATCH v3 7/7] NFSD: Pass share reservations flags to VFS

2013-03-12 Thread J. Bruce Fields
On Mon, Mar 11, 2013 at 04:08:44PM -0400, Jeff Layton wrote: On Mon, 11 Mar 2013 15:36:38 -0400 J. Bruce Fields bfie...@fieldses.org wrote: On Mon, Mar 11, 2013 at 03:05:40PM -0400, Jeff Layton wrote: knfsd has some code already to handle share reservations internally. Nothing outside

Re: [PATCH v3 7/7] NFSD: Pass share reservations flags to VFS

2013-03-12 Thread J. Bruce Fields
On Mon, Mar 11, 2013 at 01:25:20PM -0700, Frank S Filz wrote: J. Bruce Fields bfie...@fieldses.org wrote On Mon, Mar 11, 2013 at 04:08:44PM -0400, Jeff Layton wrote: On Mon, 11 Mar 2013 15:36:38 -0400 J. Bruce Fields bfie...@fieldses.org wrote: It doesn't look like this patch