From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 94726C282EC for ; Fri, 14 Mar 2025 21:38:32 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1ttCje-0003JR-Dv; Fri, 14 Mar 2025 21:38:29 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ttCjd-0003JJ-PB for linux-f2fs-devel@lists.sourceforge.net; Fri, 14 Mar 2025 21:38:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=52kMjaFTz2ki83l5oxeZPwzTGe8Hl7aACtzIdIBZkWE=; b=dlv1cmPlSqpt/QBM/6YGvCy9e0 Q8bjbwqhNWVgycLmwNcgUmx4S7gWSWz66G4x6Wxq/IWQnpwv2XvlZmTz8fGf0Qv6Tn2QOIftgJ7+2 M/on8zQfK8d1igFi3i98QeESbKqPMQ6sWKasD3s96GuGN0p5usYj7j7la2cQWKE7aZtE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=52kMjaFTz2ki83l5oxeZPwzTGe8Hl7aACtzIdIBZkWE=; b=FfonzY45JvTjJDzS2/QKGDExWw GHEQpOIKzog1/z/+X5HB0NnUioclSWrLwm5lDX3n3EpXbPa7iGvGQbQSKbwRev5ev7IcQ1iyGT3j2 p0daUatDrpmGCiobwSgGPEf6urdQVMtS4B6GiEXjeaODGoRdF364eAPHwRstdYyeHL7s=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1ttCjX-0005Dv-EF for linux-f2fs-devel@lists.sourceforge.net; Fri, 14 Mar 2025 21:38:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 74D4E5C04C4; Fri, 14 Mar 2025 21:36:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0C66C4CEE3; Fri, 14 Mar 2025 21:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741988297; bh=IRXjJzAr7EsTIKu9jsqdnzEQqA3yrEBhqvwHTh/5aWc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DpdZwmGx7956G3KCAXqk7wnSE0jR0t0HLGZUQcxQppEPPNRD5Lf4RqNN7iHC9egwY 9NPv0hTBAUeeADxwlmjHTyPlGEyB6ox6gPS41fooANbgkbGvWlof4bmUZufGvD9hBH ++6u9VJ7c6+Rik6QYDSAm7sGNlmPK8qYd30SHefVUIklvVCDDA12AjQqdc3E1rZZDj tL5E7uMawgSiXHAJhJzJgVG8sTLiyXzSW0YDJ7S3SRzO/ZSrrgb/cSwpz4Sp8pM2PR B6GG8nFUc8KaZgh9E0geBAqfv9+3Qp0+faBZ2wfMHkLtjToIS17zYUrA8XeEgBThL2 3nUV3fHoiHg+w== Date: Fri, 14 Mar 2025 21:38:15 +0000 To: Matthew Wilcox Message-ID: References: <20250307182151.3397003-1-willy@infradead.org> <174172263873.214029.5458881997469861795.git-patchwork-notify@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1ttCjX-0005Dv-EF Subject: Re: [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jaegeuk Kim via Linux-f2fs-devel Reply-To: Jaegeuk Kim Cc: linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 03/14, Matthew Wilcox wrote: > On Wed, Mar 12, 2025 at 01:22:41AM +0000, Jaegeuk Kim wrote: > > On 03/12, Matthew Wilcox wrote: > > > On Tue, Mar 11, 2025 at 07:50:38PM +0000, patchwork-bot+f2fs@kernel.org wrote: > > > > Hello: > > > > > > > > This series was applied to jaegeuk/f2fs.git (dev) > > > > by Jaegeuk Kim : > > > > > > Thanks! > > > > > > FWIW, I have a tree with 75 patches in it on top of this that do more > > > folio conversion work. It's not done yet; maybe another 200 patches to > > > go? I don't think it's worth posting at this point in the cycle, so > > > I'll wait until -rc1 to post, by which point it'll probably be much > > > larger. > > > > Ok, thanks for the work! Will keep an eye on. > > Unfortunately, I thnk I have to abandon this effort. It's only going > to make supporting large folios harder (ie there would then need to be > an equivalently disruptive series adding support for large folios). > > The fundamental problem is that f2fs has no concept of block size != > PAGE_SIZE. So if you create a filesystem on a 4kB PAGE_SIZE kernel, > you can't mount it on a 16kB PAGE_SIZE kernel. An example: > > int f2fs_recover_inline_xattr(struct inode *inode, struct page *page) > { > struct f2fs_inode *ri; > ipage = f2fs_get_node_page(F2FS_I_SB(inode), inode->i_ino); > ri = F2FS_INODE(page); > > so an inode number is an index into the filesystem in PAGE_SIZE units, > not in filesystem block size units. Fixing this is a major effort, and > I lack the confidence in my abilities to do it without breaking anything. > > As an outline of what needs to happen, I think that rather than passing > around so many struct page pointers, we should be passing around either > folio + offset, or we should be passing around struct f2fs_inode pointers. > My preference is for the latter. We can always convert back to the > folio containing the inode if we need to (eg to mark it dirty) and it > adds some typesafety by ensuring that we're passing around pointers that > we believe belong to an inode and not, say, a struct page which happens > to contain a directory entry. > > This is a monster task, I think. I'm going to have to disable f2fs > from testing with split page/folio. This is going to be a big problem > for Android. I see. fyi; in Android, I'm thinking to run 16KB page kernel with 16KB format natively to keep block_size = PAGE_SIZE. Wasn't large folio to support a set of pages while keeping block_size = PAGE_SIZE? _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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 875C5130AC8 for ; Fri, 14 Mar 2025 21:38:17 +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=1741988298; cv=none; b=qmFuZL/tdILVxXhCmTHQxsE24WlFj15fBsoO7pOQdJ5eMTpUSUDMnNRbLNPrb++usjmQn8wyMacqqHCecm+Xws7l/iMRBmOaFoqxTUKlqhwcGGSW5y21jIdokLnYI8pvPW/EFph02Yz6Hp/aoh1Ak16f746BjPaI8HPHNwYYXg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741988298; c=relaxed/simple; bh=IRXjJzAr7EsTIKu9jsqdnzEQqA3yrEBhqvwHTh/5aWc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d2hQg1QptiIemYG4RkVTkUsA8VgRGxMG+GWLrc+vVx2cD7dD4O2tdmvgM83til41IxURDl449/LaZfiBkOd4WDCyF4CGwy5uLfl30azNOymDzNtWhhxhlMXURlJFqCrmB3BI4zMi9r8RFbTz5NKjowv9+CSZgunvM4A9GfjrdtA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DpdZwmGx; 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="DpdZwmGx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0C66C4CEE3; Fri, 14 Mar 2025 21:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741988297; bh=IRXjJzAr7EsTIKu9jsqdnzEQqA3yrEBhqvwHTh/5aWc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DpdZwmGx7956G3KCAXqk7wnSE0jR0t0HLGZUQcxQppEPPNRD5Lf4RqNN7iHC9egwY 9NPv0hTBAUeeADxwlmjHTyPlGEyB6ox6gPS41fooANbgkbGvWlof4bmUZufGvD9hBH ++6u9VJ7c6+Rik6QYDSAm7sGNlmPK8qYd30SHefVUIklvVCDDA12AjQqdc3E1rZZDj tL5E7uMawgSiXHAJhJzJgVG8sTLiyXzSW0YDJ7S3SRzO/ZSrrgb/cSwpz4Sp8pM2PR B6GG8nFUc8KaZgh9E0geBAqfv9+3Qp0+faBZ2wfMHkLtjToIS17zYUrA8XeEgBThL2 3nUV3fHoiHg+w== Date: Fri, 14 Mar 2025 21:38:15 +0000 From: Jaegeuk Kim To: Matthew Wilcox Cc: chao@kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage Message-ID: References: <20250307182151.3397003-1-willy@infradead.org> <174172263873.214029.5458881997469861795.git-patchwork-notify@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@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: On 03/14, Matthew Wilcox wrote: > On Wed, Mar 12, 2025 at 01:22:41AM +0000, Jaegeuk Kim wrote: > > On 03/12, Matthew Wilcox wrote: > > > On Tue, Mar 11, 2025 at 07:50:38PM +0000, patchwork-bot+f2fs@kernel.org wrote: > > > > Hello: > > > > > > > > This series was applied to jaegeuk/f2fs.git (dev) > > > > by Jaegeuk Kim : > > > > > > Thanks! > > > > > > FWIW, I have a tree with 75 patches in it on top of this that do more > > > folio conversion work. It's not done yet; maybe another 200 patches to > > > go? I don't think it's worth posting at this point in the cycle, so > > > I'll wait until -rc1 to post, by which point it'll probably be much > > > larger. > > > > Ok, thanks for the work! Will keep an eye on. > > Unfortunately, I thnk I have to abandon this effort. It's only going > to make supporting large folios harder (ie there would then need to be > an equivalently disruptive series adding support for large folios). > > The fundamental problem is that f2fs has no concept of block size != > PAGE_SIZE. So if you create a filesystem on a 4kB PAGE_SIZE kernel, > you can't mount it on a 16kB PAGE_SIZE kernel. An example: > > int f2fs_recover_inline_xattr(struct inode *inode, struct page *page) > { > struct f2fs_inode *ri; > ipage = f2fs_get_node_page(F2FS_I_SB(inode), inode->i_ino); > ri = F2FS_INODE(page); > > so an inode number is an index into the filesystem in PAGE_SIZE units, > not in filesystem block size units. Fixing this is a major effort, and > I lack the confidence in my abilities to do it without breaking anything. > > As an outline of what needs to happen, I think that rather than passing > around so many struct page pointers, we should be passing around either > folio + offset, or we should be passing around struct f2fs_inode pointers. > My preference is for the latter. We can always convert back to the > folio containing the inode if we need to (eg to mark it dirty) and it > adds some typesafety by ensuring that we're passing around pointers that > we believe belong to an inode and not, say, a struct page which happens > to contain a directory entry. > > This is a monster task, I think. I'm going to have to disable f2fs > from testing with split page/folio. This is going to be a big problem > for Android. I see. fyi; in Android, I'm thinking to run 16KB page kernel with 16KB format natively to keep block_size = PAGE_SIZE. Wasn't large folio to support a set of pages while keeping block_size = PAGE_SIZE?