android_kernel_samsung_msm8976/fs/exofs
Boaz Harrosh ed6161470c ore: Fix wrong math in allocation of per device BIO
commit aad560b7f63b495f48a7232fd086c5913a676e6f upstream.

At IO preparation we calculate the max pages at each device and
allocate a BIO per device of that size. The calculation was wrong
on some unaligned corner cases offset/length combination and would
make prepare return with -ENOMEM. This would be bad for pnfs-objects
that would in that case IO through MDS. And fatal for exofs were it
would fail writes with EIO.

Fix it by doing the proper math, that will work in all cases. (I
ran a test with all possible offset/length combinations this time
round).

Also when reading we do not need to allocate for the parity units
since we jump over them.

Also lower the max_io_length to take into account the parity pages
so not to allocate BIOs bigger than PAGE_SIZE

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:48:00 -08:00
..
BUGS
common.h
dir.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
exofs.h
file.c
inode.c exofs: don't leak io_state and pages on read error 2012-12-14 12:17:32 +02:00
Kbuild
Kconfig
Kconfig.ore
namei.c
ore.c ore: Fix wrong math in allocation of per device BIO 2014-02-13 13:48:00 -08:00
ore_raid.c block: Add bio_for_each_segment_all() 2013-03-23 14:26:28 -07:00
ore_raid.h
super.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
symlink.c
sys.c exofs: check for allocation failure in uri_store() 2012-08-12 21:54:44 +03:00