mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Fix stat() family ping/pong on expiring autofs mounts
@ 2020-03-31  0:54 Ian Kent
  2020-03-31  0:54 ` [PATCH v2 1/4] autofs: dont call do_expire_wait() in autofs_d_manage() Ian Kent
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Kent @ 2020-03-31  0:54 UTC (permalink / raw)
  To: Al Viro; +Cc: autofs mailing list, linux-fsdevel, Kernel Mailing List

This patch series is meant to fix a case were a stat() family system
call is being done at the same time a mount point dentry is being
expired.

When this happens it results in a ping/pong of returning the stat() of
the mounted file system and stat() of the autofs file system.

What needs to be done here is ensure a consistent stat() return based
on the state of the mount at the time.

There are actually a number of cases and, unavoidably, there remains
inconsistency because stat family system calls are not meant to trigger
mounts to avoid mount storms. So they will still return the stat of the
autofs file system if not mounted and the stat of the mounted file
system if they are, including if they are being expired at the time of
the stat() call.

Some of these patches are based on other work that I'm doing as a
result of our recent discussions on the autofs kernel module. For
example the removal do_expire_wait() from autofs_d_manage() and
simplifying the called functions. And the last patch which adds
comments about cases of the autofs_mountpoint_changed() function.
In fact, as you though, there's not much left in autofs_d_manage()
in the endi. 

But I'm not finished with the series yet and I need to get this bug 
fixed.

Changes since v1.
- fix several grammatical mistakes.

---

Ian Kent (4):
      autofs: dont call do_expire_wait() in autofs_d_manage()
      autofs: remove rcu_walk parameter from autofs_expire_wait()
      vfs: check for autofs expiring dentry in follow_automount()
      autofs: add comment about autofs_mountpoint_changed()


 fs/autofs/autofs_i.h  |    2 +-
 fs/autofs/dev-ioctl.c |    2 +-
 fs/autofs/expire.c    |    5 +---
 fs/autofs/root.c      |   58 ++++++++++++++++++++++++++++++++-----------------
 fs/namei.c            |   13 +++++++++--
 5 files changed, 52 insertions(+), 28 deletions(-)

--
Ian

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

end of thread, other threads:[~2020-03-31  0:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31  0:54 [PATCH v2 0/4] Fix stat() family ping/pong on expiring autofs mounts Ian Kent
2020-03-31  0:54 ` [PATCH v2 1/4] autofs: dont call do_expire_wait() in autofs_d_manage() Ian Kent
2020-03-31  0:54 ` [PATCH v2 2/4] autofs: remove rcu_walk parameter from autofs_expire_wait() Ian Kent
2020-03-31  0:54 ` [PATCH v2 3/4] vfs: check for autofs expiring dentry in follow_automount() Ian Kent
2020-03-31  0:54 ` [PATCH v2 4/4] autofs: add comment about autofs_mountpoint_changed() Ian Kent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®