Whamcloud - gitweb
In case of positive reply from server and failed client bulk
authordeen <deen>
Thu, 12 Jul 2007 09:50:37 +0000 (09:50 +0000)
committerdeen <deen>
Thu, 12 Jul 2007 09:50:37 +0000 (09:50 +0000)
callback after bulk transfer shouldn't LBUG, but process this
request as erroneous.

b=11544
i=green
i=eeb

lustre/ChangeLog
lustre/include/obd_support.h
lustre/ptlrpc/client.c
lustre/ptlrpc/events.c
lustre/tests/sanity.sh

index a738ab5..b19db32 100644 (file)
@@ -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. <info@clusterfs.com>
index e548a1d..ca7414b 100644 (file)
@@ -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
index af45f4d..56723f1 100644 (file)
@@ -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;
index 9a7a13e..61419d3 100644 (file)
@@ -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 &&
index 02f3928..dde4fac 100644 (file)
@@ -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