mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/7] Do not dentry_unhash() in VFS
@ 2011-03-30 22:09 Sage Weil
  2011-03-30 22:09 ` [PATCH 1/7] vfs: dentry_unhash immediately prior to rmdir Sage Weil
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Sage Weil @ 2011-03-30 22:09 UTC (permalink / raw)
  To: viro, linux-fsdevel; +Cc: linux-kernel, mszeredi, Sage Weil

Hi Al, everyone,

For the most part the VFS does not hash or unhash dentries outside of 
dcache pruning.  This is left to the file system namespace methods.  The 
only exception is on rmdir and directory rename, where we call 
dentry_unhash() for the benefit of a few file systems that can't handle 
lingering references to the empty and unlinked directory.

This patchset aims to clean this up by pushing the dentry_unhash calls 
into each fs where they can be safely removed on a per-fs basis.  We 
also take this opportunity to finally fix a longstanding bug in 
vfs_rename_dir() which rehashes new_dentry (Miklos' patch, see
        http://marc.info/?l=linux-fsdevel&m=121666695328987&w=2
        http://marc.info/?t=121580579500004&r=1&w=2
).

On a per-fs basis, the dentry_unhash calls can be replaced with 
shrink_dcache_parent (or dropped entirely) if it is safe to do so.  I 
expect that this is safe for most of them.

My hope is that this will move us closer to being able to introduce a 
->d_prune d_op.  Independent of that, however, I think this is a 
worthwhile dcache cleanup.

Thanks!
sage



Miklos Szeredi (1):
  vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOVE filesystems

Sage Weil (6):
  vfs: dentry_unhash immediately prior to rmdir
  vfs: remove dget() from dentry_unhash()
  vfs: push dentry_unhash on rmdir into file systems
  vfs: push dentry_unhash on rename_dir into file systems
  vfs: update dentry_unhash() comment
  libfs: drop unneeded dentry_unhash

 fs/9p/vfs_inode.c       |    4 ++++
 fs/affs/namei.c         |    5 +++++
 fs/afs/dir.c            |    5 +++++
 fs/autofs4/root.c       |    2 ++
 fs/bfs/dir.c            |    3 +++
 fs/btrfs/inode.c        |    5 +++++
 fs/ceph/dir.c           |    6 ++++++
 fs/cifs/inode.c         |    5 +++++
 fs/coda/dir.c           |    5 +++++
 fs/configfs/dir.c       |    2 ++
 fs/ecryptfs/inode.c     |    5 +++++
 fs/exofs/namei.c        |    5 +++++
 fs/ext2/namei.c         |    5 +++++
 fs/ext3/namei.c         |    5 +++++
 fs/ext4/namei.c         |    5 +++++
 fs/fat/namei_msdos.c    |    5 +++++
 fs/fat/namei_vfat.c     |    5 +++++
 fs/fuse/dir.c           |    6 ++++++
 fs/gfs2/ops_inode.c     |    5 +++++
 fs/hfs/dir.c            |    6 ++++++
 fs/hfsplus/dir.c        |    2 ++
 fs/hostfs/hostfs_kern.c |    5 +++++
 fs/hpfs/namei.c         |    9 ++++++---
 fs/jffs2/dir.c          |    5 +++++
 fs/jfs/namei.c          |    5 +++++
 fs/libfs.c              |    4 ++++
 fs/logfs/dir.c          |    5 +++++
 fs/minix/namei.c        |    5 +++++
 fs/namei.c              |   21 ++++++---------------
 fs/ncpfs/dir.c          |    5 +++++
 fs/nfs/dir.c            |    5 +++++
 fs/nilfs2/namei.c       |    5 +++++
 fs/ocfs2/namei.c        |    6 ++++++
 fs/omfs/dir.c           |    5 +++++
 fs/reiserfs/namei.c     |    5 +++++
 fs/reiserfs/xattr.c     |    1 -
 fs/sysv/namei.c         |    5 +++++
 fs/ubifs/dir.c          |    5 +++++
 fs/udf/namei.c          |    5 +++++
 fs/ufs/namei.c          |    5 +++++
 40 files changed, 188 insertions(+), 19 deletions(-)


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

end of thread, other threads:[~2011-03-31  4:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 22:09 [PATCH 0/7] Do not dentry_unhash() in VFS Sage Weil
2011-03-30 22:09 ` [PATCH 1/7] vfs: dentry_unhash immediately prior to rmdir Sage Weil
2011-03-30 22:09 ` [PATCH 2/7] vfs: remove dget() from dentry_unhash() Sage Weil
2011-03-30 22:09 ` [PATCH 3/7] vfs: push dentry_unhash on rmdir into file systems Sage Weil
2011-03-30 22:09 ` [PATCH 4/7] vfs: push dentry_unhash on rename_dir " Sage Weil
2011-03-31  3:09   ` Dave Chinner
2011-03-31  4:40     ` Sage Weil
2011-03-30 22:09 ` [PATCH 5/7] vfs: update dentry_unhash() comment Sage Weil
2011-03-30 22:09 ` [PATCH 6/7] libfs: drop unneeded dentry_unhash Sage Weil
2011-03-30 22:09 ` [PATCH 7/7] vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOVE filesystems Sage Weil

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®