Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9849808ybi; Wed, 10 Jul 2019 18:30:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqya1bK7j9JKH1LIVEmaVrCNBICBeN0Jw3mDk1G4nHsNfiT/vtJw6hrKIJs4sIiPfCG/+Eeh X-Received: by 2002:a17:90a:30e4:: with SMTP id h91mr1526654pjb.37.1562808637453; Wed, 10 Jul 2019 18:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562808637; cv=none; d=google.com; s=arc-20160816; b=iaLE2qffMLsJiFAOcb8TGmWOR1SFV+3a0oV1SbP1Q6BbC1MQh3gR9QiZi6KlUWy6UW l87uTAYjHO63yOrJS7IRKzRADI9Y7TNJAOZyW3WnWr7+d1MtbECK14rWv/wiyVNRx9mm gtaJHTh95ugYARQ3g1xp8qrlDqJ0UxYsVYun81YtmTlMu3vRHrES9/wq5+BkWLa/zPA9 LZ6wC1OYyzxM7WMnctQC9FY1nag9l7JC1yZp9/rMUr79vBlSohD1HFigG5Oh7NNPA4a3 44cEHpv5/qPrq+91awIbd8IE4EU3S8qnHO1Pogx3WH/7RkGhikovBYJNZQezBK1XgHb1 BKQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=I2WYloI/szfGVLDN9ovv7m1+M3Ln7R/wd96MKN0wCjc=; b=04NyyoJ3Y7uwOvDIq33JaHVnYtSRmrOzpMCDIs23Y8gUv2bDXs+LaQy3KfuiWvL3NX 8d9Jlv4apmVK0h1DrTMqSFYMrE8YbPIFPa9VmIL+HTMPBK6qQU90jScDcujqNGVT2FJi PLwnQPDyCfWFlVlfg/GGEFd9r7rtrHXFr21Z2Tlwd+zOJRRYbel9AaGVq7wm5e8QkO6q yT8P/DDk8IWFhlDzvqAh5YdhCU9C0VrfdetUnGFdjGYqQA2n21qqEo85FL8bcNpl5uan NHg9WNkFbOrpNidk75OJPZf39DqVQ9b9B79IBc+z4ANHPF+ILOfWG+Dj55QYsMsETXSV VIJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si3362510pli.151.2019.07.10.18.30.21; Wed, 10 Jul 2019 18:30:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727829AbfGKB3c (ORCPT + 99 others); Wed, 10 Jul 2019 21:29:32 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:36360 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727619AbfGKB3b (ORCPT ); Wed, 10 Jul 2019 21:29:31 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B0C853725FF5F02D06FC; Thu, 11 Jul 2019 09:29:29 +0800 (CST) Received: from szvp000201624.huawei.com (10.120.216.130) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Thu, 11 Jul 2019 09:29:18 +0800 From: Chao Yu To: CC: , , , Chao Yu , Park Ju Hyung Subject: [PATCH v2] f2fs: improve print log in f2fs_sanity_check_ckpt() Date: Thu, 11 Jul 2019 09:29:15 +0800 Message-ID: <20190711012915.5581-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.18.0.rc1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As Park Ju Hyung suggested: "I'd like to suggest to write down an actual version of f2fs-tools here as we've seen older versions of fsck doing even more damage and the users might not have the latest f2fs-tools installed." This patch give a more detailed info of how we fix such corruption to user to avoid damageable repair with low version fsck. Signed-off-by: Park Ju Hyung Signed-off-by: Chao Yu --- v2: - add fixing patch's title in log suggested by Jaegeuk. fs/f2fs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 1a6d82d558e4..47dae7c3ae4f 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2696,7 +2696,9 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi) if (__is_set_ckpt_flags(ckpt, CP_LARGE_NAT_BITMAP_FLAG) && le32_to_cpu(ckpt->checksum_offset) != CP_MIN_CHKSUM_OFFSET) { - f2fs_warn(sbi, "layout of large_nat_bitmap is deprecated, run fsck to repair, chksum_offset: %u", + f2fs_warn(sbi, "using deprecated layout of large_nat_bitmap, " + "please run fsck v1.13.0 or higher to repair, chksum_offset: %u, " + "fixed with patch: \"f2fs-tools: relocate chksum_offset for large_nat_bitmap feature\"", le32_to_cpu(ckpt->checksum_offset)); return 1; } -- 2.18.0.rc1