/* out of quota, try sync write */
if (rc == -EDQUOT && !cl_io_is_mkwrite(io)) {
+ struct ll_inode_info *lli = ll_i2info(inode);
+
rc = vvp_io_commit_sync(env, io, queue,
vio->u.readwrite.vui_from,
vio->u.readwrite.vui_to);
vio->u.readwrite.vui_written += rc;
rc = 0;
}
+ if (lli->lli_clob != NULL)
+ lov_read_and_clear_async_rc(lli->lli_clob);
+ lli->lli_async_rc = 0;
}
/* update inode size */
" v verbose\n"
" V open a volatile file\n"
" w[num] write optional length\n"
+" P[num] like w, but only one write call\n"
" x get file data version\n"
" W write entire mmap-ed region\n"
" y fsync\n"
rc = fd;
break;
case 'w':
+ case 'P':
len = atoi(commands + 1);
if (len <= 0)
len = 1;
fprintf(stderr,
"short write: %lld/%u\n",
rc, len);
+ if (commands[0] == 'P')
+ break;
len -= rc;
}
break;
}
run_test 27S "don't deactivate OSP on network issue"
+test_27T() {
+ [ $(facet_host client) == $(facet_host ost1) ] &&
+ skip "need ost1 and client on different nodes"
+
+#define OBD_FAIL_OSC_NO_GRANT 0x411
+ $LCTL set_param fail_loc=0x20000411 fail_val=1
+#define OBD_FAIL_OST_ENOSPC 0x215
+ do_facet ost1 "$LCTL set_param fail_loc=0x80000215"
+ $LFS setstripe -i 0 -c 1 $DIR/$tfile
+ $MULTIOP $DIR/$tfile oO_WRONLY:P$((4 * 1024 * 1024 + 10 * 4096))c ||
+ error "multiop failed"
+}
+run_test 27T "no eio on close on partial write due to enosp"
+
# createtest also checks that device nodes are created and
# then visible correctly (#2091)
test_28() { # bug 2091