path: root/arch/xtensa/platforms/xtfpga/setup.c
diff options
authorBoaz Harrosh <bharrosh@panasas.com>2013-11-21 17:58:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-13 13:48:00 -0800
commited6161470c6c8c45d97211d2426eb050dc382a4a (patch)
tree9e4c68894235b47f10835930c8bee8ba80aad269 /arch/xtensa/platforms/xtfpga/setup.c
parentc9f36c5a61a49fd873fc38aa447934ef2417d1d8 (diff)
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>
Diffstat (limited to 'arch/xtensa/platforms/xtfpga/setup.c')
0 files changed, 0 insertions, 0 deletions