[LU-15200] "lfs getdirstripe -D subdir" does not show correct inherited layout Created: 09/Nov/21 Updated: 22/Jun/22 Resolved: 26/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.15.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Lai Siyao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
The default directory layout printed for non-root directories does not correctly show the actual layout specified on the root directory: # lfs getdirstripe -D /mnt/testfs lmv_stripe_count: 1 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: -1 lmv_max_inherit_rr: 3 # lfs getdirstripe -D /mnt/testfs/etc lmv_stripe_count: 0 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: -1 lmv_max_inherit_rr: 0 # getfattr -d -m - -e hex /mnt/testfs /mnt/testfs/etc # file: mnt/testfs trusted.dmv=0xd00cd30c01000000ffffffff000000000000000000030000000000000000000000000000000000000000000000000000 trusted.lma=0x000000000000000007000000020000000100000000000000 # file: mnt/testfs/etc trusted.link=0xdff1ea11010000002d000000000000000000000000000000001500000002000000070000000100000000657463 trusted.lma=0x000000000000000002040000020000000100000000000000 The default directory layout stored on the root directory is printed properly, and is correctly inherited by actual subdirectories created in the filesystem, but this is not what is shown by "lfs getdirstripe -D" on the client. It is printing a "generic" default layout if no trusted.lmv xattr is found. Instead, it would be more correct to return the inherited trusted.lmv from the root directory, if it exists and the lmv_max_inherit depth allows it, along with reducing lmv_max_inherit and lmv_max_inherit_rr by lli_depth if they are not -1. |
| Comments |
| Comment by Andreas Dilger [ 09/Nov/21 ] |
|
It looks like ll_dir_getstripe_default() is specifically excluding fetching the default LMV, but it should do that since |
| Comment by Gerrit Updater [ 15/Nov/21 ] |
|
"Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45570 |
| Comment by Gerrit Updater [ 18/Nov/21 ] |
|
"Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45599 |
| Comment by Gerrit Updater [ 11/Jan/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45599/ |
| Comment by Gerrit Updater [ 26/Jan/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45570/ |
| Comment by Peter Jones [ 26/Jan/22 ] |
|
Landed for 2.15 |