From 22ef5d606a629d79671ec3e340f068a7d0a38469 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 16 Nov 2017 15:43:32 +0300 Subject: [PATCH] LU-9135 osp: do not fail if last_rcvd update failed 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 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/31013 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- lustre/osp/osp_sync.c | 3 +-- lustre/tests/sanity.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lustre/osp/osp_sync.c b/lustre/osp/osp_sync.c index b04e526..aef7c79 100644 --- a/lustre/osp/osp_sync.c +++ b/lustre/osp/osp_sync.c @@ -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, diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 725463c..64af44b 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 -- 1.8.3.1