@@ -479,6 +479,7 @@
#define OBD_FAIL_LLITE_SHORT_COMMIT 0x1415
#define OBD_FAIL_LLITE_CREATE_FILE_PAUSE2 0x1416
#define OBD_FAIL_LLITE_RACE_MOUNT 0x1417
+#define OBD_FAIL_LLITE_PAGE_ALLOC 0x1418
#define OBD_FAIL_FID_INDIR 0x1501
#define OBD_FAIL_FID_INLMA 0x1502
@@ -435,7 +435,8 @@ static ssize_t ll_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
vio->u.readwrite.vui_written += tot_bytes;
else
vio->u.readwrite.vui_read += tot_bytes;
- result = -EIOCBQUEUED;
+ if (result == 0)
+ result = -EIOCBQUEUED;
}
return result;
@@ -158,6 +158,9 @@ static struct cl_page *__cl_page_alloc(struct cl_object *o)
struct cl_page *cl_page = NULL;
unsigned short bufsize = cl_object_header(o)->coh_page_bufsize;
+ if (OBD_FAIL_CHECK(OBD_FAIL_LLITE_PAGE_ALLOC))
+ return NULL;
+
check:
/* the number of entries in cl_page_kmem_array is expected to
* only be 2-3 entries, so the lookup overhead should be low.