All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3 v6] Fixups for l_pid
@ 2017-06-27 15:18 ` Benjamin Coddington
  0 siblings, 0 replies; 23+ messages in thread
From: Benjamin Coddington @ 2017-06-27 15:18 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, James Simmons, Greg Kroah-Hartman,
	Eric Van Hensbergen, Ron Minnich, Latchesar Ionkov, Yan, Zheng,
	Sage Weil, Ilya Dryomov, Steve French, Christine Caulfield,
	David Teigland, Miklos Szeredi, Alexander Viro, Jeff Layton,
	J. Bruce Fields, Vitaly Fertman, John L. Hammond, Andriy Skulysh,
	Benjamin Coddington, Emoly Liu
  Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	cluster-devel-H+wXaHxf7aLQT0dZR+AlfA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	v9fs-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	ceph-devel-u79uwXL29TY76Z2rM5mHXA,
	lustre-devel-aLEFhgZF4x6X6Mz3xDxJMA

LTP fcntl tests (fcntl11 fcntl14 fcntl17 fcntl19 fcntl20 fcntl21) have been
failing for NFSv4 mounts due to an unexpected l_pid.  What follows are some
fixups:

v2: - Rebase onto linux-next
    - Revert back to using the stack in locks_mandatory_area(), and fixup
	patch description for 1/3

v3: - The lkp-robot found some serious per_thread_ops performance
	regressions for v1 and v2, so this version changes things around to not
	acquire a reference to struct pid in fl_nspid for every lock.  Instead,
	it drops fl_nspid altogether, and defers the lookup of the
	namespace-translated pid until it actually needed.

v4: - Instead of looking up the virtual pid by way of referencing the struct
	task of the that pid, instead use find_pid_ns() and pid_nr_ns(), which
	avoids a the problem where we race to get a reference to the struct task
	while it may be freed.

v5: - Squash previous 2/3 and 3/3 to avoid regression where F_GETLK would
	return the init_ns pid instead of a translated pid.

v6: - State clearly how the differing cases of l_pid translation should be
	handled, specifically regarding remote locks on remote files: that
	fl_pid ought to be returned from the filesystem as <= 0 to indicate that
	it makes no sense to translate this l_pid.
	- Follow up with a patch to have filesystems negate fl_pid for remote
	locks on remote files.

Benjamin Coddington (3):
  fs/locks: Use allocation rather than the stack in fcntl_getlk()
  fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks
  staging/lustre, 9p, ceph, cifs, dlm: negate remote pids for F_GETLK

 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c |   2 +-
 fs/9p/vfs_file.c                                |   2 +-
 fs/ceph/locks.c                                 |   2 +-
 fs/cifs/cifssmb.c                               |   2 +-
 fs/dlm/plock.c                                  |   2 +-
 fs/fuse/file.c                                  |   6 +-
 fs/locks.c                                      | 108 ++++++++++++++----------
 include/linux/fs.h                              |   2 +-
 8 files changed, 72 insertions(+), 54 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH 0/3 v4] Fixups for l_pid
@ 2017-06-06 20:45 Benjamin Coddington
  2017-06-06 20:45 ` [PATCH 1/3] fs/locks: Use allocation rather than the stack in fcntl_getlk() Benjamin Coddington
  0 siblings, 1 reply; 23+ messages in thread
From: Benjamin Coddington @ 2017-06-06 20:45 UTC (permalink / raw)
  To: Jeff Layton, bfields, Alexander Viro; +Cc: linux-fsdevel, linux-kernel

LTP fcntl tests (fcntl11 fcntl14 fcntl17 fcntl19 fcntl20 fcntl21) have been
failing for NFSv4 mounts due to an unexpected l_pid.  What follows are some
fixups:

v2: - Rebase onto linux-next
    - Revert back to using the stack in locks_mandatory_area(), and fixup
	patch description for 1/3

v3: - The lkp-robot found some serious per_thread_ops performance
	regressions for v1 and v2, so this version changes things around to not
	acquire a reference to struct pid in fl_nspid for every lock.  Instead,
	it drops fl_nspid altogether, and defers the lookup of the
	namespace-translated pid until it actually needed.

v4: - Instead of looking up the virtual pid by way of referencing the struct
	task of the that pid, instead use find_pid_ns() and pid_nr_ns(), which
	avoids a the problem where we race to get a reference to the struct task
	while it may be freed.

