Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6609324ybn; Mon, 30 Sep 2019 00:24:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEGkOZXOOlTD+wPNtrYT29ujvL+KwOanwAOaJ/YvZD0BK4OZytLxdqO6r0MYrjAOjxJbxk X-Received: by 2002:a17:906:5957:: with SMTP id g23mr17832819ejr.312.1569828299678; Mon, 30 Sep 2019 00:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569828299; cv=none; d=google.com; s=arc-20160816; b=g+QOrsoyB7qQ5cHqs+2vBsFgaLz4msH/pU75Xkq2jeQVlN3KT0oYhHgqW3PYg61AJM xfC/06G/g4j5AFUyM8yBhjDbbHGsOssiufT+aovNHQoOApw9XQQRW6z3VPbVS9wW1PbF 8oLmkDKkdnlo3xCG6WhA5L/ovdBBPB2AE80YUHw3vohxegXr5Th56JcUE3Yk5v9vrr1N a/T7Q87JSvF6KqXoC54PYV+lLDhsjEnbLptWEMJh5z0oUaiLFw44uGM+hiylaBzLaz1s d/iKmW5rZH7OqGTiSed5HSMSkKyscg5skxTroO1CAATcvwSPBsULlEfFjXRr9ch7FUem b1bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ihWmc8y2jKEX0/Yy8yl6UX8WYQDCAXuVk5ih+c6eLUs=; b=Za8S3N+57XXR2blNn0H0zRKmsk4I+UWoOvkXpdIe+S6cUmELk5FXbzcxc/QGhBhfa3 /g7VhDGa5VSLjMGnDpDQ545Y5rWMh/LCGeA2ZTTCgM1fr7mNAlj1GtVrGT0Srxv7WoHz 2QDE2H2WPM2aIC8nM5YMIAJ6AwtpR+s2bDzp6w1vOvlyRP/GA2KveOQ7aNiKU6Pa3SsO lMeeKBfQ2O64VWGR+StlSxOeJmL6fQIqYlaGV2xMHzCWbnuxXIzzuWTB91GKv6wtigPB k61nC7UczOg9VE9ZVUQcXHQs+/2D8q75UhrTs/Ck8q8fKVl3bqquTX84sXoTZ7j9EuUC gg2A== 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 y71si6809047ede.135.2019.09.30.00.24.35; Mon, 30 Sep 2019 00:24:59 -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 S1727702AbfI3HWO (ORCPT + 99 others); Mon, 30 Sep 2019 03:22:14 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:35133 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbfI3HWN (ORCPT ); Mon, 30 Sep 2019 03:22:13 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 7445D80436; Mon, 30 Sep 2019 09:21:57 +0200 (CEST) Date: Mon, 30 Sep 2019 09:21:57 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: Re: [PATCH 4.19 53/63] f2fs: fix to do sanity check on segment bitmap of LFS curseg Message-ID: <20190930072157.GB22914@atrey.karlin.mff.cuni.cz> References: <20190929135031.382429403@linuxfoundation.org> <20190929135040.450358370@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190929135040.450358370@linuxfoundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > + for (blkofs += 1; blkofs < sbi->blocks_per_seg; blkofs++) { > + if (!f2fs_test_bit(blkofs, se->cur_valid_map)) > + continue; > +out: > + f2fs_msg(sbi->sb, KERN_ERR, > + "Current segment's next free block offset is " > + "inconsistent with bitmap, logtype:%u, " > + "segno:%u, type:%u, next_blkoff:%u, blkofs:%u", > + i, curseg->segno, curseg->alloc_type, > + curseg->next_blkoff, blkofs); > + return -EINVAL; > + } So this is detecting filesystem corruption, right? Should it be -EUCLEAN? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html