ext2fs_le64_to_cpu(ff->ff_seq));
fprintf(f, "parent="DFID" stripe=%u", PFID(&ff->ff_parent), stripe);
- if (value_len > sizeof(*ff)) {
- struct filter_fid *ff_new = value;
+ if (value_len >= sizeof(struct filter_fid_210)) {
+ struct filter_fid_210 *ff_new = value;
fprintf(f, " stripe_size=%u stripe_count=%u",
ext2fs_le32_to_cpu(ff_new->ff_stripe_size),
ext2fs_le64_to_cpu(ff_new->ff_pfl_start),
ext2fs_le64_to_cpu(ff_new->ff_pfl_end));
}
+
+ if (value_len >= sizeof(struct filter_fid)) {
+ struct filter_fid *ff_new = value;
+
+ fprintf(f, " layout_version=%u range=%u",
+ ext2fs_le32_to_cpu(ff_new->ff_layout_version),
+ ext2fs_le32_to_cpu(ff_new->ff_range));
+ }
+
fprintf(f, "\n");
return 0;
__u64 ff_seq;
};
-struct filter_fid {
+struct filter_fid_210 {
struct lu_fid ff_parent;
__u32 ff_stripe_size;
__u32 ff_stripe_count;
__u32 ff_pfl_id;
};
+struct filter_fid {
+ struct lu_fid ff_parent;
+ __u32 ff_stripe_size;
+ __u32 ff_stripe_count;
+ __u64 ff_pfl_start;
+ __u64 ff_pfl_end;
+ __u32 ff_pfl_id;
+ __u32 ff_layout_version;
+ __u32 ff_range;
+} __attribute__((packed));
+
#define LMA_OLD_SIZE 64
#endif /* !LMA_OLD_SIZE */
--- /dev/null
+Extended attributes:
+ fid: parent=[0x200000402:0xc:0x0] stripe=1 stripe_size=1048576 stripe_count=2 layout_version=0 range=0
+Extended attributes:
+ fid: parent=[0x200000402:0x8:0x0] stripe=1 stripe_size=1048576 stripe_count=2 component_id=65537 component_start=0 component_end=18446744073709551615 layout_version=6 range=0
--- /dev/null
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+IMAGE=$test_dir/image.gz
+EXP=$test_dir/expect
+OUT=$test_name.log
+gunzip < $IMAGE > $TMPFILE
+
+$DEBUGFS -w -R "ea_list /plain" $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -w -R "ea_list /pfl_flr" $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE EXP OUT