Benjamin Coddington (3):
  fs/locks: Use allocation rather than the stack in fcntl_getlk()
  fs/locks: Remove fl_nspid
  fs/locks: Use fs-specific l_pid for remote locks

 fs/locks.c         | 116 ++++++++++++++++++++++++++++++++---------------------
 include/linux/fs.h |   2 +-
 2 files changed, 72 insertions(+), 46 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH 0/3 v3] Fixups for l_pid
@ 2017-06-06 17:19 Benjamin Coddington
  2017-06-06 17:19 ` [PATCH 1/3] fs/locks: Use allocation rather than the stack in fcntl_getlk() Benjamin Coddington
  0 siblings, 1 reply; 23+ messages in thread
From: Benjamin Coddington @ 2017-06-06 17:19 UTC (permalink / raw)
  To: Jeff Layton, bfields, Alexander Viro; +Cc: linux-fsdevel, linux-kernel

LTP fcntl tests (fcntl11 fcntl14 fcntl17 fcntl19 fcntl20 fcntl21) have been
failing for NFSv4 mounts due to an unexpected l_pid.  What follows are some
fixups:

v2: - Rebase onto linux-next
    - Revert back to using the stack in locks_mandatory_area(), and fixup
	patch description for 1/3

v3: - The lkp-robot found some serious per_thread_ops performance
	regressions for v1 and v2, so this version changes things around to not
	acquire a reference to struct pid in fl_nspid for every lock.  Instead,
	it drops fl_nspid altogether, and defers the lookup of the
	namespace-translated pid until it actually needed.

Benjamin Coddington (3):
  fs/locks: Use allocation rather than the stack in fcntl_getlk()
  fs/locks: Remove fl_nspid
  fs/locks: Use fs-specific l_pid for remote locks

 fs/locks.c         | 122 +++++++++++++++++++++++++++++++++--------------------
 include/linux/fs.h |   2 +-
 2 files changed, 78 insertions(+), 46 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-06-27 19:36 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 15:18 [PATCH 0/3 v6] Fixups for l_pid Benjamin Coddington
2017-06-27 15:18 ` [Cluster-devel] " Benjamin Coddington
2017-06-27 15:18 ` [lustre-devel] " Benjamin Coddington
2017-06-27 15:18 ` Benjamin Coddington
     [not found] ` <cover.1498572504.git.bcodding-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-06-27 15:18   ` [PATCH 1/3] fs/locks: Use allocation rather than the stack in fcntl_getlk() Benjamin Coddington
2017-06-27 15:18     ` [Cluster-devel] " Benjamin Coddington
2017-06-27 15:18     ` [lustre-devel] " Benjamin Coddington
2017-06-27 15:18     ` Benjamin Coddington
2017-06-27 15:18   ` [PATCH 3/3] staging/lustre, 9p, ceph, cifs, dlm: negate remote pids for F_GETLK Benjamin Coddington
2017-06-27 15:18     ` [Cluster-devel] " Benjamin Coddington
2017-06-27 15:18     ` [lustre-devel] " Benjamin Coddington
2017-06-27 15:18     ` Benjamin Coddington
     [not found]     ` <3154a78290017da7bbbcb920456b860dbfe9ba26.1498572504.git.bcodding-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-06-27 19:36       ` Jeff Layton
2017-06-27 19:36         ` [Cluster-devel] " Jeff Layton
2017-06-27 19:36         ` [lustre-devel] " Jeff Layton
2017-06-27 19:36         ` Jeff Layton
2017-06-27 19:36         ` Jeff Layton
2017-06-27 15:18 ` [PATCH 2/3] fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks Benjamin Coddington
2017-06-27 15:18   ` [Cluster-devel] " Benjamin Coddington
2017-06-27 15:18   ` [lustre-devel] " Benjamin Coddington
2017-06-27 15:18   ` Benjamin Coddington
  -- strict thread matches above, loose matches on Subject: below --
2017-06-06 20:45 [PATCH 0/3 v4] Fixups for l_pid Benjamin Coddington
2017-06-06 20:45 ` [PATCH 1/3] fs/locks: Use allocation rather than the stack in fcntl_getlk() Benjamin Coddington
2017-06-06 17:19 [PATCH 0/3 v3] Fixups for l_pid Benjamin Coddington
2017-06-06 17:19 ` [PATCH 1/3] fs/locks: Use allocation rather than the stack in fcntl_getlk() Benjamin Coddington

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.