Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
-
2
-
3
-
Orion
-
2966
Description
File foo created from a lustre client:
Object lvl iblk dblk dsize lsize %full type
197 1 16K 128K 1K 128K 0.00 ZFS plain file
192 bonus System attributes
dnode flags: USED_BYTES USERUSED_ACCOUNTED SPILL_BLKPTR
dnode maxblkid: 0
path ???<object#197>
uid 840000038
gid 840000038
atime Fri Mar 30 01:51:12 2012
mtime Fri Mar 30 01:51:23 2012
ctime Fri Mar 30 01:51:23 2012
crtime Fri Mar 30 01:51:12 2012
gen 1015
mode 100644
size 0
parent 0
links 1
pflags 0
rdev 0x0000000000000000
It appears that the SA_ZPL_PARENT() is used in several places to process directories (e.g. avoiding circular directory references), so it definitely needs to be set for directories. It also seems to be set for regular files, but it is difficult to determine if it is required or not.
Since there is only a single parent directory field, we should determine what the behaviour of the parent field is for hard links and renames:
mkdir a b
ls -li # get inode numbers
zdb {check parent} .
touch a/foo
zdb {check parent} a/foo
ln a/foo b/bar
zdb {check parent} b/bar
rm {link from current parent}
zdb {check parent of other link}
touch a/baz
zdb {check parent} a/baz
mv a/baz b/baz
zdb {check parent} b/baz
I suspect that the parent will be updated on rename (it would have to be for directories), but I'm unsure what will happen if the current parent link will be dropped. I suspect it will be set to 0.
Attachments
Issue Links
- duplicates
-
LU-2449 ZFS osd to fix . and .. handling
-
- Resolved
-