xfs
[Top] [All Lists]

Re: [PATCH] fix corruption case for block size < page size

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: Re: [PATCH] fix corruption case for block size < page size
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sat, 13 Dec 2008 11:48:08 -0600
In-reply-to: <49435F35.40109@xxxxxxxxxxx>
References: <49435F35.40109@xxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.18 (Macintosh/20081105)
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);
 

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