Whamcloud - gitweb
LU-9135 osp: do not fail if last_rcvd update failed 13/31013/2
authorAlex Zhuravlev <bzzz@whamcloud.com>
Thu, 16 Nov 2017 12:43:32 +0000 (15:43 +0300)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 12 Mar 2018 18:17:53 +0000 (18:17 +0000)
just ignore an error in this case and hope the next time
OST will be able to serve well and OSP cancel the record.

Lustre-change: https://review.whamcloud.com/30129
Lustre-commit: d764d538d601fa7e980a32a02899f9c32772844c

Change-Id: Ib1bbe77132e81322f353909620b6a413981ae342
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31013
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/osp/osp_sync.c
lustre/tests/sanity.sh

index b04e526..aef7c79 100644 (file)
@@ -548,7 +548,6 @@ static int osp_sync_interpret(const struct lu_env *env,
        CDEBUG(D_HA, "reply req %p/%d, rc %d, transno %u\n", req,
               atomic_read(&req->rq_refcount),
               rc, (unsigned) req->rq_transno);
-       LASSERT(rc || req->rq_transno);
 
        if (rc == -ENOENT) {
                /*
@@ -571,7 +570,7 @@ static int osp_sync_interpret(const struct lu_env *env,
                /*
                 * error happened, we'll try to repeat on next boot ?
                 */
-               LASSERTF(req->rq_transno == 0 ||
+               LASSERTF(req->rq_transno == 0 || rc == -EIO ||
                         req->rq_import_generation < imp->imp_generation,
                         "transno %llu, rc %d, gen: req %d, imp %d\n",
                         req->rq_transno, rc, req->rq_import_generation,
index 725463c..64af44b 100755 (executable)
@@ -15950,6 +15950,15 @@ test_313() {
 }
 run_test 313 "io should fail after last_rcvd update fail"
 
+test_314() {
+       $SETSTRIPE -c 2 -i 0 $DIR/$tfile || error "setstripe failed"
+       do_facet ost1 "$LCTL set_param fail_loc=0x720"
+       rm -f $DIR/$tfile
+       wait_delete_completed
+       do_facet ost1 "$LCTL set_param fail_loc=0"
+}
+run_test 314 "OSP shouldn't fail after last_rcvd update failure"
+
 test_315() { # LU-618
        local file=$DIR/$tfile
        rm -f $file