From: Jinshan Xiong Date: Fri, 9 Sep 2016 04:31:34 +0000 (-0700) Subject: LU-6441 ptlrpc: fix sanity 224c for different RPC sizes X-Git-Tag: 2.8.58~8 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6cde14a5df781ae29da88f98a2559eb4342fe1f3 LU-6441 ptlrpc: fix sanity 224c for different RPC sizes - 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 Change-Id: I9d0bc0c523cb71d95c6165066e666878c2a380cc Reviewed-on: http://review.whamcloud.com/22403 Reviewed-by: Andreas Dilger Reviewed-by: Niu Yawei Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index 0fece34..8396d6f 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -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) && - posted_md == desc->bd_md_max_brw - 1) { + total_md > 1 && posted_md == total_md - 1) { posted_md++; continue; } diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 14ce65f..507812d 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -12662,10 +12662,11 @@ test_224c() { # LU-6441 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 - $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"