diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2013-11-21 17:58:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-13 11:51:11 -0800 |
commit | 0cc70c5ec55e404dd4c970a3566dc60508088932 (patch) | |
tree | 45496133db35e147867f02d0a77e889a387cc82c /fs/logfs/file.c | |
parent | 0b909374b96f4ac56fcb18f3a94ff5c359ab46fa (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 'fs/logfs/file.c')
0 files changed, 0 insertions, 0 deletions