Whamcloud - gitweb
LU-9135 osp: do not fail if last_rcvd update failed 29/30129/2
authorAlex Zhuravlev <bzzz@whamcloud.com>
Thu, 16 Nov 2017 12:43:32 +0000 (15:43 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 29 Nov 2017 05:59:43 +0000 (05:59 +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.

Change-Id: Ib1bbe77132e81322f353909620b6a413981ae342
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/30129
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osp/osp_sync.c
lustre/tests/sanity.sh

index 80c11c2..2180944 100644 (file)
@@ -568,7 +568,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) {
                /*
@@ -591,7 +590,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 3ee0492..bb2a49e 100755 (executable)
@@ -16471,6 +16471,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_fake_rw() {
        local read_write=$1
        if [ "$read_write" = "write" ]; then