In ldlm_cli_enqueue_local(), destroy the newly created lock if
ldlm_lvbo_init() fails. Rename sanity test_232() to test_232a(), fix
the fail_loc setting to happen on the correct node, and check that the
OST can be unmounted after the failed write. Add sanity test_232b() to
do the same but for data version since that uses a different LDLM
path.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I18e9594b9a2461afbc66128f477d3185a6627bc0
Reviewed-on: https://review.whamcloud.com/30477
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
err = ldlm_lvbo_init(lock->l_resource);
if (err < 0) {
LDLM_ERROR(lock, "delayed lvb init failed (rc %d)", err);
err = ldlm_lvbo_init(lock->l_resource);
if (err < 0) {
LDLM_ERROR(lock, "delayed lvb init failed (rc %d)", err);
+ ldlm_lock_destroy_nolock(lock);
}
run_test 231b "must not assert on fully utilized OST request buffer"
}
run_test 231b "must not assert on fully utilized OST request buffer"
+ $LFS setstripe -c1 -i0 $DIR/$tdir/$tfile
+
#define OBD_FAIL_LDLM_OST_LVB 0x31c
#define OBD_FAIL_LDLM_OST_LVB 0x31c
- $LCTL set_param fail_loc=0x31c
+ do_facet ost1 $LCTL set_param fail_loc=0x31c
# ignore dd failure
dd if=/dev/zero of=$DIR/$tdir/$tfile bs=1M count=1 || true
# ignore dd failure
dd if=/dev/zero of=$DIR/$tdir/$tfile bs=1M count=1 || true
- $LCTL set_param fail_loc=0
+ do_facet ost1 $LCTL set_param fail_loc=0
+ umount_client $MOUNT || error "umount failed"
+ mount_client $MOUNT || error "mount failed"
+ stop ost1 || error "cannot stop ost1"
+ start ost1 $(ostdevname 1) $OST_MOUNT_OPTS || error "cannot start ost1"
+}
+run_test 232a "failed lock should not block umount"
+
+test_232b() {
+ mkdir -p $DIR/$tdir
+ $LFS setstripe -c1 -i0 $DIR/$tdir/$tfile
+ dd if=/dev/zero of=$DIR/$tdir/$tfile bs=1M count=1
+ sync
+ cancel_lru_locks osc
+
+ #define OBD_FAIL_LDLM_OST_LVB 0x31c
+ do_facet ost1 $LCTL set_param fail_loc=0x31c
+
+ # ignore failure
+ $LFS data_version $DIR/$tdir/$tfile || true
+
+ do_facet ost1 $LCTL set_param fail_loc=0
umount_client $MOUNT || error "umount failed"
mount_client $MOUNT || error "mount failed"
umount_client $MOUNT || error "umount failed"
mount_client $MOUNT || error "mount failed"
+ stop ost1 || error "cannot stop ost1"
+ start ost1 $(ostdevname 1) $OST_MOUNT_OPTS || error "cannot start ost1"
-run_test 232 "failed lock should not block umount"
+run_test 232b "failed data version lock should not block umount"
test_233a() {
[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.3.64) ] ||
test_233a() {
[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.3.64) ] ||