Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-09 Thread J. Bruce Fields
On Wed, Nov 09, 2016 at 12:33:35PM -0500, Jeff Layton wrote: > On Wed, 2016-11-09 at 11:27 -0500, J. Bruce Fields wrote: > > On Wed, Nov 09, 2016 at 08:18:08AM -0500, Jeff Layton wrote: > > > > > > On Tue, 2016-11-08 at 20:27 -0500, J. Bruce Fields wrote: > >

Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-09 Thread J. Bruce Fields
On Wed, Nov 09, 2016 at 12:33:35PM -0500, Jeff Layton wrote: > On Wed, 2016-11-09 at 11:27 -0500, J. Bruce Fields wrote: > > On Wed, Nov 09, 2016 at 08:18:08AM -0500, Jeff Layton wrote: > > > > > > On Tue, 2016-11-08 at 20:27 -0500, J. Bruce Fields wrote: > >

Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-09 Thread J. Bruce Fields
On Wed, Nov 09, 2016 at 08:18:08AM -0500, Jeff Layton wrote: > On Tue, 2016-11-08 at 20:27 -0500, J. Bruce Fields wrote: > > On Tue, Nov 08, 2016 at 05:52:21PM -0500, Tejun Heo wrote: > > > > > > Hello, Bruce. > > > > > > On Tue, Nov 08, 20

Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-09 Thread J. Bruce Fields
On Wed, Nov 09, 2016 at 08:18:08AM -0500, Jeff Layton wrote: > On Tue, 2016-11-08 at 20:27 -0500, J. Bruce Fields wrote: > > On Tue, Nov 08, 2016 at 05:52:21PM -0500, Tejun Heo wrote: > > > > > > Hello, Bruce. > > > > > > On Tue, Nov 08, 20

Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-08 Thread J. Bruce Fields
On Tue, Nov 08, 2016 at 05:52:21PM -0500, Tejun Heo wrote: > Hello, Bruce. > > On Tue, Nov 08, 2016 at 04:39:11PM -0500, J. Bruce Fields wrote: > > Apologies, just cleaning out old mail and finding some I should have > > responded to long ago: > > > > On Wed,

Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-08 Thread J. Bruce Fields
On Tue, Nov 08, 2016 at 05:52:21PM -0500, Tejun Heo wrote: > Hello, Bruce. > > On Tue, Nov 08, 2016 at 04:39:11PM -0500, J. Bruce Fields wrote: > > Apologies, just cleaning out old mail and finding some I should have > > responded to long ago: > > > > On Wed,

Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-08 Thread J. Bruce Fields
Apologies, just cleaning out old mail and finding some I should have responded to long ago: On Wed, Aug 31, 2016 at 02:23:48AM +0530, Bhaktipriya Shridhar wrote: > The workqueue "callback_wq" queues a single work item >cb_work per > nfsd4_callback instance and thus, it doesn't require execution

Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue

2016-11-08 Thread J. Bruce Fields
Apologies, just cleaning out old mail and finding some I should have responded to long ago: On Wed, Aug 31, 2016 at 02:23:48AM +0530, Bhaktipriya Shridhar wrote: > The workqueue "callback_wq" queues a single work item >cb_work per > nfsd4_callback instance and thus, it doesn't require execution

Re: [PATCH] nfsd: constify reply_cache_stats_operations structure

2016-11-08 Thread J. Bruce Fields
On Mon, Aug 29, 2016 at 06:57:47AM -0400, Jeff Layton wrote: > On Sun, 2016-08-28 at 22:36 +0200, Julia Lawall wrote: > > reply_cache_stats_operations, of type struct file_operations, is > > never > > modified, so declare it as const. > > > > Done with the help of Coccinelle. > > > >

Re: [PATCH] nfsd: constify reply_cache_stats_operations structure

2016-11-08 Thread J. Bruce Fields
On Mon, Aug 29, 2016 at 06:57:47AM -0400, Jeff Layton wrote: > On Sun, 2016-08-28 at 22:36 +0200, Julia Lawall wrote: > > reply_cache_stats_operations, of type struct file_operations, is > > never > > modified, so declare it as const. > > > > Done with the help of Coccinelle. > > > >

[GIT PULL] nfsd bugfixes for 4.9

2016-11-04 Thread J. Bruce Fields
on the stack). Chuck Lever (2): svcrdma: backchannel cannot share a page for send and rcv buffers nfsd: Fix general protection fault in release_lock_stateid() J. Bruce Fields (1): sunrpc: don't pass on-stack memory

[GIT PULL] nfsd bugfixes for 4.9

