From patchwork Wed Aug 23 02:33:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lu Fengqi X-Patchwork-Id: 9916481 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5186603F9 for ; Wed, 23 Aug 2017 02:34:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1E4128521 for ; Wed, 23 Aug 2017 02:34:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6DF328552; Wed, 23 Aug 2017 02:34:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C19F28521 for ; Wed, 23 Aug 2017 02:34:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753201AbdHWCeC (ORCPT ); Tue, 22 Aug 2017 22:34:02 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:47372 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753109AbdHWCeA (ORCPT ); Tue, 22 Aug 2017 22:34:00 -0400 X-IronPort-AV: E=Sophos;i="5.41,415,1498492800"; d="scan'208";a="24527017" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 23 Aug 2017 10:33:58 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id B869F46B5FD3 for ; Wed, 23 Aug 2017 10:34:00 +0800 (CST) Received: from localhost.localdomain (10.167.226.155) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 23 Aug 2017 10:33:58 +0800 From: Lu Fengqi To: CC: Su Yue Subject: [PATCH 1/6] btrfs-progs: check: enable repair in lowmem mode Date: Wed, 23 Aug 2017 10:33:45 +0800 Message-ID: <20170823023350.2940-2-lufq.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170823023350.2940-1-lufq.fnst@cn.fujitsu.com> References: <20170823023350.2940-1-lufq.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.155] X-yoursite-MailScanner-ID: B869F46B5FD3.AC67B X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: lufq.fnst@cn.fujitsu.com Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Su Yue Turn on the option --repair with --mode==lowmem in btrfsck. Signed-off-by: Su Yue --- cmds-check.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index c5faa2b..829f7c5 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -12844,12 +12844,10 @@ int cmd_check(int argc, char **argv) } /* - * Not supported yet + * experimental and dangerous */ - if (repair && check_mode == CHECK_MODE_LOWMEM) { - error("low memory mode doesn't support repair yet"); - exit(1); - } + if (repair && check_mode == CHECK_MODE_LOWMEM) + printf("Low memory mode supports repair partially\n"); radix_tree_init(); cache_tree_init(&root_cache);