fs: allow short direct-io reads to be completed via buffered IO
authorJosef Bacik <josef@redhat.com>
Sun, 23 May 2010 15:00:54 +0000 (11:00 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 25 May 2010 14:34:55 +0000 (10:34 -0400)
This is similar to what already happens in the write case.  If we have a short
read while doing O_DIRECT, instead of just returning, fallthrough and try to
read the rest via buffered IO.  BTRFS needs this because if we encounter a
compressed or inline extent during DIO, we need to fallback on buffered.  If the
extent is compressed we need to read the entire thing into memory and
de-compress it into the users pages.  I have tested this with fsx and everything
works great.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>

No differences found