linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [git pull] vfs.git - dcache and mountpoint stuff
Date: Sat, 20 Jul 2019 04:02:18 +0100	[thread overview]
Message-ID: <20190720030217.GC17978@ZenIV.linux.org.uk> (raw)

	Saner handling of refcounts to mountpoints.
Transfer the counting reference from struct mount ->mnt_mountpoint
over to struct mountpoint ->m_dentry.  That allows to get rid of
the convoluted games with ordering of mount shutdowns.  The cost
is in teaching shrink_dcache_{parent,for_umount} to cope with
mixed-filesystem shrink lists, which we'll also need for the Slab
Movable Objects patchset.

	I'm not sure what's the best way to do that pull request;
there are two branches with identical (modulo one space in comment)
contents.  The former (#work.dcache) sat in -next; the latter (#work.dcache2)
has the last commit of the former split and folded.  Said last commit is
basically what you'd asked to change - comment for locking of ex_mountpoints,
separating the default variant of put_namespace() from "save to this
list" one, having the former explicitly pass &ex_mountpoints to the
latter, comment updates.

	Conservative approach would be to pull #work.dcache, but...
consider e.g. put_mountpoint() changes in work.dcache: in the middle of
the series we have
-static void put_mountpoint(struct mountpoint *mp)
+static void put_mountpoint(struct mountpoint *mp, struct list_head *list)
...
+               if (!list)
+                       list = &ex_mountpoints;
+               dput_to_list(dentry, list);
with corresponding callers' updates (all but one passing NULL).  In this
last commit it becomes
static void __put_mountpoint(struct mountpoint *mp, struct list_head *list)
with if (!list) part gone and
+static void put_mountpoint(struct mountpoint *mp)
+{
+       __put_mountpoint(mp, &ex_mountpoints);
+}
with callers reverted to the original state.  IOW, pointless noise.
And
-static LIST_HEAD(ex_mountpoints);
+static LIST_HEAD(ex_mountpoints); /* protected by namespace_sem */
is better folded into the into the commit introducing the list.

	IOW, if you are OK with pulling #work.dcache2, it would, IMO, be
better.  Below is the pull request for it; the variant for #work.dcache
would differ in having 9 commits instead of 8.  Up to you...

The following changes since commit 570d7a98e7d6d5d8706d94ffd2d40adeaa318332:

  vfs: move_mount: reject moving kernel internal mounts (2019-07-01 10:46:36 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.dcache2

for you to fetch changes up to 56cbb429d911991170fe867b4bba14f0efed5829:

  switch the remnants of releasing the mountpoint away from fs_pin (2019-07-16 22:52:37 -0400)

----------------------------------------------------------------
Al Viro (8):
      ceph: don't open-code the check for dead lockref
      nfs: dget_parent() never returns NULL
      __detach_mounts(): lookup_mountpoint() can't return ERR_PTR() anymore
      fs/namespace.c: shift put_mountpoint() to callers of unhash_mnt()
      Teach shrink_dcache_parent() to cope with mixed-filesystem shrink lists
      make struct mountpoint bear the dentry reference to mountpoint, not struct mount
      get rid of detach_mnt()
      switch the remnants of releasing the mountpoint away from fs_pin

 fs/ceph/dir.c          |   2 +-
 fs/dcache.c            | 100 +++++++++++++++++++++++++------
 fs/fs_pin.c            |  10 +---
 fs/internal.h          |   2 +
 fs/mount.h             |   8 ++-
 fs/namespace.c         | 159 ++++++++++++++++++++++++-------------------------
 fs/nfs/super.c         |   6 +-
 include/linux/fs_pin.h |   1 -
 8 files changed, 172 insertions(+), 116 deletions(-)

             reply	other threads:[~2019-07-20  3:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-20  3:02 Al Viro [this message]
2019-07-20 18:40 ` [git pull] vfs.git - dcache and mountpoint stuff pr-tracker-bot

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=20190720030217.GC17978@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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).