From d764d538d601fa7e980a32a02899f9c32772844c 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. Change-Id: Ib1bbe77132e81322f353909620b6a413981ae342 Signed-off-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/30129 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- 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 80c11c2..2180944 100644 --- a/lustre/osp/osp_sync.c +++ b/lustre/osp/osp_sync.c @@ -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, diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 3ee0492..bb2a49e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 -- 1.8.3.1