linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: Jeff Layton <jlayton@poochiereds.net>,
	bfields@fieldses.org, Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/2 v5] Fixups for l_pid
Date: Mon, 19 Jun 2017 09:24:05 -0400	[thread overview]
Message-ID: <cover.1497877897.git.bcodding@redhat.com> (raw)

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.


Benjamin Coddington (2):
  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

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

-- 
2.9.3

             reply	other threads:[~2017-06-19 13:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 13:24 Benjamin Coddington [this message]
2017-06-19 13:24 ` [PATCH 1/2] fs/locks: Use allocation rather than the stack in fcntl_getlk() Benjamin Coddington
2017-06-19 13:24 ` [PATCH 2/2] fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks Benjamin Coddington
2017-06-19 17:32   ` Jeff Layton
2017-06-20 14:03     ` Benjamin Coddington
2017-06-20 16:09       ` Benjamin Coddington
2017-06-20 17:06         ` Jeff Layton
2017-06-20 19:17           ` Benjamin Coddington
2017-06-20 19:32             ` Jeff Layton
2017-06-20 19:39               ` Benjamin Coddington
2017-06-20 20:13                 ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1497877897.git.bcodding@redhat.com \
    --to=bcodding@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=jlayton@poochiereds.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).