[PATCH] fix corruption case for block size < page size
Eric Sandeen
sandeen at sandeen.net
Sat Dec 13 11:48:08 CST 2008
Eric Sandeen wrote:
> Index: xfs/fs/xfs/linux-2.6/xfs_aops.c
> ===================================================================
> --- xfs.orig/fs/xfs/linux-2.6/xfs_aops.c
> +++ xfs/fs/xfs/linux-2.6/xfs_aops.c
> @@ -1042,6 +1042,13 @@ xfs_page_state_convert(
> continue;
> }
>
> + /* This means its a hole (discard_buffer leaves uptodate set) */
>
I've offended cw's sense of grammar, and I did cringe when I removed
the apostrophe in the name of an 80char line, so how about this :)
Index: xfs/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_aops.c
+++ xfs/fs/xfs/linux-2.6/xfs_aops.c
@@ -1042,6 +1042,13 @@ xfs_page_state_convert(
continue;
}
+ /* It's a hole. (discard_buffer leaves uptodate set) */
+ if (!buffer_dirty(bh) && !buffer_mapped(bh) &&
+ buffer_uptodate(bh)) {
+ iomap_valid = 0;
+ continue;
+ }
+
if (iomap_valid)
iomap_valid = xfs_iomap_valid(&iomap, offset);
More information about the xfs
mailing list