Description
I mounted a ZFS backed lustre target thru the ZPL and it appears that ZAP sizes are not being adjusted as child objects are added or removed. Examples below.
Looking at update_log_dir, performing a ls -l yields the following:
drw-r--r--. 2 root root 2 Dec 31 1969 update_log_dir
But, that's wrong. We should be seeing a size of 3 as an ls shows us there are 3 children.
-bash-4.1# ls -a update_log_dir . .. [0x200000400:0x1:0x0]
Looking at oi.10, ls -l displays a size of 0:
drwxr-xr-x. 0 root root 0 Dec 31 1969 oi.10
But, the size we should be seeing is 12 as per the ls below.
-bash-4.1# ls -a oi.10 . 0x20000000a:0x0:0x0 0xa:0x3:0x0 0xa:0x5:0x0 0xa:0x7:0x0 0xa:0x9:0x0 .. 0xa:0x0:0x0 0xa:0x4:0x0 0xa:0x6:0x0 0xa:0x8:0x0 0xa:0xa:0x0
In the ZPL, the size of a directory should be the number of objects contained within it. The osd-zfs is clearly breaking that.
As a practical use case, in LU-8753, we couldn't remove update_log_dir since the directory didn't qualify as empty with a size of 1. The ZPL expects an empty directory to have a size of 2 (for '.' and '..').
Attachments
Issue Links
- is related to
-
LU-8753 Recovery already passed deadline with DNE
- Resolved