struct niobuf_local *res, struct obd_trans_info *oti,
struct lustre_capa *capa)
{
+ if (*npages > PTLRPC_MAX_BRW_PAGES) {
+ CERROR("%s: bulk has too many pages %d, which exceeds the"
+ "maximum pages per RPC of %d\n",
+ exp->exp_obd->obd_name, *npages, PTLRPC_MAX_BRW_PAGES);
+ RETURN(-EPROTO);
+ }
+
if (cmd == OBD_BRW_WRITE)
return filter_preprw_write(cmd, exp, oa, objcount, obj,
nb, npages, res, oti, capa);
obdecho_create_test() {
local OBD=$1
local node=$2
+ local pages=${3:-64}
local rc=0
local id
do_facet $node "$LCTL attach echo_client ec ec_uuid" || rc=1
[ ${PIPESTATUS[0]} -eq 0 -a -n "$id" ] || rc=3
fi
echo "New object id is $id"
- [ $rc -eq 0 ] && { do_facet $node "$LCTL --device ec test_brw 10 w v 64 $id" ||
- rc=4; }
+ [ $rc -eq 0 ] && { do_facet $node "$LCTL --device ec " \
+ "test_brw 10 w v $pages $id" || rc=4; }
[ $rc -eq 0 -o $rc -gt 2 ] && { do_facet $node "$LCTL --device ec " \
"cleanup" || rc=5; }
[ $rc -eq 0 -o $rc -gt 1 ] && { do_facet $node "$LCTL --device ec " \
}
run_test 180b "test obdecho directly on obdfilter"
+test_180c() { # LU-2598
+ local rc=0
+ local rmmod_remote=false
+ local pages=8192 # 32MB bulk I/O RPC size
+ local target
+
+ do_rpc_nodes $(facet_active_host ost1) load_module obdecho/obdecho &&
+ rmmod_remote=true || error "failed to load module obdecho"
+
+ target=$(do_facet ost1 $LCTL dl | awk '/obdfilter/ {print $4}'|head -1)
+ if [[ -n $target ]]; then
+ obdecho_create_test "$target" ost1 "$pages"
+ if [[ ${PIPESTATUS[0]} != 4 ]]; then
+ echo "obecho_create_test should fail with rc=4"
+ rc=1
+ fi
+ else
+ echo "there is no obdfilter target on ost1"
+ rc=2
+ fi
+ $rmmod_remote && do_facet ost1 "rmmod obdecho" || true
+ return $rc
+}
+run_test 180c "test huge bulk I/O size on obdfilter, don't LASSERT"
+
test_181() { # bug 22177
mkdir -p $DIR/$tdir || error "creating dir $DIR/$tdir"
# create enough files to index the directory