git: sys/vfs/hammer: Fix wrong parent localization for PFS root
tkusumi at crater.dragonflybsd.org
Fri Dec 11 03:06:32 PST 2015
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Fri Dec 11 00:11:44 2015 +0900
sys/vfs/hammer: Fix wrong parent localization for PFS root
The idea of PFS root inode having ip localization value of its
parent directory's inode has been #if0'd after ea434b6f in 2008.
(Since then parent_obj_localization field of ondisk inode seems
to be always 0 because the field is never touched after it's
first allocated, unless it's a symlink which uses symlink
part of union)
Since the field is now deprecated, using this as a localization
value of inode's parent is wrong when the inode is PFS root. It
should use a proper localization value HAMMER_DEF_LOCALIZATION
which is also 0.
Note that HAMMER userspace doesn't allow creating a PFS in PFS
unless the parent PFS is PFS0 (see hammer_cmd_pseudofs_create()),
so it doesn't need to consider the parent inode's localization
value other than the default localization value. If that's allowed,
there seems to be no easy way to tell the localization value.
Also remove parent_obj_localization field of ondisk inode since
it's no longer used after this commit.
Summary of changes:
sys/vfs/hammer/hammer_disk.h | 5 -----
sys/vfs/hammer/hammer_inode.c | 12 ------------
sys/vfs/hammer/hammer_vnops.c | 2 +-
3 files changed, 1 insertion(+), 18 deletions(-)
DragonFly BSD source repository
More information about the Commits