From patchwork Sat Nov 22 15:02:48 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10230 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.176.167]) by ozlabs.org (Postfix) with ESMTP id D12FFDDE04 for ; Sun, 23 Nov 2008 02:02:55 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758206AbYKVPCv (ORCPT ); Sat, 22 Nov 2008 10:02:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758208AbYKVPCv (ORCPT ); Sat, 22 Nov 2008 10:02:51 -0500 Received: from mx2.redhat.com ([66.187.237.31]:60565 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758206AbYKVPCv (ORCPT ); Sat, 22 Nov 2008 10:02:51 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAMF2pQZ015851 for ; Sat, 22 Nov 2008 10:02:51 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mAMF2oAP013475 for ; Sat, 22 Nov 2008 10:02:50 -0500 Received: from liberator.sandeen.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mAMF2nOU012817 for ; Sat, 22 Nov 2008 10:02:49 -0500 Message-ID: <49281F18.7080404@redhat.com> Date: Sat, 22 Nov 2008 09:02:48 -0600 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: ext4 development Subject: [PATCH] e2fsck: ignore differing NEEDS_RECOVERY flag on backup sbs X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This is for RH bugzilla 471925 - Complete scan of filesystems expanded online When we resize online, the primary superblock gets copied to all the backups, and of course since we're mounted the NEEDS_RECOVERY flag is set. A subsequent fsck will find the backups have the NEEDS_RECOVERY flag set while the primary does not, and this forces a full fsck pass. I think this flag can be safely ignored in the flag comparisons. Signed-off-by: Eric Sandeen --- -- 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 Index: e2fsprogs/e2fsck/super.c =================================================================== --- e2fsprogs.orig/e2fsck/super.c 2008-11-22 07:54:47.000000000 -0600 +++ e2fsprogs/e2fsck/super.c 2008-11-22 08:59:45.953060973 -0600 @@ -860,7 +860,8 @@ void check_super_block(e2fsck_t ctx) * try to discourage it in the future. In particular, for the newer * ext4 files, especially EXT4_FEATURE_RO_COMPAT_DIR_NLINK and * EXT3_FEATURE_INCOMPAT_EXTENTS. So some of these may go away in the - * future. + * future. EXT3_FEATURE_INCOMPAT_RECOVER may also get set when + * copying the primary superblock during online resize. * * The kernel will set EXT2_FEATURE_COMPAT_EXT_ATTR, but * unfortunately, we shouldn't ignore it since if it's not set in the @@ -869,7 +870,8 @@ void check_super_block(e2fsck_t ctx) */ #define FEATURE_RO_COMPAT_IGNORE (EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \ EXT4_FEATURE_RO_COMPAT_DIR_NLINK) -#define FEATURE_INCOMPAT_IGNORE (EXT3_FEATURE_INCOMPAT_EXTENTS) +#define FEATURE_INCOMPAT_IGNORE (EXT3_FEATURE_INCOMPAT_EXTENTS| \ + EXT3_FEATURE_INCOMPAT_RECOVER) int check_backup_super_block(e2fsck_t ctx) {