From patchwork Tue Mar 11 06:54:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darrick Wong X-Patchwork-Id: 328945 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A02DD2C00AB for ; Tue, 11 Mar 2014 17:55:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754566AbaCKGy4 (ORCPT ); Tue, 11 Mar 2014 02:54:56 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:21215 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754508AbaCKGyy (ORCPT ); Tue, 11 Mar 2014 02:54:54 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s2B6sqYe001460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Mar 2014 06:54:53 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s2B6sprJ000397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Mar 2014 06:54:52 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s2B6sprh029832; Tue, 11 Mar 2014 06:54:51 GMT Received: from localhost (/67.160.151.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Mar 2014 23:54:50 -0700 Subject: [PATCH 08/49] e2fsck: don't rehash inline directories To: tytso@mit.edu, darrick.wong@oracle.com From: "Darrick J. Wong" Cc: linux-ext4@vger.kernel.org Date: Mon, 10 Mar 2014 23:54:49 -0700 Message-ID: <20140311065449.30585.54020.stgit@birch.djwong.org> In-Reply-To: <20140311065356.30585.47192.stgit@birch.djwong.org> References: <20140311065356.30585.47192.stgit@birch.djwong.org> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 --- e2fsck/rehash.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;