From mboxrd@z Thu Jan 1 00:00:00 1970 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 8228327470 for ; Mon, 13 Apr 2026 22:47:23 +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=1776120443; cv=none; b=LaDCnjlBB326aQ7mXFyTwmYcmrO/d35jCi4mBSFpm0qd2MBnzyvC38E2P5J5kat6rPq1rQ2gd48U5do/bQGD8CKpTumMrADJ56iHX7gCSc2RNlOhgsqiKZgjoggCSaN72dVFmuG2tD16YtnJkTV+hIg1nv5LxkrDW9LCZXXJiNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776120443; c=relaxed/simple; bh=PBJPML5TBMWM87+bWX2GivtKR9lgNeG0jmnaOaw+fo8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n8aKvRgdu6xaVq/v27YV9nPniXEBHG5Sy26YCC+woWn7lvqfuW4OYBLahGab9KldVdBalubZHxQfhHM4iszQK+kLTHcrn2cZeqyi5xbGsU10aUjC/HJ5ysYUlUHXprHS4+yVFItUzKcpQAJCu6cGNKtIoukYP4/38JooymqmdhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ggm2pcEb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ggm2pcEb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E15EC2BCAF; Mon, 13 Apr 2026 22:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776120443; bh=PBJPML5TBMWM87+bWX2GivtKR9lgNeG0jmnaOaw+fo8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ggm2pcEb6HtsWCEHl7guOnOOpQ1lwohuMHDhEePL1ne2uAOd0yd0+WK7S72A55Aft gCWgS8awDkko0oae0YULL7cZ7GKxaFwgS46JaR148irtVTCnHe0eY0fEbh6HzmAD3j 9GUeJmekC/V6E5y2bU6q5SAZ6gDfYgzq3eYvK3acnRjWE4EkMIyati+v1Q/b4M7on8 hW6Z79Kb79OBYW8WAnc++BmjbK2Vf+1vFqK3d1eJ/6myw6iPHws46Jy+lULW3u1C0C YvN3309+UQHfQ5Q/SqaQFxEfZrvTYgUtTux7Ja1fHseAtydwa2XsXntidglpacwXIy J7QMQcKG1ERww== Date: Mon, 13 Apr 2026 22:47:21 +0000 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH v3] f2fs: do not support mmap write for large folio Message-ID: References: <20260406154940.2407853-1-jaegeuk@kernel.org> <116344cd-c591-42c9-9593-2e999c2029d8@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=us-ascii Content-Disposition: inline In-Reply-To: <116344cd-c591-42c9-9593-2e999c2029d8@kernel.org> On 04/13, Chao Yu wrote: > On 4/9/2026 2:13 AM, Jaegeuk Kim via Linux-f2fs-devel wrote: > > Let's check mmap writes onto the large folio, since we don't support writing > > large folios. > > > > Reviewed-by: Daeho Jeong > > Signed-off-by: Jaegeuk Kim > > --- > > > > - log v2: > > : add comments > > > > fs/f2fs/file.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > > index 2c4880f24b54..c0220cd7b332 100644 > > --- a/fs/f2fs/file.c > > +++ b/fs/f2fs/file.c > > @@ -82,7 +82,12 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf) > > int err = 0; > > vm_fault_t ret; > > - if (unlikely(IS_IMMUTABLE(inode))) > > + /* > > + * We only support large folio on the read case. > > + * Don't make any dirty pages. > > + */ > > + if (unlikely(IS_IMMUTABLE(inode)) || > > + mapping_large_folio_support(inode->i_mapping)) > > return VM_FAULT_SIGBUS; > > The code itself looks good, since it's an impossible case, should we > use f2fs_bug_on(, mapping_large_folio_support()) to catch any bug case > rather than just returning error here w/o log? Instead of kernel panicing for the production, I'd leave a kernel message first. > > Thanks, > > > if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {