Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1645025rbb; Mon, 26 Feb 2024 17:13:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWqMIKBL6n3frsIkyDQrQnER67DpeDf33lf2JhC8N9BxvK1k7Cv5h7KoA8i6S/yGGmy4MjFfyzbohdpTekAcv1MaXUPD8lHFcoQY1+LEQ== X-Google-Smtp-Source: AGHT+IEU86EhJvFxqVau3AQCzpGndmd22vS/DRCeSg2ym1c2z/d3WbqBTKyW7eutuqRz2xnw18/t X-Received: by 2002:ac8:7d0e:0:b0:42e:5f63:6fee with SMTP id g14-20020ac87d0e000000b0042e5f636feemr15645104qtb.32.1708996427692; Mon, 26 Feb 2024 17:13:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708996427; cv=pass; d=google.com; s=arc-20160816; b=wKv6+dTEw7dPfUDfuD9x5iKXu0cDST/ICSLjBiebJQOUN45Lnnv/9haOZxRm0EXcSB Ysc37XG3S+yoiuYQBeTfjNiof/c7GMUXspB+QSPI7hGPYVv6AkWkEF855nKCUWuNWTIn JkndjPRICKgJNTZVk2Uipi+WRzFgmLzE++cFxDYk4zdCAy9pGoK4AJQguXEmSMh4I6/6 FBQOikkns+oPN1/5VhEnAa/B/u0h3RJHBU1uNPH5TPbU0K2ml27/5W+MElHoi70WoklT cXQFPV31zmjMgaxH6lvcHfFp+8Fm8QBkH86lkrw6/vWlHCUPP/N65W+dJE9AL9EvtDIH a/Aw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FsrXJj33nBsxDisz56uF8YdXqMtH0gjbQixjASNz2Xc=; fh=2ARpwdG68HZ7SKn6kDQuju5MqfuZTzMf3DwprLMRjzk=; b=LjkBZF0UCpTzTx/lZ4VTlQovIW30Hh3F7rmEnzOetNvCjbjDEMYOPcy52KkDYLeFZz qfG8bmISZv+xX48CH68JDeEqrELC40HFyePivj+fyt4xRFeVXxg7QiclIeULNMT7Xr/F frcbam67ir3fEp4FMGU+fGbmZQhh9E9Adgcpjo/4+CYF8OjWE+ZyGZfBcQSy31YshIbI PKQOQrjekhCfyiTUNneLxaaBcoFMvSeb84MgydqnahkvaAE+/bPkBtjxl6r0rj53xAb0 fta0BNAtP/WOrFiB9NLlW7HqnGx7psQyyISZIL/TzlO3hUHAQfRw5zOVmx1rys/kW+Zn hkaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QzaEeX4U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-82512-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82512-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k13-20020ac8478d000000b0042e76fdd889si5752534qtq.511.2024.02.26.17.13.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 17:13:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82512-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QzaEeX4U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-82512-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82512-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 73DEC1C2323C for ; Tue, 27 Feb 2024 01:13:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 297694C6F; Tue, 27 Feb 2024 01:13:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QzaEeX4U" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49D424A21 for ; Tue, 27 Feb 2024 01:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708996422; cv=none; b=SN6S1STm0J7q6x3qJKEF4zJ2ai4EK+4uXhKrRRdk8rOLLebwfRYwhwAw7pMkXbChO7CGoH1n6kYuTbZnzEVteLe3sNAVnTI2qKjI47Pf7aqoORhkocPL2+7wdKKbTRML8B192dZIXGw7+SVbqESOdDJLpKWgMYobVNeYT3TOtmc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708996422; c=relaxed/simple; bh=5PDnWAX4phBCOwS98U0hZVMe7Y5bjQHTEVxEgZmGQLc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=suXtjW6u4qJaSawUTiL0aN4cpD51wGlXf5cNzXPzs6M3OtPQE8xxKog/U6blUZrj+rhYHX462Sqg3TUB2uedTfpKSyvn/QENxikjsEwTHiIQEad2n/NH914Fr8KzmakLH4aqgtfzP6xYSNLDduZOAQ7ZWZrMMYAz6gvxTqcspAo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QzaEeX4U; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99E9CC433F1; Tue, 27 Feb 2024 01:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708996421; bh=5PDnWAX4phBCOwS98U0hZVMe7Y5bjQHTEVxEgZmGQLc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QzaEeX4U6DGk4Oc2KOe2Mh3QpYN9uWdFBH8WFYrpqPb5zgM0igI+2dq/QOlIdkWDB ncNdyn4+9FrMkJc9RPrROepm83uKiY8OTcWgpfg1Mf1SqwhRrOMj28RJRaZsDv2WMi VpnIseD6XXb5arpLY27XkrpXokarc9PbIu6jNkQ64tA2P32Q8ZbIYm7YJzXeqqmx8Z nYM7SZacYwhNQI7Pp5WObE7TpFXYDYHipWdAJvlQ/vM8u7yuMhc1xKceooJfeDRRyz wJWqZ9TvUxLVyJfBbRyAyOjJCUvp/xv4oMIWj4yyjjipVOQJOGYMTTsqSeUJC6k726 PAb1oz+UAQwiA== Date: Mon, 26 Feb 2024 17:13:40 -0800 From: Jaegeuk Kim To: Zhiguo Niu Cc: Chao Yu , Zhiguo Niu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, ke.wang@unisoc.com, hongyu.jin@unisoc.com Subject: Re: [PATCH v2 0/4] f2fs: fix panic issue in small capacity device Message-ID: References: <1707271264-5551-1-git-send-email-zhiguo.niu@unisoc.com> <88459a22-a21c-4c3d-8371-31d7d713b536@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 02/26, Zhiguo Niu wrote: > Dear Chao, > > On Fri, Feb 23, 2024 at 10:38 AM Chao Yu wrote: > > > > On 2024/2/23 10:01, Zhiguo Niu wrote: > > > > > > > > > On Thu, Feb 22, 2024 at 8:30 PM Chao Yu > wrote: > > > > > > On 2024/2/7 10:01, Zhiguo Niu wrote: > > > > A panic issue happened in a reboot test in small capacity device > > > > as following: > > > > 1.The device size is 64MB, and main area has 24 segments, and > > > > CONFIG_F2FS_CHECK_FS is not enabled. > > > > 2.There is no any free segments left shown in free_segmap_info, > > > > then another write request cause get_new_segment get a out-of-bound > > > > segment with segno 24. > > > > 3.panic happen in update_sit_entry because access invalid bitmap > > > > pointer. > > > > > > Zhiguo, > > > > > > Can you please try below patch to see whether it can fix your problem? > > > > > > https://lore.kernel.org/linux-f2fs-devel/20240222121851.883141-3-chao@kernel.org > > > > > > Thanks, > > > > > > > > > Dear Chao, > > > I need to coordinate the testing resources. The previous testing has been stopped because it was fixed with the current patch. In addition, this requires stability testing to reproduce, so it will take a certain amount of time. If there is any situation, I will tell you in time. > > > > Zhiguo, thank you! > > We tested this patch this weekend on the previous version with > problem, and it can not reproduce panic issues, > so this patch should fix the original issue. > thanks! Hey, do you guys please point out which patches were tested without what? IOWs, which patches should I remove and keep Chao's patch? > > > > > BTW, I've tested this patch for a while, and it looks there is no issue w/ > > FAULT_NO_SEGMENT fault injection is on. > > > > > btw, Why can’t I see this patch on your branch^^? > > > https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=dev-test > > > > Too lazy to push patches in time, will do it in this weekend. :P > > > > > thanks! > > > > > > > > > > > > > > More detail shown in following patch sets. > > > > The three patches are splited here because the modifications are > > > > relatively independent and more readable. > > > > > > > > --- > > > > Changes of v2: stop checkpoint when get a out-of-bound segment > > > > --- > > > > > > > > Zhiguo Niu (4): > > > > f2fs: correct counting methods of free_segments in __set_inuse > > > > f2fs: fix panic issue in update_sit_entry > > > > f2fs: enhance judgment conditions of GET_SEGNO > > > > f2fs: stop checkpoint when get a out-of-bounds segment > > > > > > > > fs/f2fs/file.c | 7 ++++++- > > > > fs/f2fs/segment.c | 21 ++++++++++++++++----- > > > > fs/f2fs/segment.h | 7 ++++--- > > > > include/linux/f2fs_fs.h | 1 + > > > > 4 files changed, 27 insertions(+), 9 deletions(-) > > > > > > >