linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsck: correct test for EOFBLOCKS
@ 2010-05-19 18:20 Eric Sandeen
  2010-05-19 19:08 ` tytso
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2010-05-19 18:20 UTC (permalink / raw)
  To: ext4 development; +Cc: Theodore Tso

This test, added to e2fsprogs-1.41.12, is backwards.

If EOFBLOCKS is set, then the size -should- be less than
the last physical block...

xfstests 013 caught this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: e2fsprogs-1.41.12/e2fsck/pass1.c
===================================================================
--- e2fsprogs-1.41.12.orig/e2fsck/pass1.c
+++ e2fsprogs-1.41.12/e2fsck/pass1.c
@@ -2013,7 +2013,7 @@ static void check_blocks(e2fsck_t ctx, s
 		 * doesn't need to be.
 		 */
 		if ((inode->i_flags & EXT4_EOFBLOCKS_FL) &&
-		    (size <= (((__u64)pb.last_block + 1) * fs->blocksize))) {
+		    (size >= (((__u64)pb.last_block + 1) * fs->blocksize))) {
 			pctx->blkcount = pb.last_block;
 			if (fix_problem(ctx, PR_1_EOFBLOCKS_FL_SET, pctx)) {
 				inode->i_flags &= ~EXT4_EOFBLOCKS_FL;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] e2fsck: correct test for EOFBLOCKS
  2010-05-19 18:20 [PATCH] e2fsck: correct test for EOFBLOCKS Eric Sandeen
@ 2010-05-19 19:08 ` tytso
  0 siblings, 0 replies; 2+ messages in thread
From: tytso @ 2010-05-19 19:08 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Wed, May 19, 2010 at 01:20:13PM -0500, Eric Sandeen wrote:
> This test, added to e2fsprogs-1.41.12, is backwards.
> 
> If EOFBLOCKS is set, then the size -should- be less than
> the last physical block...
> 
> xfstests 013 caught this.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Oops, *blush*.   Applied and pushed out.

There will likely be a 1.41.13 happening next week.  Let me know ASAP
if there are any other mistakes or patches that you think should go in
to the release.

      		 	     	    - Ted


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-19 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 18:20 [PATCH] e2fsck: correct test for EOFBLOCKS Eric Sandeen
2010-05-19 19:08 ` tytso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).