[Top] [All Lists]

Re: [PATCH 2/3] xfs: serialise unaligned direct IO into unwritten extent

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/3] xfs: serialise unaligned direct IO into unwritten extents
From: Alex Elder <aelder@xxxxxxx>
Date: Fri, 23 Jul 2010 10:30:04 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1279881678-1660-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1279881678-1660-1-git-send-email-david@xxxxxxxxxxxxx> <1279881678-1660-3-git-send-email-david@xxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Fri, 2010-07-23 at 20:41 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 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@xxxxxxxxxx>

Looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>