[PATCH 2/3] xfs: serialise unaligned direct IO into unwritten extents
Alex Elder
aelder at sgi.com
Fri Jul 23 10:30:04 CDT 2010
On Fri, 2010-07-23 at 20:41 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> If we do unaligned direct IO to a unwritten extent, the direct Io
> code does sub-block zeroing for us. However, we need to serialise
> the sub-block zeroing as we canot have another outstanding IO to the
> same block that is being zeroed at the same time. Ifw e do so, then
> we'll have two direct IOs to the same block that zero different
> portions of the block and we'll end up with zeros where we should
> have data.
>
> Serialise such IOs in the get_blocks callback when we know that we
> are mapping an unaligned direct IO. This initial implementation is
> the sledge-hammer approach - we can probably be finer grained than
> this to avoid excessive serialisation when all IO is unaligned to a
> file.
>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
Looks good.
Reviewed-by: Alex Elder <aelder at sgi.com>
More information about the xfs
mailing list