From patchwork Tue Jun 12 09:53:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 928256 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 414myq2n0xz9s1B for ; Tue, 12 Jun 2018 20:56:19 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933421AbeFLK4I (ORCPT ); Tue, 12 Jun 2018 06:56:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:40090 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933367AbeFLK4H (ORCPT ); Tue, 12 Jun 2018 06:56:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E7FE6ADBD; Tue, 12 Jun 2018 10:56:05 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 3A0451E11DA; Tue, 12 Jun 2018 11:53:35 +0200 (CEST) From: Jan Kara To: Cc: Ted Tso , Jan Kara Subject: [PATCH 07/10] debugfs: Allow read-write opening in catastrophic mode Date: Tue, 12 Jun 2018 11:53:25 +0200 Message-Id: <20180612095328.5215-8-jack@suse.cz> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20180612095328.5215-1-jack@suse.cz> References: <20180612095328.5215-1-jack@suse.cz> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Allow filesystem to be open read-write in catastrophic mode so that one can fixup e.g. superblock breakage. The CHECK_FS_BITMAPS flag to common_args_process() still guards us from doing operations on bitmaps which we don't load in this mode. Signed-off-by: Jan Kara --- debugfs/debugfs.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 905c8cdc6733..b1842443aa8e 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -159,11 +159,6 @@ static void open_filesystem(char *device, int open_flags, blk64_t superblock, } } - if (catastrophic && (open_flags & EXT2_FLAG_RW)) { - com_err(device, 0, - "opening read-only because of catastrophic mode"); - open_flags &= ~EXT2_FLAG_RW; - } if (catastrophic) open_flags |= EXT2_FLAG_SKIP_MMP;