Whamcloud - gitweb
LU-16491 utils: update getdirstripe yaml format
'lfs getdirstripe --yaml' now prints directory layout in yaml
format. getdirstripe now also prints the "self" FID whether the
directory is striped or not. "migrating" fields
(lmv_migrate_offset, lmv_migrate_hash) were not included because
of the additional code complexity required to add the two fields.
The migrating fields are stored in 'struct lmv_mds_md_v1' which
AFAIK isn't available though getdirstripe.
For 0 striped directories, lmv_objects: will now contain
information on the directory itself, this information
becomes redundant with -v, however it is useful when the
lmv_fid isn't being shown.
New YAML layout:
lmv_fid: 0x280000404:0x5:0x0
lmv_magic: 0xcd20cd0
lmv_stripe_count: 4
lmv_stripe_offset: 2
lmv_hash_type: crush
lmv_objects:
- l_mdt_idx: 2
l_fid: 0x280000400:0x4:0x0
- l_mdt_idx: 0
l_fid: 0x200000402:0x4:0x0
- l_mdt_idx: 1
l_fid: 0x240000402:0x2:0x0
- l_mdt_idx: 3
l_fid: 0x2c0000403:0x2:0x0
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I03ddc24816484d11c8c70892831e9edc9da5455a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55346
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>