summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94c6962)
The bug is imported from commit
f1b9122c of LU-5108.
It should have removed ll_cl_context from the list if failed to take
lli_write_mutex at:
if ((iot == CIT_WRITE) &&
!(cio->cui_fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
if (mutex_lock_interruptible(&lli->lli_write_mutex))
GOTO(out, result = -ERESTARTSYS);
Revise it to add ll_context right before cl_io_loop.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I6532bb8919c13692bd0ceb1ba0d755c1417e5095
Reviewed-on: http://review.whamcloud.com/10955
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
cio->cui_fd = LUSTRE_FPRIVATE(file);
vio->cui_io_subtype = args->via_io_subtype;
cio->cui_fd = LUSTRE_FPRIVATE(file);
vio->cui_io_subtype = args->via_io_subtype;
- ll_cl_add(file, env, io);
-
switch (vio->cui_io_subtype) {
case IO_NORMAL:
cio->cui_iov = args->u.normal.via_iov;
switch (vio->cui_io_subtype) {
case IO_NORMAL:
cio->cui_iov = args->u.normal.via_iov;
CERROR("Unknow IO type - %u\n", vio->cui_io_subtype);
LBUG();
}
CERROR("Unknow IO type - %u\n", vio->cui_io_subtype);
LBUG();
}
+
+ ll_cl_add(file, env, io);
result = cl_io_loop(env, io);
result = cl_io_loop(env, io);
+ ll_cl_remove(file, env);
+
if (args->via_io_subtype == IO_NORMAL)
up_read(&lli->lli_trunc_sem);
if (write_mutex_locked)
mutex_unlock(&lli->lli_write_mutex);
if (args->via_io_subtype == IO_NORMAL)
up_read(&lli->lli_trunc_sem);
if (write_mutex_locked)
mutex_unlock(&lli->lli_write_mutex);
- ll_cl_remove(file, env);
} else {
/* cl_io_rw_init() handled IO */
result = io->ci_result;
} else {
/* cl_io_rw_init() handled IO */
result = io->ci_result;