When reset lfsck, related lfsck tracing file will be re-created,
but we forgot to release the object reference of the old tracing
file, then trigger LASSERT() when related device to be released.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2f5dd9933e0870849d85d03909b2d7926d244029
Reviewed-on: http://review.whamcloud.com/7190
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
if (rc != 0)
GOTO(out, rc);
if (rc != 0)
GOTO(out, rc);
+ lfsck_object_put(env, com->lc_obj);
+ com->lc_obj = NULL;
dto = local_index_find_or_create(env, lfsck->li_los, lfsck->li_local_root,
lfsck_namespace_name,
S_IFREG | S_IRUGO | S_IWUSR,
dto = local_index_find_or_create(env, lfsck->li_los, lfsck->li_local_root,
lfsck_namespace_name,
S_IFREG | S_IRUGO | S_IWUSR,
awk '/^updated_phase1/ { print $2 }')
[ $repaired -eq 0 ] ||
error "(10) Expect nothing to be repaired, but got: $repaired"
awk '/^updated_phase1/ { print $2 }')
[ $repaired -eq 0 ] ||
error "(10) Expect nothing to be repaired, but got: $repaired"
+
+ local scanned1=$($SHOW_NAMESPACE | awk '/^success_count/ { print $2 }')
+ $START_NAMESPACE -r || error "(11) Fail to reset LFSCK!"
+ sleep 3
+
+ STATUS=$($SHOW_NAMESPACE | awk '/^status/ { print $2 }')
+ [ "$STATUS" == "completed" ] ||
+ error "(12) Expect 'completed', but got '$STATUS'"
+
+ local scanned2=$($SHOW_NAMESPACE | awk '/^success_count/ { print $2 }')
+ [ $((scanned1 + 1)) -eq $scanned2 ] ||
+ error "(13) Expect success $((scanned1 + 1)), but got $scanned2"
+
+ echo "stopall, should NOT crash LU-3649"
+ stopall > /dev/null
}
run_test 0 "Control LFSCK manually"
}
run_test 0 "Control LFSCK manually"