From a5e24b1d2216f1f5bd1585b81b9d1388de5d2dfd Mon Sep 17 00:00:00 2001 From: deen Date: Thu, 12 Jul 2007 09:50:37 +0000 Subject: [PATCH] In case of positive reply from server and failed client bulk callback after bulk transfer shouldn't LBUG, but process this request as erroneous. b=11544 i=green i=eeb --- lustre/ChangeLog | 7 +++++++ lustre/include/obd_support.h | 1 + lustre/ptlrpc/client.c | 4 +++- lustre/ptlrpc/events.c | 3 +++ lustre/tests/sanity.sh | 9 +++++++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index a738ab5..b19db32 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -458,6 +458,13 @@ Description: bad return value and errno from fcntl call Details : In liblustre API, errno should be a negative value if error happens. +Severity : normal +Bugzilla : 11544 +Description: ptlrpc_check_set() LBUG +Details : In case of positive reply from server and failed client bulk + callback after bulk transfer shouldn't LBUG, but process this + request as erroneous. + -------------------------------------------------------------------------------- 2007-05-03 Cluster File Systems, Inc. diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index e548a1d..ca7414b 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -176,6 +176,7 @@ extern int obd_race_state; #define OBD_FAIL_PTLRPC_DROP_RPC 0x505 #define OBD_FAIL_PTLRPC_DELAY_SEND 0x506 #define OBD_FAIL_PTLRPC_DELAY_RECOV 0x507 +#define OBD_FAIL_PTLRPC_CLIENT_BULK_CB 0x508 #define OBD_FAIL_OBD_PING_NET 0x600 #define OBD_FAIL_OBD_LOG_CANCEL_NET 0x601 diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index af45f4d..56723f1 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -909,7 +909,9 @@ int ptlrpc_check_set(struct ptlrpc_request_set *set) * was good after getting the REPLY for her GET or * the ACK for her PUT. */ DEBUG_REQ(D_ERROR, req, "bulk transfer failed"); - LBUG(); + req->rq_status = -EIO; + req->rq_phase = RQ_PHASE_INTERPRET; + GOTO(interpret, req->rq_status); } req->rq_phase = RQ_PHASE_INTERPRET; diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index 9a7a13e..61419d3 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -119,6 +119,9 @@ void client_bulk_callback (lnet_event_t *ev) struct ptlrpc_bulk_desc *desc = cbid->cbid_arg; ENTRY; + if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_CLIENT_BULK_CB)) + ev->status = -EIO; + LASSERT ((desc->bd_type == BULK_PUT_SINK && ev->type == LNET_EVENT_PUT) || (desc->bd_type == BULK_GET_SOURCE && diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 02f3928..dde4fac 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -4291,6 +4291,15 @@ test_121() { #bug #10589 } run_test 121 "read cancel race =========" +test_122() { #bug #11544 + #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB 0x508 + sysctl -w lustre.fail_loc=0x508 + dd if=/dev/zero of=$DIR/$tfile count=1 + sync + sysctl -w lustre.fail_loc=0 +} +run_test 122 "fail client bulk callback (shouldn't LBUG)" + TMPDIR=$OLDTMPDIR TMP=$OLDTMP HOME=$OLDHOME -- 1.8.3.1