2016-11-04 Thread J. Bruce Fields
on the stack). Chuck Lever (2): svcrdma: backchannel cannot share a page for send and rcv buffers nfsd: Fix general protection fault in release_lock_stateid() J. Bruce Fields (1): sunrpc: don't pass on-stack memory

Re: [PATCH] fs: fcntl, avoid undefined behaviour

2016-10-14 Thread J. Bruce Fields
ng the arg parameter properly (against INT_MAX) and > > return immediatelly in case it is wrong. No error is returned, the > > same as in other cases. > > > > Signed-off-by: Jiri Slaby <jsl...@suse.cz> > > Cc: Jeff Layton <jlay...@poochiereds.net>

Re: [PATCH] fs: fcntl, avoid undefined behaviour

2016-10-14 Thread J. Bruce Fields
ng the arg parameter properly (against INT_MAX) and > > return immediatelly in case it is wrong. No error is returned, the > > same as in other cases. > > > > Signed-off-by: Jiri Slaby > > Cc: Jeff Layton > > Cc: "J. Bruce Fields" > &g

[GIT PULL] nfsd changes for 4.9

2016-10-12 Thread J. Bruce Fields
svcrdma: support Remote Invalidation J. Bruce Fields (4): nfsd: randomize SETCLIENTID reply to help distinguish servers nfsd4: setclientid_confirm with unmatched verifier should fail nfsd: only WARN once on unmapped errors nfsd: handle EUCLEAN Jeff Layton (8): nfsd

[GIT PULL] nfsd changes for 4.9

2016-10-12 Thread J. Bruce Fields
svcrdma: support Remote Invalidation J. Bruce Fields (4): nfsd: randomize SETCLIENTID reply to help distinguish servers nfsd4: setclientid_confirm with unmatched verifier should fail nfsd: only WARN once on unmapped errors nfsd: handle EUCLEAN Jeff Layton (8): nfsd

Re: [PATCH v25 00/21] Richacls (Core and Ext4)

