Re: [PATCH 1/3] fs: allow short direct-io reads to be completed via buffered IO V2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 06, 2010 at 03:00:13PM -0400, Josef Bacik wrote:
> V1->V2: Check to see if our current ppos is >= i_size after a short DIO read,
> just in case it was actually a short read and we need to just return.
> 
> 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,

This seems safe to me, but I'm a bit worried about potential breakages.
Did you test this with xfsqa on xfs and ext3/4 to make sure there are
no regressions?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]