From patchwork Wed May 30 12:51:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 922780 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40wr7n0rhxz9s1R for ; Wed, 30 May 2018 22:51:33 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753313AbeE3Mvb (ORCPT ); Wed, 30 May 2018 08:51:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:46675 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753163AbeE3MvZ (ORCPT ); Wed, 30 May 2018 08:51:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9BEF7AEE8; Wed, 30 May 2018 12:51:24 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 4A0C11E121B; Wed, 30 May 2018 14:51:24 +0200 (CEST) From: Jan Kara To: Ted Tso Cc: , Jan Kara Subject: [PATCH 08/10] debugfs: Allow fixing superblock errors in catastrophic mode Date: Wed, 30 May 2018 14:51:16 +0200 Message-Id: <20180530125118.25274-9-jack@suse.cz> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180530125118.25274-1-jack@suse.cz> References: <20180530125118.25274-1-jack@suse.cz> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Open filesystem with EXT2_FLAG_IGNORE_SB_ERRORS flag in catastrophic mode so that superblock errors can be fixed in debugfs. Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger --- debugfs/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index b1842443aa8e..51e3783bfa86 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -160,7 +160,7 @@ static void open_filesystem(char *device, int open_flags, blk64_t superblock, } if (catastrophic) - open_flags |= EXT2_FLAG_SKIP_MMP; + open_flags |= EXT2_FLAG_SKIP_MMP | EXT2_FLAG_IGNORE_SB_ERRORS; if (undo_file) { retval = debugfs_setup_tdb(device, undo_file, &io_ptr);