Skip to content

assorted dcache cleanups and fixes

Al Viro linux-fsdevel 2 versions – Merged

Status from this message: has been merged into torvalds/linux.git:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest22 patches 1 replyMerged
  2. v1 RFC25 patches 27 repliesSuperseded

Changes in v2 from the cover letter

* rebased to -rc6
* s/__dget_alias_careful/dget_alias_locked/, as suggested by Linus
* fixed a braino in 9/22 (dentry_free() belongs after dropping ->d_lock)
* first 4 "reducing rcu_read_lock() scopes..." commits consolidated into
a single step; replacement patch as posted back on May 7, with some comments added.

Patches in v2 Merged

#Subject and filesSizeRepliesApplied
1/22VFS: use wait_var_event for waiting in d_alloc_parallel()Documentation/filesystems/porting.rst fs/afs/dir_silly.c fs/dcache.c +9 more+67 -650 replies
2/22alloc_path_pseudo(): make sure we don't end up with NORCU dentries for directoriesfs/file_table.c+2 -00 replies
3/22fix a race between d_find_any_alias() and final dput() of NORCU dentriesfs/dcache.c include/linux/dcache.h+36 -30 replies
4/22find_acceptable_alias(): skip NORCU aliases with zero refcountfs/exportfs/expfs.c+4 -50 replies
5/22select_collect(): ignore dentries on shrink lists if they have positive refcountsfs/dcache.c+1 -30 replies
6/22make to_shrink_list() return whether it has moved dentry to listfs/dcache.c+9 -140 replies
7/22kill d_dispose_if_unused()Documentation/filesystems/porting.rst fs/dcache.c fs/fuse/dir.c +1 more+40 -260 replies
8/22d_prune_aliases(): make sure to skip NORCU aliasesfs/dcache.c+2 -10 replies
9/22shrink_dentry_list(): start with removing from shrink listfs/dcache.c+9 -90 replies
10/22fold lock_for_kill() into shrink_kill()fs/dcache.c+7 -160 replies
11/22fold lock_for_kill() and __dentry_kill() into common helperfs/dcache.c+13 -150 replies
12/22simplify safety for lock_for_kill() slowpathfs/dcache.c+33 -160 replies
13/22Shift rcu_read_{,un}lock() inside fast_dput()fs/dcache.c+14 -160 replies
14/22Document rcu_read_lock() use in select_collect2()fs/dcache.c+21 -10 replies
15/22adjust calling conventions of lock_for_kill(), fold __dentry_kill() into dentry_kill()fs/dcache.c+54 -580 replies
16/22document dentry_kill()fs/dcache.c+38 -00 replies
17/22d_walk(): shrink rcu_read_lock() scopefs/dcache.c+2 -40 replies
18/22shrinking rcu_read_lock() scope in d_alloc_parallel()fs/dcache.c+12 -170 replies
19/22shrink_dentry_tree(): unify the calls of shrink_dentry_list()fs/dcache.c+17 -170 replies
20/22wind ->s_roots via ->d_sib instead of ->d_hashfs/dcache.c fs/super.c include/linux/fs/super_types.h+50 -190 replies
21/22nfs: get rid of fake root dentriesfs/dcache.c fs/nfs/getroot.c+4 -390 replies
22/22make cursors NORCUfs/dcache.c+3 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/22] assorted dcache cleanups and fixes

Changes since v1:
* rebased to -rc6
* s/__dget_alias_careful/dget_alias_locked/, as suggested by Linus
* fixed a braino in 9/22 (dentry_free() belongs after dropping ->d_lock)
* first 4 "reducing rcu_read_lock() scopes..." commits consolidated into
a single step; replacement patch as posted back on May 7, with some comments added.

Currently that stuff lives in
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #work.dcache individual patches in followups.

Please, review. It survives the local beating; more testing would be welcome. If nobody has problems with it, I'm going to put it into #for-next in a few days.

Al Viro (21):
alloc_path_pseudo(): make sure we don't end up with NORCU dentries for
directories
fix a race between d_find_any_alias() and final dput() of NORCU
dentries
find_acceptable_alias(): skip NORCU aliases with zero refcount select_collect(): ignore dentries on shrink lists if they have
positive refcounts
make to_shrink_list() return whether it has moved dentry to list kill d_dispose_if_unused()
d_prune_aliases(): make sure to skip NORCU aliases shrink_dentry_list(): start with removing from shrink list fold lock_for_kill() into shrink_kill()
fold lock_for_kill() and __dentry_kill() into common helper simplify safety for lock_for_kill() slowpath
Shift rcu_read_{,un}lock() inside fast_dput()
Document rcu_read_lock() use in select_collect2()
adjust calling conventions of lock_for_kill(), fold __dentry_kill()
into dentry_kill()
document dentry_kill()
d_walk(): shrink rcu_read_lock() scope
shrinking rcu_read_lock() scope in d_alloc_parallel() shrink_dentry_tree(): unify the calls of shrink_dentry_list() wind ->s_roots via ->d_sib instead of ->d_hash
nfs: get rid of fake root dentries
make cursors NORCU

NeilBrown (1):
VFS: use wait_var_event for waiting in d_alloc_parallel()

 Documentation/filesystems/porting.rst |  17 +
 fs/afs/dir_silly.c                    |   4 +-
 fs/dcache.c                           | 549 +++++++++++++++-----------
 fs/exportfs/expfs.c                   |   9 +-
 fs/file_table.c                       |   2 +
 fs/fuse/dir.c                         |   2 +-
 fs/fuse/readdir.c                     |   3 +-
 fs/namei.c                            |   6 +-
 fs/nfs/dir.c                          |   6 +-
 fs/nfs/getroot.c                      |  35 +-
 fs/nfs/unlink.c                       |   3 +-
 fs/proc/base.c                        |   3 +-
 fs/proc/proc_sysctl.c                 |   3 +-
 fs/smb/client/readdir.c               |   3 +-
 fs/super.c                            |   1 +
 include/linux/dcache.h                |  31 +-
 include/linux/fs/super_types.h        |   3 +-
 include/linux/nfs_xdr.h               |   1 -
 18 files changed, 387 insertions(+), 294 deletions(-)
Signature · 1 line
2.47.3