-
- Downloads
vfs: change the approach of releasing dentries during unmount
Currently, vflush is used in the unmount process to release remaining dentries. vflush in turn calls vevict that is releasing dentries that it doesn't own. This behavior is not correct neither good to the future of VFS. So Avi suggested switching to a different approach. We could only release those dentries owned by the mountpoint when unmounting it as there wouldn't be anything else in the dcache (given its functionality). The problem was fixed by doing the following steps: - Drop vflush calls in sys_umount2, make vevict an empty function, and remove vevict. - Created the function release_mp_dentries to release dentries of a mount point which will be called by VFS_UNMOUNT. It cannot be called before VFS_UNMOUNT as failures must be considered, neither after as the mount point would be considered busy. Don't respect this "rule", and that previously seen ZFS replay transaction error would happen. NOTE: vflush is currently duplicated in zfs unmount cases to address the problem above. This patch fixes this duplication as well. Signed-off-by:Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Showing
- bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c 4 additions, 1 deletion...s/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
- fs/devfs/devfs_vnops.cc 7 additions, 1 deletionfs/devfs/devfs_vnops.cc
- fs/ramfs/ramfs_vfsops.c 1 addition, 0 deletionsfs/ramfs/ramfs_vfsops.c
- fs/vfs/vfs_mount.cc 14 additions, 10 deletionsfs/vfs/vfs_mount.cc
- fs/vfs/vfs_vnode.c 0 additions, 34 deletionsfs/vfs/vfs_vnode.c
- include/osv/mount.h 2 additions, 0 deletionsinclude/osv/mount.h
Loading
Please register or sign in to comment