if (lod_comp->llc_flags & LCME_FL_NOSYNC)
lcme->lcme_timestamp =
cpu_to_le64(lod_comp->llc_timestamp);
- if (lod_comp->llc_flags & LCME_FL_EXTENSION)
+ if (lod_comp->llc_flags & LCME_FL_EXTENSION && !is_dir)
lcm->lcm_magic = cpu_to_le32(LOV_MAGIC_SEL);
lcme->lcme_extent.e_start =
le32_to_cpu(comp_v1->lcm_entries[i].lcme_id);
if (lod_comp->llc_id == LCME_ID_INVAL)
GOTO(out, rc = -EINVAL);
+
+ if (comp_v1->lcm_entries[i].lcme_flags &
+ cpu_to_le32(LCME_FL_EXTENSION) &&
+ magic != LOV_MAGIC_SEL) {
+ struct lod_device *d =
+ lu2lod_dev(lo->ldo_obj.do_lu.lo_dev);
+
+ CDEBUG(D_WARNING, "%s: not SEL magic on SEL "
+ "file "DFID": %x\n",
+ lod2obd(d)->obd_name,
+ PFID(lod_object_fid(lo)), magic);
+ }
} else {
lod_comp_set_init(lod_comp);
}
skip "skipped for lustre < $SEL_VER"
local comp_file=$DIR/$tdir/$tfile
+ local comp_dir=$DIR/$tdir/$tdir
local flg_opts=""
local found=""
$LFS setstripe --ext-size 64M -c 1 -E -1 $DIR/$tdir ||
error "Setstripe on $DIR/$tdir failed"
+ # check inheritance for a sub-dir and a file
+ test_mkdir $comp_dir
+ found=$($LFS find --comp-start 0 -E 64M $comp_dir | wc -l)
+ [ $found -eq 1 ] || error "Dir Inheritance: wrong first component size"
+
+ flg_opts="--comp-flags extension"
+ found=$($LFS find --comp-start 64M -E EOF $flg_opts $comp_dir | wc -l)
+ [ $found -eq 1 ] || error "Dir Inheritance: Second component not found"
+
touch $comp_file
flg_opts="--comp-flags init"
found=$($LFS find --comp-start 0 -E 64M $flg_opts $comp_file | wc -l)
- [ $found -eq 1 ] || error "Inheritance: wrong first component size"
+ [ $found -eq 1 ] || error "File Inheritance: wrong first component size"
flg_opts="--comp-flags extension"
found=$($LFS find --comp-start 64M -E EOF $flg_opts $comp_file | wc -l)
- [ $found -eq 1 ] || error "Inheritance: Second component not found"
+ [ $found -eq 1 ] || error "File Inheritance: Second component not found"
test19_io_base $comp_file 1
}