for (i = 1; i < argc; i++) {
char buf[1024]; /* allow xattr that may be larger */
struct filter_fid *ff = (void *)buf;
+ static int printed;
int size;
size = getxattr(argv[i], "trusted.fid", buf,
printf("%s: parent="DFID" stripe=%u "
"stripe_size=%u stripe_count=%u",
- argv[i], loa->loa_parent_fid.f_seq,
+ argv[i],
+ (unsigned long long)loa->loa_parent_fid.f_seq,
loa->loa_parent_fid.f_oid, 0, /* ver */
loa->loa_parent_fid.f_stripe_idx &
PFID_STRIPE_COUNT_MASK,
"component_start=%llu "
"component_end=%llu",
loa->loa_comp_id,
- loa->loa_comp_start,
- loa->loa_comp_end);
+ (unsigned long long)loa->loa_comp_start,
+ (unsigned long long)loa->loa_comp_end);
printf("\n");
continue;
}
}
if (size != sizeof(struct filter_fid) &&
- size != sizeof(struct filter_fid_old) &&
- size != sizeof(struct lu_fid)) {
- fprintf(stderr, "%s: warning: fid larger than expected"
- " (%d bytes), recompile?\n", argv[i], size);
- continue;
+ size != sizeof(struct filter_fid_18_23) &&
+ size != sizeof(struct filter_fid_24_29) &&
+ size != sizeof(struct filter_fid_210) && !printed) {
+ fprintf(stderr,
+ "%s: warning: ffid size is unexpected (%d bytes), recompile?\n",
+ argv[i], size);
+ printed = 1;
+
+ if (size < sizeof(struct filter_fid_24_29))
+ continue;
}
printf("%s: ", argv[i]);
- if (size == sizeof(struct filter_fid_old)) {
- struct filter_fid_old *ffo = (void *)buf;
+ if (size == sizeof(struct filter_fid_18_23)) {
+ struct filter_fid_18_23 *ffo = (void *)buf;
printf("objid=%llu seq=%llu ",
(unsigned long long)__le64_to_cpu(ffo->ff_objid),
/* this is stripe_nr actually */
__le32_to_cpu(ff->ff_parent.f_stripe_idx));
- if (size >= sizeof(struct filter_fid)) {
+ if (size >= sizeof(struct filter_fid_210)) {
struct ost_layout *ol = &ff->ff_layout;
/* new filter_fid, support PFL */
"component_start=%llu "
"component_end=%llu",
__le32_to_cpu(ol->ol_comp_id),
+ (unsigned long long)
__le64_to_cpu(ol->ol_comp_start),
+ (unsigned long long)
__le64_to_cpu(ol->ol_comp_end));
}
+ if (size >= sizeof(struct filter_fid))
+ printf(" layout_version=%u range=%u",
+ __le32_to_cpu(ff->ff_layout_version),
+ __le32_to_cpu(ff->ff_range));
printf("\n");
}