Revision 35991652baa12ff3d0e420c0d0cb2ad9f7076e5b authored by Mikulas Patocka on 02 June 2012, 23:29:58 UTC, committed by Alasdair G Kergon on 02 June 2012, 23:29:58 UTC
After the failure of a group of paths, any alternative paths that
need initialising do not become available until further I/O is sent to
the device.  Until this has happened, ioctls return -EAGAIN.

With this patch, new paths are made available in response to an ioctl
too.  The processing of the ioctl gets delayed until this has happened.

Instead of returning an error, we submit a work item to kmultipathd
(that will potentially activate the new path) and retry in ten
milliseconds.

Note that the patch doesn't retry an ioctl if the ioctl itself fails due
to a path failure.  Such retries should be handled intelligently by the
code that generated the ioctl in the first place, noting that some SCSI
commands should not be retried because they are not idempotent (XOR write
commands).  For commands that could be retried, there is a danger that
if the device rejected the SCSI command, the path could be errorneously
marked as failed, and the request would be retried on another path which
might fail too.  It can be determined if the failure happens on the
device or on the SCSI controller, but there is no guarantee that all
SCSI drivers set these flags correctly.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
1 parent f220fd4
History
File Mode Size
Kconfig -rw-r--r-- 5.7 KB
LICENCE -rw-r--r-- 1.4 KB
Makefile -rw-r--r-- 751 bytes
README.Locking -rw-r--r-- 7.0 KB
TODO -rw-r--r-- 1.9 KB
acl.c -rw-r--r-- 9.0 KB
acl.h -rw-r--r-- 1.0 KB
background.c -rw-r--r-- 4.2 KB
build.c -rw-r--r-- 10.9 KB
compr.c -rw-r--r-- 11.6 KB
compr.h -rw-r--r-- 3.1 KB
compr_lzo.c -rw-r--r-- 2.2 KB
compr_rtime.c -rw-r--r-- 2.8 KB
compr_rubin.c -rw-r--r-- 8.8 KB
compr_zlib.c -rw-r--r-- 5.5 KB
debug.c -rw-r--r-- 25.7 KB
debug.h -rw-r--r-- 7.9 KB
dir.c -rw-r--r-- 22.8 KB
erase.c -rw-r--r-- 14.2 KB
file.c -rw-r--r-- 9.3 KB
fs.c -rw-r--r-- 19.6 KB
gc.c -rw-r--r-- 42.9 KB
ioctl.c -rw-r--r-- 557 bytes
jffs2_fs_i.h -rw-r--r-- 1.6 KB
jffs2_fs_sb.h -rw-r--r-- 5.2 KB
malloc.c -rw-r--r-- 7.5 KB
nodelist.c -rw-r--r-- 21.7 KB
nodelist.h -rw-r--r-- 17.8 KB
nodemgmt.c -rw-r--r-- 27.3 KB
os-linux.h -rw-r--r-- 7.3 KB
read.c -rw-r--r-- 6.7 KB
readinode.c -rw-r--r-- 43.3 KB
scan.c -rw-r--r-- 35.1 KB
security.c -rw-r--r-- 2.3 KB
summary.c -rw-r--r-- 23.6 KB
summary.h -rw-r--r-- 6.3 KB
super.c -rw-r--r-- 10.0 KB
symlink.c -rw-r--r-- 1.8 KB
wbuf.c -rw-r--r-- 35.9 KB
write.c -rw-r--r-- 21.0 KB
writev.c -rw-r--r-- 1.1 KB
xattr.c -rw-r--r-- 37.8 KB
xattr.h -rw-r--r-- 4.2 KB
xattr_trusted.c -rw-r--r-- 1.4 KB
xattr_user.c -rw-r--r-- 1.4 KB

README.Locking

back to top