[LU-16491] "lfs getdirstripe -y" doesn't print YAML formatted output Created: 18/Jan/23 Updated: 22/Mar/23 Resolved: 22/Mar/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.16.0, Lustre 2.12.9 |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Tim Day |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | easy | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
It appears that the "lfs getdirstripe -y <striped_dir>" command does not print YAML-formatted output (the output is the same regardless of whether -y is used or not). Unsurprisingly, there is also no subtest that is using "lfs getdirstripe -y", which is why nobody noticed if it was broken and/or even worked in the first place. Looking at lmv_dump_user_lmm(), it appears that the "LDF_YAML" flag is being checked, which was in turn set in llapi_lov_dump_user_lmm() from "fp_yaml", but this appears to be ignored in the stripe-printing loop:
if (verbose & VERBOSE_OBJID && lum->lum_magic != LMV_USER_MAGIC) {
llapi_printf(LLAPI_MSG_NORMAL, "%s", separator);
if (lum->lum_stripe_count > 0)
llapi_printf(LLAPI_MSG_NORMAL,
"mdtidx\t\t FID[seq:oid:ver]\n");
for (i = 0; i < lum->lum_stripe_count; i++) {
int idx = objects[i].lum_mds;
struct lu_fid *fid = &objects[i].lum_fid;
if ((obdindex == OBD_NOT_FOUND) || (obdindex == idx))
llapi_printf(LLAPI_MSG_NORMAL,
"%6u\t\t "DFID"\t\t%s\n",
idx, PFID(fid),
obdindex == idx ? " *" : "");
}
}
It would also make sense to print the lmv_pool line in the header block before the dirstripes, should there ever be an MDT pool added. The behavior of the " |
| Comments |
| Comment by Gerrit Updater [ 05/Mar/23 ] |
|
"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50208 |
| Comment by Gerrit Updater [ 21/Mar/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50208/ |
| Comment by Peter Jones [ 22/Mar/23 ] |
|
Landed for 2.16 |