* quite possible for FID-on-MDT. */
if (dev->od_is_ost)
return SCRUB_NEXT_OSTOBJ_OLD;
- else
- return 0;
+
+ return 0;
}
static int osd_scrub_get_fid(struct osd_thread_info *info,
struct lu_fid *fid, bool scrub)
{
struct lustre_mdt_attrs *lma = &info->oti_ost_attrs.loa_lma;
- int rc;
bool has_lma = false;
+ int rc;
rc = osd_get_lma(info, inode, &info->oti_obj_dentry,
&info->oti_ost_attrs);
test_14() {
[ $(facet_fstype $SINGLEMDS) != "ldiskfs" ] &&
- skip "ldiskfs special test" && return
+ skip "ldiskfs special test"
check_mount_and_prep
- $SETSTRIPE -c 1 -i 0 $DIR/$tdir
+ $LFS setstripe -c 1 -i 0 $DIR/$tdir
#define OBD_FAIL_OSD_COMPAT_NO_ENTRY 0x196
do_facet ost1 $LCTL set_param fail_loc=0x196
mount_client $MOUNT || error "(5) Fail to start client!"
local LF_REPAIRED=$($SHOW_SCRUB_ON_OST |
- awk '/^lf_repa[ri]*ed/ { print $2 }')
+ awk '/^lf_repa[ir]*ed/ { print $2 }')
[ $LF_REPAIRED -ge 1000 ] ||
error "(6) Some entry under /lost+found should be repaired"
ls -ail $DIR/$tdir > /dev/null || error "(7) ls should succeed"
+
+ stopall
+
+ echo "run e2fsck again after LFSCK"
+ run_e2fsck $(facet_host ost1) $(ostdevname 1) "-y" ||
+ error "(8) Fail to run e2fsck error"
}
-run_test 14 "OI scrub can repair objects under lost+found"
+run_test 14 "OI scrub can repair OST objects under lost+found"
test_15() {
local repaired
test_409()
{
- [ $MDSCOUNT -lt 2 ] && skip_env "needs >= 2 MDTs"
- check_mount_and_prep
+ [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
mkdir -p $DIR/$tdir || error "(0) Fail to mkdir"
$LFS mkdir -i 1 -c 2 $DIR/$tdir/foo || error "(1) Fail to mkdir"
echo "Unlink hard links start at $(date)"
unlinkmany $DIR/$tdir/foo/${PREFIX}_ 1000 ||
error "(7) Fail to unlink"
+ echo "Unlink hard links finished at $(date)"
}
run_test 409 "Large amount of cross-MDTs hard links on the same file"