]> git.baikalelectronics.ru Git - kernel.git/commit
direct-io: do not merge logically non-contiguous requests
authorJosef Bacik <josef@redhat.com>
Sun, 23 May 2010 15:00:55 +0000 (11:00 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 25 May 2010 14:34:56 +0000 (10:34 -0400)
commit62f58c3856b7d0c990dd4c2c741fd759327aa6ea
tree4b5f71682270b151e38e9649a40da30564dacfdd
parentb122a5011427e54d76e18983fed034cace0a03b5
direct-io: do not merge logically non-contiguous requests

Btrfs cannot handle having logically non-contiguous requests submitted.  For
example if you have

Logical:  [0-4095][HOLE][8192-12287]
Physical: [0-4095]      [4096-8191]

Normally the DIO code would put these into the same BIO's.  The problem is we
need to know exactly what offset is associated with what BIO so we can do our
checksumming and unlocking properly, so putting them in the same BIO doesn't
work.  So add another check where we submit the current BIO if the physical
blocks are not contigous OR the logical blocks are not contiguous.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/direct-io.c