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
9p
adfs
affs
afs
autofs4
befs
bfs
btrfs
cachefiles
ceph
cifs
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs
efs
exofs
exportfs
ext2
ext3
ext4
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2
jfs
lockd
logfs
minix
ncpfs
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
proc
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
ubifs
udf
ufs
xfs
Kconfig -rw-r--r-- 6.2 KB
Kconfig.binfmt -rw-r--r-- 6.4 KB
Makefile -rw-r--r-- 4.0 KB
aio.c -rw-r--r-- 47.6 KB
anon_inodes.c -rw-r--r-- 6.4 KB
attr.c -rw-r--r-- 6.7 KB
bad_inode.c -rw-r--r-- 7.8 KB
binfmt_aout.c -rw-r--r-- 11.7 KB
binfmt_elf.c -rw-r--r-- 54.6 KB
binfmt_elf_fdpic.c -rw-r--r-- 48.3 KB
binfmt_em86.c -rw-r--r-- 2.8 KB
binfmt_flat.c -rw-r--r-- 26.7 KB
binfmt_misc.c -rw-r--r-- 15.1 KB
binfmt_script.c -rw-r--r-- 2.8 KB
binfmt_som.c -rw-r--r-- 7.1 KB
bio-integrity.c -rw-r--r-- 21.2 KB
bio.c -rw-r--r-- 39.5 KB
block_dev.c -rw-r--r-- 41.7 KB
buffer.c -rw-r--r-- 85.5 KB
char_dev.c -rw-r--r-- 13.8 KB
compat.c -rw-r--r-- 44.5 KB
compat_binfmt_elf.c -rw-r--r-- 3.5 KB
compat_ioctl.c -rw-r--r-- 45.2 KB
dcache.c -rw-r--r-- 77.8 KB
dcookies.c -rw-r--r-- 6.8 KB
direct-io.c -rw-r--r-- 38.5 KB
drop_caches.c -rw-r--r-- 1.5 KB
eventfd.c -rw-r--r-- 11.0 KB
eventpoll.c -rw-r--r-- 51.5 KB
exec.c -rw-r--r-- 52.5 KB
fcntl.c -rw-r--r-- 18.7 KB
fhandle.c -rw-r--r-- 6.5 KB
fifo.c -rw-r--r-- 3.2 KB
file.c -rw-r--r-- 11.8 KB
file_table.c -rw-r--r-- 12.6 KB
filesystems.c -rw-r--r-- 6.3 KB
fs-writeback.c -rw-r--r-- 36.6 KB
fs_struct.c -rw-r--r-- 3.9 KB
generic_acl.c -rw-r--r-- 3.8 KB
inode.c -rw-r--r-- 44.6 KB
internal.h -rw-r--r-- 2.9 KB
ioctl.c -rw-r--r-- 15.7 KB
ioprio.c -rw-r--r-- 4.8 KB
libfs.c -rw-r--r-- 25.8 KB
locks.c -rw-r--r-- 58.9 KB
mbcache.c -rw-r--r-- 16.4 KB
mount.h -rw-r--r-- 2.0 KB
mpage.c -rw-r--r-- 20.0 KB
namei.c -rw-r--r-- 84.4 KB
namespace.c -rw-r--r-- 63.2 KB
no-block.c -rw-r--r-- 688 bytes
open.c -rw-r--r-- 26.3 KB
pipe.c -rw-r--r-- 28.9 KB
pnode.c -rw-r--r-- 8.8 KB
pnode.h -rw-r--r-- 1.4 KB
posix_acl.c -rw-r--r-- 9.2 KB
proc_namespace.c -rw-r--r-- 7.5 KB
read_write.c -rw-r--r-- 22.4 KB
read_write.h -rw-r--r-- 542 bytes
readdir.c -rw-r--r-- 6.9 KB
select.c -rw-r--r-- 24.2 KB
seq_file.c -rw-r--r-- 19.4 KB
signalfd.c -rw-r--r-- 8.0 KB
splice.c -rw-r--r-- 46.3 KB
stack.c -rw-r--r-- 2.5 KB
stat.c -rw-r--r-- 10.6 KB
statfs.c -rw-r--r-- 5.2 KB
super.c -rw-r--r-- 29.9 KB
sync.c -rw-r--r-- 9.9 KB
timerfd.c -rw-r--r-- 8.6 KB
utimes.c -rw-r--r-- 5.7 KB
xattr.c -rw-r--r-- 17.7 KB
xattr_acl.c -rw-r--r-- 2.3 KB

back to top