2016-09-30 Thread J. Bruce Fields
Could we finally get this merged? What more is this waiting on? --b. On Thu, Sep 29, 2016 at 01:29:19AM +0200, Andreas Gruenbacher wrote: > Here is another update of the richacl patches. Changes since the last posting > (http://lwn.net/Articles/697320/): > > * Rebase on top of the VFS

Re: [PATCH v25 00/21] Richacls (Core and Ext4)

2016-09-30 Thread J. Bruce Fields
Could we finally get this merged? What more is this waiting on? --b. On Thu, Sep 29, 2016 at 01:29:19AM +0200, Andreas Gruenbacher wrote: > Here is another update of the richacl patches. Changes since the last posting > (http://lwn.net/Articles/697320/): > > * Rebase on top of the VFS

Re: [PATCH 1/2] NFSD: notifiers registration cleanup

2016-09-22 Thread J. Bruce Fields
On Wed, Sep 21, 2016 at 09:20:10AM -0400, Jeff Layton wrote: > On Wed, 2016-09-21 at 15:33 +0300, Vasily Averin wrote: > > By design notifier can be registered once only, > > however nfsd registers the same inetaddr notifiers per net-namespace. > > When this happen it corrupts list of notifiers, >

Re: [PATCH 1/2] NFSD: notifiers registration cleanup

2016-09-22 Thread J. Bruce Fields
On Wed, Sep 21, 2016 at 09:20:10AM -0400, Jeff Layton wrote: > On Wed, 2016-09-21 at 15:33 +0300, Vasily Averin wrote: > > By design notifier can be registered once only, > > however nfsd registers the same inetaddr notifiers per net-namespace. > > When this happen it corrupts list of notifiers, >

[GIT PULL] one more nfsd bugfix for 4.8

2016-09-16 Thread J. Bruce Fields
Please pull git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.8-2 --b. Fix a memory corruption bug that I introduced in 4.7. Chuck Lever (1): svcauth_gss:

[GIT PULL] one more nfsd bugfix for 4.8

2016-09-16 Thread J. Bruce Fields
Please pull git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.8-2 --b. Fix a memory corruption bug that I introduced in 4.7. Chuck Lever (1): svcauth_gss:

[GIT PULL] 4.8 nfsd bugfixes

2016-08-12 Thread J. Bruce Fields
Please pull git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.8-1 Fixes for the dentry refcounting leak I introduced in 4.8-rc1, and for races in the LOCK code which appear to go back to the big nfsd state lock removal from

[GIT PULL] 4.8 nfsd bugfixes

2016-08-12 Thread J. Bruce Fields
Please pull git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.8-1 Fixes for the dentry refcounting leak I introduced in 4.8-rc1, and for races in the LOCK code which appear to go back to the big nfsd state lock removal from

Re: [lkp] [nfsd] b44061d0b9: BUG: Dentry ffff880027d7c540{i=1846f,n=0a} still in use (1) [unmount of btrfs vda]

2016-08-10 Thread J. Bruce Fields
On Wed, Aug 10, 2016 at 11:56:15AM -0700, Linus Torvalds wrote: > On Wed, Aug 10, 2016 at 11:46 AM, Josef Bacik wrote: > > > > So my naive fix would be something like this > > Bruce? Josef's patch looks ObviouslyCorrect(tm) to me now that I look > at it - all the other callers of

Re: [lkp] [nfsd] b44061d0b9: BUG: Dentry ffff880027d7c540{i=1846f,n=0a} still in use (1) [unmount of btrfs vda]

2016-08-10 Thread J. Bruce Fields
On Wed, Aug 10, 2016 at 11:56:15AM -0700, Linus Torvalds wrote: > On Wed, Aug 10, 2016 at 11:46 AM, Josef Bacik wrote: > > > > So my naive fix would be something like this > > Bruce? Josef's patch looks ObviouslyCorrect(tm) to me now that I look > at it - all the other callers of fh_compose()

[GIT PULL] nfsd changes for 4.8

2016-08-04 Thread J. Bruce Fields
indent inconsistancy Chuck Lever (1): nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock Dan Carpenter (1): nfsd: remove some dead code in nfsd_create_locked() J. Bruce Fields (6): nfsd: remove redundant zero-length check from create nfsd: check d_can_lookup

[GIT PULL] nfsd changes for 4.8

2016-08-04 Thread J. Bruce Fields
indent inconsistancy Chuck Lever (1): nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock Dan Carpenter (1): nfsd: remove some dead code in nfsd_create_locked() J. Bruce Fields (6): nfsd: remove redundant zero-length check from create nfsd: check d_can_lookup

Re: [patch] nfsd: remove some dead code in nfsd_create_locked()

2016-08-03 Thread J. Bruce Fields
On Wed, Aug 03, 2016 at 10:05:00PM +0300, Dan Carpenter wrote: > We changed this around in f13058a93484 ('nfsd: reorganize nfsd_create') > so "dchild" can't be an error pointer any more. Also we don't need to > test if dchild is NULL because dput has a check built-in. Thanks! > Can it even be

Re: [patch] nfsd: remove some dead code in nfsd_create_locked()

2016-08-03 Thread J. Bruce Fields
On Wed, Aug 03, 2016 at 10:05:00PM +0300, Dan Carpenter wrote: > We changed this around in f13058a93484 ('nfsd: reorganize nfsd_create') > so "dchild" can't be an error pointer any more. Also we don't need to > test if dchild is NULL because dput has a check built-in. Thanks! > Can it even be

Re: [PATCH v2] locks: Filter /proc/locks output on proc pid ns

2016-08-03 Thread J. Bruce Fields
On Wed, Aug 03, 2016 at 06:00:18PM +0300, Nikolay Borisov wrote: > > > On 08/03/2016 05:54 PM, Pavel Emelyanov wrote: > > On 08/03/2016 05:17 PM, Nikolay Borisov wrote: > >> > >> > [SNIP] > >> > >> [CCing some people from openvz/CRIU] > > > > Thanks :) > > > >> My train of thought was "we

Re: [PATCH v2] locks: Filter /proc/locks output on proc pid ns

2016-08-03 Thread J. Bruce Fields
On Wed, Aug 03, 2016 at 06:00:18PM +0300, Nikolay Borisov wrote: > > > On 08/03/2016 05:54 PM, Pavel Emelyanov wrote: > > On 08/03/2016 05:17 PM, Nikolay Borisov wrote: > >> > >> > [SNIP] > >> > >> [CCing some people from openvz/CRIU] > > > > Thanks :) > > > >> My train of thought was "we

Re: [PATCH v2] locks: Filter /proc/locks output on proc pid ns

2016-08-03 Thread J. Bruce Fields
On Wed, Aug 03, 2016 at 05:17:09PM +0300, Nikolay Borisov wrote: > > > On 08/03/2016 04:46 PM, Jeff Layton wrote: > > On Wed, 2016-08-03 at 10:35 +0300, Nikolay Borisov wrote: > >> On busy container servers reading /proc/locks shows all the locks > >> created by all clients. This can cause large

Re: [PATCH v2] locks: Filter /proc/locks output on proc pid ns

