From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] e2fck: don't complain about i_size for known blocks past EOF
Date: Tue, 19 Jan 2010 15:21:50 -0600 [thread overview]
Message-ID: <4B56226E.2090204@redhat.com> (raw)
This is the userspace side of Jiaying's EOFBLOCKS patch, I think.
With Aneesh's patches for .33, Jiaying's patch, and this one,
xfstests 013/fsstress (even with direct IO enabled) has held up
through many runs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 09ff1d0..0a2c6cb 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -1947,7 +1947,8 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
/* allow allocated blocks to end of PAGE_SIZE */
(size < (__u64)pb.last_block * fs->blocksize) &&
(pb.last_block / blkpg * blkpg != pb.last_block ||
- size < (__u64)(pb.last_block & ~(blkpg-1)) *fs->blocksize))
+ size < (__u64)(pb.last_block & ~(blkpg-1)) *fs->blocksize) &&
+ !(inode->i_flags & EXT4_EOFBLOCKS_FL))
bad_size = 3;
else if (!(extent_fs && (inode->i_flags & EXT4_EXTENTS_FL)) &&
size > ext2_max_sizes[fs->super->s_log_block_size])
diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
index 114b001..6e31c0d 100644
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -276,10 +276,11 @@ struct ext2_dx_countlimit {
#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
#define EXT4_HUGE_FILE_FL 0x00040000 /* Set to each huge file */
#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */
+#define EXT4_EOFBLOCKS_FL 0x00400000 /* Blocks allocated beyond EOF */
#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
-#define EXT2_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */
-#define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */
+#define EXT2_FL_USER_VISIBLE 0x004BDFFF /* User visible flags */
+#define EXT2_FL_USER_MODIFIABLE 0x004B80FF /* User modifiable flags */
/*
* ioctl commands
next reply other threads:[~2010-01-19 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 21:21 Eric Sandeen [this message]
2010-02-24 16:25 ` [PATCH] e2fck: don't complain about i_size for known blocks past EOF tytso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B56226E.2090204@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).