#define OBD_FAIL_OST_STATFS_EINPROGRESS 0x231
#define OBD_FAIL_OST_SET_INFO_NET 0x232
#define OBD_FAIL_OST_NODESTROY 0x233
-#define OBD_FAIL_OST_READ_SIZE 0x234
+/* OBD_FAIL_OST_READ_SIZE 0x234 obsolete since 2.14 */
#define OBD_FAIL_OST_LADVISE_NET 0x235
#define OBD_FAIL_OST_PAUSE_PUNCH 0x236
#define OBD_FAIL_OST_LADVISE_PAUSE 0x237
* lnb->lnb_rc == 0, so it's easy to detect later. */
break;
- if (isize < lnb[i].lnb_file_offset + lnb[i].lnb_len)
- lnb[i].lnb_rc = isize - lnb[i].lnb_file_offset;
- else
- lnb[i].lnb_rc = lnb[i].lnb_len;
+ /* instead of looking if we go beyong isize, send complete
+ * pages all the time
+ */
+ lnb[i].lnb_rc = lnb[i].lnb_len;
/* Bypass disk read if fail_loc is set properly */
if (OBD_FAIL_CHECK(OBD_FAIL_OST_FAKE_RW))
lnb[i].lnb_rc = lnb[i].lnb_len;
if (lnb[i].lnb_file_offset + lnb[i].lnb_len >= eof) {
+ /* send complete pages all the time */
if (eof <= lnb[i].lnb_file_offset)
lnb[i].lnb_rc = 0;
- else
- lnb[i].lnb_rc = eof - lnb[i].lnb_file_offset;
/* all subsequent rc should be 0 */
while (++i < npages)
break;
}
}
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_READ_SIZE) &&
- nob != cfs_fail_val)
- rc = -E2BIG;
if (body->oa.o_valid & OBD_MD_FLCKSUM) {
u32 flag = body->oa.o_valid & OBD_MD_FLFLAGS ?
}
run_test 245 "check mdc connection flag/data: multiple modify RPCs"
-test_246() { # LU-7371
- remote_ost_nodsh && skip "remote OST with nodsh"
- [ $OST1_VERSION -lt $(version_code 2.7.62) ] &&
- skip "Need OST version >= 2.7.62"
-
- do_facet ost1 $LCTL set_param fail_val=4095
-#define OBD_FAIL_OST_READ_SIZE 0x234
- do_facet ost1 $LCTL set_param fail_loc=0x234
- $LFS setstripe $DIR/$tfile -i 0 -c 1
- dd if=/dev/zero of=$DIR/$tfile bs=4095 count=1 > /dev/null 2>&1
- cancel_lru_locks $FSNAME-OST0000
- dd if=$DIR/$tfile of=/dev/null bs=1048576 || error "Read failed"
-}
-run_test 246 "Read file of size 4095 should return right length"
-
cleanup_247() {
local submount=$1