2016-08-03 Thread J. Bruce Fields
On Wed, Aug 03, 2016 at 05:17:09PM +0300, Nikolay Borisov wrote: > > > On 08/03/2016 04:46 PM, Jeff Layton wrote: > > On Wed, 2016-08-03 at 10:35 +0300, Nikolay Borisov wrote: > >> On busy container servers reading /proc/locks shows all the locks > >> created by all clients. This can cause large

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 04:01:22PM -0400, Jeff Layton wrote: > On Tue, 2016-08-02 at 15:44 -0400, J. Bruce Fields wrote: > > On Tue, Aug 02, 2016 at 02:09:22PM -0500, Eric W. Biederman wrote: > > > > > > > > "J. Bruce Fields" <bfie...@fieldses.org&g

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 04:01:22PM -0400, Jeff Layton wrote: > On Tue, 2016-08-02 at 15:44 -0400, J. Bruce Fields wrote: > > On Tue, Aug 02, 2016 at 02:09:22PM -0500, Eric W. Biederman wrote: > > > > > > > > "J. Bruce Fields" writes: > > >

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 02:09:22PM -0500, Eric W. Biederman wrote: > "J. Bruce Fields" <bfie...@fieldses.org> writes: > > > On Tue, Aug 02, 2016 at 11:00:39AM -0500, Eric W. Biederman wrote: > >> Nikolay Borisov <ker...@kyup.com> writes: >

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 02:09:22PM -0500, Eric W. Biederman wrote: > "J. Bruce Fields" writes: > > > On Tue, Aug 02, 2016 at 11:00:39AM -0500, Eric W. Biederman wrote: > >> Nikolay Borisov writes: > >> > >> > Currently when /proc/locks

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 11:00:39AM -0500, Eric W. Biederman wrote: > Nikolay Borisov writes: > > > Currently when /proc/locks is read it will show all the file locks > > which are currently created on the machine. On containers, hosted > > on busy servers this means that doing

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 11:00:39AM -0500, Eric W. Biederman wrote: > Nikolay Borisov writes: > > > Currently when /proc/locks is read it will show all the file locks > > which are currently created on the machine. On containers, hosted > > on busy servers this means that doing lsof can be very

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 06:20:32PM +0300, Nikolay Borisov wrote: > On 08/02/2016 06:05 PM, J. Bruce Fields wrote: > > (And what process was actually reading /proc/locks, out of curiosity?) > > lsof in my case Oh, thanks, and you said that at the start, and I overlooked it--apologi

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 06:20:32PM +0300, Nikolay Borisov wrote: > On 08/02/2016 06:05 PM, J. Bruce Fields wrote: > > (And what process was actually reading /proc/locks, out of curiosity?) > > lsof in my case Oh, thanks, and you said that at the start, and I overlooked it--apologi

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 05:42:23PM +0300, Nikolay Borisov wrote: > Currently when /proc/locks is read it will show all the file locks > which are currently created on the machine. On containers, hosted > on busy servers this means that doing lsof can be very slow. I > observed up to 5 seconds

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 05:42:23PM +0300, Nikolay Borisov wrote: > Currently when /proc/locks is read it will show all the file locks > which are currently created on the machine. On containers, hosted > on busy servers this means that doing lsof can be very slow. I > observed up to 5 seconds

