[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140311065449.30585.54020.stgit@birch.djwong.org>
Date: Mon, 10 Mar 2014 23:54:49 -0700
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: tytso@....edu, darrick.wong@...cle.com
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 08/49] e2fsck: don't rehash inline directories
If a directory's contents are stored entirely inside the inode,
there's no index to rebuild and no dirblock checksum to recompute.
As far as I know these are the only two reasons to call dir rehash.
Therefore, we can move on to the next dir instead of what we do right
now, which is try to iterate the dir blocks (which of course fails due
to the inline_data iflag being set) and then flood stdout with useless
messages that aren't even failures.
Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
---
e2fsck/rehash.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
index 8a99453..3b05715 100644
--- a/e2fsck/rehash.c
+++ b/e2fsck/rehash.c
@@ -794,6 +794,11 @@ errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino)
outdir.hashes = 0;
e2fsck_read_inode(ctx, ino, &inode, "rehash_dir");
+ if (EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+ EXT4_FEATURE_INCOMPAT_INLINE_DATA) &&
+ (inode.i_flags & EXT4_INLINE_DATA_FL))
+ return 0;
+
retval = ENOMEM;
fd.harray = 0;
dir_buf = malloc(inode.i_size);
@@ -822,8 +827,6 @@ retry_nohash:
/* Read in the entire directory into memory */
retval = ext2fs_block_iterate3(fs, ino, 0, 0,
fill_dir_block, &fd);
- if (retval == EXT2_ET_INLINE_DATA_CANT_ITERATE)
- goto errout;
if (fd.err) {
retval = fd.err;
goto errout;
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists