Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6361461ybi; Mon, 8 Jul 2019 01:49:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzovnIXSRVkHWov+Mq+eWko0quvIINHCBLVuKL07pplEZ1hgtVFuhVx1bOTnFzoKgxxRtlE X-Received: by 2002:a17:90a:2488:: with SMTP id i8mr23207432pje.123.1562575797924; Mon, 08 Jul 2019 01:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562575797; cv=none; d=google.com; s=arc-20160816; b=qDYEFtDHLE/pjg+7JrAjgMTC4kz4wU2wG7G3ghsSAZJ/DGlgQc8AkWu9u0wFBftt+4 +UFCcWckGC9fG9/5AGjbmfYSN+ibTu0/YoWUG5FgQDKnTXG8Ckd76QW7r8rE8W/bdgi5 VlUFJJpS3F9n68i+3qkMRrRbQYF9HkGqs5I1K1c31X5yXYyBBmu2bOcDYhft5485Jgs+ CS7UaKXUYjAlziNXD3zalWCAmhkBKVHtKb2IVNPQ+Pz26561Z6VPPZw1bNPTaRjdiDeH Vo4hjb/Mf/Ahkxqoewq3ergyeOVuzcHOYFxkWJZp6rFjZQjfBmceHOfTt3IMBzmds5XT 6EwQ== 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=iAgZfiodj5JTqHPjWTzRSoutl5w/+0WpeO7vg/cY2XM=; b=HN6zKZHJNTr1WRnIA4NgsrFDEP9EzJd0YTmCc720aZNbQxDaWRSx+HmEJBx5nEXIbv BOyUkWj8Zn5f7YNSAK/JyBKskc//4El8CVgJQxZhNnAtpAHzI04lpAk4L67fb+oVUekb Ye0tdfKYbYmbJ8CbXSVfW4r0Y2xNIp/2MRDcLHAjIJ/1qM0tcQogWQZZCt2OpJwDmKrk c1cFyQ7dR1zOti+QYmDO4ecegoxDztqPHfQ0ZZ1Vl8ER7GBFSFNOPTHPrxKfVWzjUHsq FYUoylHzhEOYJoXa6DAWb9d0EEfRvYLGPYJaOfQRppXHi1UNDvOht+aBPzZQNDaWgc7q kHWw== 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 v143si17570510pgb.229.2019.07.08.01.49.40; Mon, 08 Jul 2019 01:49:57 -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 S1727493AbfGHG36 (ORCPT + 99 others); Mon, 8 Jul 2019 02:29:58 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52166 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727052AbfGHG35 (ORCPT ); Mon, 8 Jul 2019 02:29:57 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5C370CDD81E9BFB23896; Mon, 8 Jul 2019 14:29:32 +0800 (CST) Received: from szvp000201624.huawei.com (10.120.216.130) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Mon, 8 Jul 2019 14:29:23 +0800 From: Chao Yu To: CC: , , , Chao Yu , Park Ju Hyung Subject: [PATCH] f2fs: improve print log in f2fs_sanity_check_ckpt() Date: Mon, 8 Jul 2019 14:29:12 +0800 Message-ID: <20190708062912.104815-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 --- fs/f2fs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 019422a0844c..3cd6c8d810f9 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2737,7 +2737,8 @@ 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", le32_to_cpu(ckpt->checksum_offset)); return 1; } -- 2.18.0.rc1