Re: [PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-24 Thread J. Bruce Fields
On Sun, Jul 24, 2016 at 03:23:07PM +0100, Al Viro wrote: > On Sun, Jul 24, 2016 at 08:10:14AM -0400, J. Bruce Fields wrote: > > On Sun, Jul 24, 2016 at 01:22:06AM +0100, Al Viro wrote: > > > On Fri, Jul 22, 2016 at 01:48:52PM -0400, J. Bruce Fields wrote: > > > >

Re: [PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-24 Thread J. Bruce Fields
On Sun, Jul 24, 2016 at 03:23:07PM +0100, Al Viro wrote: > On Sun, Jul 24, 2016 at 08:10:14AM -0400, J. Bruce Fields wrote: > > On Sun, Jul 24, 2016 at 01:22:06AM +0100, Al Viro wrote: > > > On Fri, Jul 22, 2016 at 01:48:52PM -0400, J. Bruce Fields wrote: > > &g

Re: [PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-24 Thread J. Bruce Fields
On Sun, Jul 24, 2016 at 01:22:06AM +0100, Al Viro wrote: > On Fri, Jul 22, 2016 at 01:48:52PM -0400, J. Bruce Fields wrote: > > From: "J. Bruce Fields" <bfie...@redhat.com> > > > > I'm not sure why this was added. It doesn't seem necessary, and no > >

Re: [PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-24 Thread J. Bruce Fields
On Sun, Jul 24, 2016 at 01:22:06AM +0100, Al Viro wrote: > On Fri, Jul 22, 2016 at 01:48:52PM -0400, J. Bruce Fields wrote: > > From: "J. Bruce Fields" > > > > I'm not sure why this was added. It doesn't seem necessary, and no > > other caller does thi

[PATCH 7/7] nfsd: drop unnecessary MAY_EXEC check from create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" <bfie...@redhat.com> We need an fh_verify to make sure we at least have a dentry, but actual permission checks happen later. Signed-off-by: J. Bruce Fields <bfie...@redhat.com> --- fs/nfsd/nfs4proc.c | 7 +-- fs/nfsd/vfs.c | 6 +---

[PATCH 5/7] nfsd: remove unnecessary positive-dentry check

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" <bfie...@redhat.com> vfs_{create,mkdir,mknod} each begin with a call to may_create(), which returns EEXIST if the object already exists. This check is therefore unnecessary. (In the NFSv2 case, nfsd_proc_create also has such a check. Contrary to RFC 1094

[PATCH 7/7] nfsd: drop unnecessary MAY_EXEC check from create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" We need an fh_verify to make sure we at least have a dentry, but actual permission checks happen later. Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4proc.c | 7 +-- fs/nfsd/vfs.c | 6 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff

[PATCH 5/7] nfsd: remove unnecessary positive-dentry check

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" vfs_{create,mkdir,mknod} each begin with a call to may_create(), which returns EEXIST if the object already exists. This check is therefore unnecessary. (In the NFSv2 case, nfsd_proc_create also has such a check. Contrary to RFC 1094, our code seems

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" <bfie...@redhat.com> On Fri, Jul 22, 2016 at 11:13:20AM -0400, Oleg Drokin wrote: > Hm, in fact indeed. I was just too worked up about the client side, > but on the server side there was a real lookup already, so it does > look workable. So I

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" On Fri, Jul 22, 2016 at 11:13:20AM -0400, Oleg Drokin wrote: > Hm, in fact indeed. I was just too worked up about the client side, > but on the server side there was a real lookup already, so it does > look workable. So I end up with the following.

[PATCH 6/7] nfsd: clean up bad-type check in nfsd_create_locked

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" <bfie...@redhat.com> Minor cleanup, no change in behavior. Signed-off-by: J. Bruce Fields <bfie...@redhat.com> --- fs/nfsd/vfs.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index d45b

[PATCH 6/7] nfsd: clean up bad-type check in nfsd_create_locked

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" Minor cleanup, no change in behavior. Signed-off-by: J. Bruce Fields --- fs/nfsd/vfs.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index d45b39b408a1..cd06c6511cfc 100644 --- a/fs/nfsd/vfs.

[PATCH 1/7] nfsd: Make creates return EEXIST instead of EACCES

2016-07-22 Thread J. Bruce Fields
entry there is cached in the local cache or not. Another positive side effect is certain programs only expect EEXIST in that case even despite POSIX allowing any valid error to be returned. Signed-off-by: Oleg Drokin <gr...@linuxhacker.ru> Signed-off-by: J. Bruce Fields <bfie...@redhat.co

[PATCH 1/7] nfsd: Make creates return EEXIST instead of EACCES

2016-07-22 Thread J. Bruce Fields
in the local cache or not. Another positive side effect is certain programs only expect EEXIST in that case even despite POSIX allowing any valid error to be returned. Signed-off-by: Oleg Drokin Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4proc.c | 6 +- fs/nfsd/vfs.c | 11 ++- 2 files

[PATCH 2/7] nfsd: remove redundant zero-length check from create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" <bfie...@redhat.com> lookup_one_len already has this check. The only effect of this patch is to return access instead of perm in the 0-length-filename case. I actually prefer nfserr_perm (or _inval?), but I doubt anyone cares. The isdotent check see

[PATCH 2/7] nfsd: remove redundant zero-length check from create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" lookup_one_len already has this check. The only effect of this patch is to return access instead of perm in the 0-length-filename case. I actually prefer nfserr_perm (or _inval?), but I doubt anyone cares. The isdotent check seems redundant too, but I worry

[PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" <bfie...@redhat.com> I'm not sure why this was added. It doesn't seem necessary, and no other caller does this. Signed-off-by: J. Bruce Fields <bfie...@redhat.com> --- fs/nfsd/vfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/nfsd

[PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" I'm not sure why this was added. It doesn't seem necessary, and no other caller does this. Signed-off-by: J. Bruce Fields --- fs/nfsd/vfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index fba8e7e521e0..7ae3b5a72

[PATCH 4/7] nfsd: reorganize nfsd_create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" <bfie...@redhat.com> There's some odd logic in nfsd_create() that allows it to be called with the parent directory either locked or unlocked. The only already-locked caller is NFSv2's nfsd_proc_create(). It's less confusing to split out the unlocked case

[PATCH 4/7] nfsd: reorganize nfsd_create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" There's some odd logic in nfsd_create() that allows it to be called with the parent directory either locked or unlocked. The only already-locked caller is NFSv2's nfsd_proc_create(). It's less confusing to split out the unlocked case into a separate func

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-22 Thread J. Bruce Fields
On Fri, Jul 22, 2016 at 02:35:26AM -0400, Oleg Drokin wrote: > > On Jul 21, 2016, at 9:57 PM, J. Bruce Fields wrote: > > > On Thu, Jul 21, 2016 at 04:37:40PM -0400, Oleg Drokin wrote: > >> > >> On Jul 21, 2016, at 4:34 PM, J. Bruce Fields wrote: > >>

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-22 Thread J. Bruce Fields
On Fri, Jul 22, 2016 at 02:35:26AM -0400, Oleg Drokin wrote: > > On Jul 21, 2016, at 9:57 PM, J. Bruce Fields wrote: > > > On Thu, Jul 21, 2016 at 04:37:40PM -0400, Oleg Drokin wrote: > >> > >> On Jul 21, 2016, at 4:34 PM, J. Bruce Fields wrote: > >>

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-21 Thread J. Bruce Fields
On Thu, Jul 21, 2016 at 04:37:40PM -0400, Oleg Drokin wrote: > > On Jul 21, 2016, at 4:34 PM, J. Bruce Fields wrote: > > > On Fri, Jul 08, 2016 at 05:53:19PM -0400, Oleg Drokin wrote: > >> > >> On Jul 8, 2016, at 4:54 PM, J. Bruce Fields wrote: > >>

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-21 Thread J. Bruce Fields
On Thu, Jul 21, 2016 at 04:37:40PM -0400, Oleg Drokin wrote: > > On Jul 21, 2016, at 4:34 PM, J. Bruce Fields wrote: > > > On Fri, Jul 08, 2016 at 05:53:19PM -0400, Oleg Drokin wrote: > >> > >> On Jul 8, 2016, at 4:54 PM, J. Bruce Fields wrote: > >>

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-21 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 05:53:19PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 4:54 PM, J. Bruce Fields wrote: > > > On Thu, Jul 07, 2016 at 09:47:46PM -0400, Oleg Drokin wrote: > >> It looks like we are bit overzealous about failing mkdir/create/mknod >

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-21 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 05:53:19PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 4:54 PM, J. Bruce Fields wrote: > > > On Thu, Jul 07, 2016 at 09:47:46PM -0400, Oleg Drokin wrote: > >> It looks like we are bit overzealous about failing mkdir/create/mknod >

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 04:46:14PM +0200, Miklos Szeredi wrote: > On Tue, Jul 19, 2016 at 4:01 PM, J. Bruce Fields <bfie...@fieldses.org> wrote: > > On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > >> This patch allows flock, posix locks, ofd

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 04:46:14PM +0200, Miklos Szeredi wrote: > On Tue, Jul 19, 2016 at 4:01 PM, J. Bruce Fields wrote: > > On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > >> This patch allows flock, posix locks, ofd locks and leases to work > >

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > This patch allows flock, posix locks, ofd locks and leases to work > correctly on overlayfs. > > Instead of using the underlying inode for storing lock context use the > overlay inode. This allows locks to be persistent across

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > This patch allows flock, posix locks, ofd locks and leases to work > correctly on overlayfs. > > Instead of using the underlying inode for storing lock context use the > overlay inode. This allows locks to be persistent across

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-13 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 11:41:41PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 11:10 PM, Al Viro wrote: > > > On Fri, Jul 08, 2016 at 05:47:22PM -0400, Oleg Drokin wrote: > > > >> I wonder if people just accept that "NFS is just weird" and code in > >> workarounds, > >> where as with

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-13 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 11:41:41PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 11:10 PM, Al Viro wrote: > > > On Fri, Jul 08, 2016 at 05:47:22PM -0400, Oleg Drokin wrote: > > > >> I wonder if people just accept that "NFS is just weird" and code in > >> workarounds, > >> where as with

Re: [PATCH v23 17/22] richacl: Automatic Inheritance

2016-07-12 Thread J. Bruce Fields
On Tue, Jul 12, 2016 at 07:56:00AM -0400, Jeff Layton wrote: > On Thu, 2016-06-30 at 15:47 +0200, Andreas Gruenbacher wrote: > > Automatic Inheritance (AI) allows changes to the acl of a directory to > > propagate down to children. > > > > This is mostly implemented in user space: when a process

Re: [PATCH v23 17/22] richacl: Automatic Inheritance

2016-07-12 Thread J. Bruce Fields
On Tue, Jul 12, 2016 at 07:56:00AM -0400, Jeff Layton wrote: > On Thu, 2016-06-30 at 15:47 +0200, Andreas Gruenbacher wrote: > > Automatic Inheritance (AI) allows changes to the acl of a directory to > > propagate down to children. > > > > This is mostly implemented in user space: when a process

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Thu, Jul 07, 2016 at 09:47:46PM -0400, Oleg Drokin wrote: > It looks like we are bit overzealous about failing mkdir/create/mknod > with permission denied if the parent dir is not writeable. > Need to make sure the name does not exist first, because we need to > return EEXIST in that case. > >

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Thu, Jul 07, 2016 at 09:47:46PM -0400, Oleg Drokin wrote: > It looks like we are bit overzealous about failing mkdir/create/mknod > with permission denied if the parent dir is not writeable. > Need to make sure the name does not exist first, because we need to > return EEXIST in that case. > >

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 12:16:14PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 12:04 PM, J. Bruce Fields wrote: > > > On Fri, Jul 08, 2016 at 11:53:28AM -0400, Jeff Layton wrote: > >> On Fri, 2016-07-08 at 11:14 -0400, Oleg Drokin wrote: > >>> On Jul 8,

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 12:16:14PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 12:04 PM, J. Bruce Fields wrote: > > > On Fri, Jul 08, 2016 at 11:53:28AM -0400, Jeff Layton wrote: > >> On Fri, 2016-07-08 at 11:14 -0400, Oleg Drokin wrote: > >>> On Jul 8,

Re: [PATCH] nfsd: Correct a comment for NFSD_MAY_ defines location

2016-07-08 Thread J. Bruce Fields
Thanks, applied.--b. On Fri, Jul 08, 2016 at 06:45:31AM -0400, Jeff Layton wrote: > On Thu, 2016-07-07 at 21:49 -0400, Oleg Drokin wrote: > > Those are now defined in fs/nfsd/vfs.h > > > > Signed-off-by: Oleg Drokin > > --- > >  fs/nfsd/nfsfh.c | 2 +- > >  1 file changed,

Re: [PATCH] nfsd: Correct a comment for NFSD_MAY_ defines location

2016-07-08 Thread J. Bruce Fields
Thanks, applied.--b. On Fri, Jul 08, 2016 at 06:45:31AM -0400, Jeff Layton wrote: > On Thu, 2016-07-07 at 21:49 -0400, Oleg Drokin wrote: > > Those are now defined in fs/nfsd/vfs.h > > > > Signed-off-by: Oleg Drokin > > --- > >  fs/nfsd/nfsfh.c | 2 +- > >  1 file changed, 1 insertion(+), 1

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 11:53:28AM -0400, Jeff Layton wrote: > On Fri, 2016-07-08 at 11:14 -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 7:02 AM, Jeff Layton wrote: > > > > > On Thu, 2016-07-07 at 21:47 -0400, Oleg Drokin wrote: > > > > It looks like we are bit overzealous about failing

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 11:53:28AM -0400, Jeff Layton wrote: > On Fri, 2016-07-08 at 11:14 -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 7:02 AM, Jeff Layton wrote: > > > > > On Thu, 2016-07-07 at 21:47 -0400, Oleg Drokin wrote: > > > > It looks like we are bit overzealous about failing

Re: [PATCH 2/2] nfsd: remove extraneous KERN_INFO prefix

2016-07-06 Thread J. Bruce Fields
Thanks, applying both patches.--b. On Sat, Jul 02, 2016 at 08:24:48AM +0200, Christophe JAILLET wrote: > smatch complains about using KERN_INFO as a prefix when calling dprintk > > Signed-off-by: Christophe JAILLET > --- > fs/nfsd/nfs4state.c | 2 +- > 1 file

Re: [PATCH 2/2] nfsd: remove extraneous KERN_INFO prefix

2016-07-06 Thread J. Bruce Fields
Thanks, applying both patches.--b. On Sat, Jul 02, 2016 at 08:24:48AM +0200, Christophe JAILLET wrote: > smatch complains about using KERN_INFO as a prefix when calling dprintk > > Signed-off-by: Christophe JAILLET > --- > fs/nfsd/nfs4state.c | 2 +- > 1 file changed, 1 insertion(+), 1

[GIT PULL] lockd/locks bugfixes for 4.7

2016-07-01 Thread J. Bruce Fields
Please pull from: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.7-3 One fix for lockd soft lookups in an error path, and one fix for file leases on overlayfs.

[GIT PULL] lockd/locks bugfixes for 4.7

2016-07-01 Thread J. Bruce Fields
Please pull from: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.7-3 One fix for lockd soft lookups in an error path, and one fix for file leases on overlayfs.

Re: [PATCH] locks: use file_inode()

2016-07-01 Thread J. Bruce Fields
<eg...@redhat.com> > > Signed-off-by: Miklos Szeredi <mszer...@redhat.com> > > Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay > > and f_inode to the underlay") > > Cc: <sta...@vger.kernel.org> > > Cc: Jeff Lay

Re: [PATCH] locks: use file_inode()

2016-07-01 Thread J. Bruce Fields
n > > Signed-off-by: Miklos Szeredi > > Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay > > and f_inode to the underlay") > > Cc: > > Cc: Jeff Layton > > Cc: "J. Bruce Fields" > > --- > >  fs/locks.c |

[GIT PULL] bugfixes for 4.7

2016-06-24 Thread J. Bruce Fields
Please pull the following nfsd changes from the nfsd-4.7-2 tag at: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.7-2 --b. Fix missing server-side permission checks on setting NFS ACLs.

[GIT PULL] bugfixes for 4.7

2016-06-24 Thread J. Bruce Fields
Please pull the following nfsd changes from the nfsd-4.7-2 tag at: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.7-2 --b. Fix missing server-side permission checks on setting NFS ACLs.

Re: [svcrpc] 12e5cf2d75: BUG: unable to handle kernel NULL pointer dereference at 0000000000000014

2016-06-17 Thread J. Bruce Fields
On Fri, Jun 17, 2016 at 02:09:32PM +0800, kernel test robot wrote: > > FYI, we noticed the following commit: Yes, that patch was obviously just wrong, I'm not sure how it was passing my own tests. Anyway, dropped, thanks. --b. > > https://github.com/0day-ci/linux >

Re: [svcrpc] 12e5cf2d75: BUG: unable to handle kernel NULL pointer dereference at 0000000000000014

2016-06-17 Thread J. Bruce Fields
On Fri, Jun 17, 2016 at 02:09:32PM +0800, kernel test robot wrote: > > FYI, we noticed the following commit: Yes, that patch was obviously just wrong, I'm not sure how it was passing my own tests. Anyway, dropped, thanks. --b. > > https://github.com/0day-ci/linux >

[GIT PULL] nfsd bugfixes for 4.7

2016-06-16 Thread J. Bruce Fields
. Geert Uytterhoeven (1): nfsd: Fix NFSD_MDS_PR_KEY on 32-bit by adding ULL postfix J. Bruce Fields (3): SUNRPC: fix xprt leak on xps allocation failure nfsd4/rpc: move backchannel create logic into rpc code rpc: share one xps between all backchannels Oleg Drokin

[GIT PULL] nfsd bugfixes for 4.7

2016-06-16 Thread J. Bruce Fields
. Geert Uytterhoeven (1): nfsd: Fix NFSD_MDS_PR_KEY on 32-bit by adding ULL postfix J. Bruce Fields (3): SUNRPC: fix xprt leak on xps allocation failure nfsd4/rpc: move backchannel create logic into rpc code rpc: share one xps between all backchannels Oleg Drokin

Re: [PATCH 0/3] nfsd state handling fixes

2016-06-15 Thread J . Bruce Fields
On Wed, Jun 15, 2016 at 09:54:28PM -0400, Oleg Drokin wrote: > > On Jun 14, 2016, at 11:28 PM, Oleg Drokin wrote: > > > These three patches do the much discussed job of making nfsd state handling > > more robust in face of races where several opens arrive for the same file > > at the same time

Re: [PATCH 0/3] nfsd state handling fixes

2016-06-15 Thread J . Bruce Fields
On Wed, Jun 15, 2016 at 09:54:28PM -0400, Oleg Drokin wrote: > > On Jun 14, 2016, at 11:28 PM, Oleg Drokin wrote: > > > These three patches do the much discussed job of making nfsd state handling > > more robust in face of races where several opens arrive for the same file > > at the same time

<    2   3   4   5   6   7   8   9   10   11   >