Details
-
Bug
-
Resolution: Fixed
-
Minor
-
Lustre 2.16.0, Lustre 2.12.9
-
3
-
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 "-v|--verbose" flag is also puzzling, since using it will print nothing when "lfs getdirstripe" is run.