@@ -1689,6 +1689,7 @@ static void ll_heat_add(struct inode *inode, enum cl_io_type iot,
ssize_t result = 0;
int rc = 0;
int rc2 = 0;
+ int retries = 1000;
unsigned int retried = 0;
unsigned int dio_lock = 0;
bool is_aio = false;
@@ -1851,13 +1852,13 @@ static void ll_heat_add(struct inode *inode, enum cl_io_type iot,
file->f_path.dentry->d_name.name,
iot, rc, result, io->ci_need_restart);
- if ((!rc || rc == -ENODATA || rc == -ENOLCK) &&
- count > 0 && io->ci_need_restart) {
+ if ((!rc || rc == -ENODATA || rc == -ENOLCK || rc == -EIOCBQUEUED) &&
+ count > 0 && io->ci_need_restart && retries-- > 0) {
CDEBUG(D_VFSTRACE,
- "%s: restart %s from %lld, count:%zu, result: %zd\n",
+ "%s: restart %s from ppos=%lld count=%zu retries=%u ret=%zd: rc = %d\n",
file_dentry(file)->d_name.name,
iot == CIT_READ ? "read" : "write",
- *ppos, count, result);
+ *ppos, count, retries, result, rc);
/* preserve the tried count for FLR */
retried = io->ci_ndelay_tried;
dio_lock = io->ci_dio_lock;