Whamcloud - gitweb
LU-6441 ptlrpc: fix sanity 224c for different RPC sizes 03/22403/3
authorJinshan Xiong <jinshan.xiong@intel.com>
Fri, 9 Sep 2016 04:31:34 +0000 (21:31 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 13 Sep 2016 20:03:28 +0000 (20:03 +0000)
- fail_loc should be set on the OST side;
- an RPC can have 16 bulk descriptors at most, make the test case
  usable even with smaller RPC size.

Patch http://review.whamcloud.com/14399 added sanity.sh test_224c
to verify correct handling of failures with bulk transfers over 1MB,
but did not correctly handle the different transfer sizes possible.

Test-Parameters: trivial
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I9d0bc0c523cb71d95c6165066e666878c2a380cc
Reviewed-on: http://review.whamcloud.com/22403
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/niobuf.c
lustre/tests/sanity.sh

index 0fece34..8396d6f 100644 (file)
@@ -208,7 +208,7 @@ int ptlrpc_start_bulk_transfer(struct ptlrpc_bulk_desc *desc)
                /* LU-6441: last md is not sent and desc->bd_md_count == 1 */
                if (OBD_FAIL_CHECK_ORSET(OBD_FAIL_PTLRPC_CLIENT_BULK_CB3,
                                         CFS_FAIL_ONCE) &&
                /* LU-6441: last md is not sent and desc->bd_md_count == 1 */
                if (OBD_FAIL_CHECK_ORSET(OBD_FAIL_PTLRPC_CLIENT_BULK_CB3,
                                         CFS_FAIL_ONCE) &&
-                   posted_md == desc->bd_md_max_brw - 1) {
+                   total_md > 1 && posted_md == total_md - 1) {
                        posted_md++;
                        continue;
                }
                        posted_md++;
                        continue;
                }
index 14ce65f..507812d 100755 (executable)
@@ -12662,10 +12662,11 @@ test_224c() { # LU-6441
                error "conf_param timeout=5 failed"
 
        #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB3   0x520
                error "conf_param timeout=5 failed"
 
        #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB3   0x520
-       $LCTL set_param fail_loc=0x520
+       do_facet ost1 $LCTL set_param fail_loc=0x520
+       $LFS setstripe -c 1 -i 0 $DIR/$tfile
        dd if=/dev/zero of=$DIR/$tfile bs=8MB count=1
        sync
        dd if=/dev/zero of=$DIR/$tfile bs=8MB count=1
        sync
-       $LCTL set_param fail_loc=0
+       do_facet ost1 $LCTL set_param fail_loc=0
 
        set_conf_param_and_check client "$test_at" "$param_at" $at_max ||
                error "conf_param at_max=$at_max failed"
 
        set_conf_param_and_check client "$test_at" "$param_at" $at_max ||
                error "conf_param at_max=$at_max failed"