[Top] [All Lists]

Re: [PATCH 1/3] xfs: fix corruption case for block size < page size

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/3] xfs: fix corruption case for block size < page size
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 15 Jun 2010 11:21:15 +1000
Cc: xfs@xxxxxxxxxxx, Eric Sandeen <sandeen@xxxxxxxxxxx>
In-reply-to: <20100611161510.303551652@xxxxxxxxxxxxxxxxxxxxxx>
References: <20100611161312.446670249@xxxxxxxxxxxxxxxxxxxxxx> <20100611161510.303551652@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Jun 11, 2010 at 12:13:13PM -0400, Christoph Hellwig wrote:
> From: Eric Sandeen <sandeen@xxxxxxxxxxx>                                      
> xfstests 194 first truncats a file back and then extends it again by
> truncating it to a larger size.  This causes discard_buffer to drop
> the mapped, but not the uptodate bit and thus creates something that
> xfs_page_state_convert takes for unmapped space created by mmap because
> it doesn't check for the dirty bit, which also gets cleared by
> discard_buffer and checked by other ->writepage implementations like
> block_write_full_page.  Handle this kind of buffers early, and unlike
> Eric's first version of the patch simply ASSERT that the buffers is
> dirty, given that the mmap write case can't happen anymore since the
> introduction of ->page_mkwrite.  The now dead code dealing with that
> will be deleted in a follow on patch.
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks good.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

Dave Chinner

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