Re: [f2fs-dev] [PATCH] f2fs: get out of a repeat loop when getting a locked data page

2023-04-05 Thread Jaegeuk Kim
On 04/06, Chao Yu wrote: > On 2023/4/6 0:39, Jaegeuk Kim wrote: > > On 03/27, Matthew Wilcox wrote: > > > On Mon, Mar 27, 2023 at 08:30:33AM -0700, Jaegeuk Kim wrote: > > > > On 03/26, Chao Yu wrote: > > > > > On 2023/3/24 5:39, Jaegeuk Kim wrote: > > > > > > https://bugzilla.kernel.org/show_bug.cg

Re: [f2fs-dev] [PATCH 3/5] fstests/MAINTAINERS: add supported mailing list

2023-04-05 Thread Chao Yu
On 2023/4/5 1:14, Zorro Lang wrote: +F2FS +L: linux-f2fs-devel@lists.sourceforge.net +S: Supported +F: tests/f2fs/ +F: common/f2fs Acked-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net h

Re: [f2fs-dev] [PATCH] f2fs: get out of a repeat loop when getting a locked data page

2023-04-05 Thread Chao Yu
On 2023/4/6 0:39, Jaegeuk Kim wrote: On 03/27, Matthew Wilcox wrote: On Mon, Mar 27, 2023 at 08:30:33AM -0700, Jaegeuk Kim wrote: On 03/26, Chao Yu wrote: On 2023/3/24 5:39, Jaegeuk Kim wrote: https://bugzilla.kernel.org/show_bug.cgi?id=216050 Somehow we're getting a page which has a differe

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Eric Biggers
On Thu, Apr 06, 2023 at 09:37:53AM +1000, Dave Chinner wrote: > On Wed, Apr 05, 2023 at 10:54:06PM +, Eric Biggers wrote: > > On Thu, Apr 06, 2023 at 08:26:46AM +1000, Dave Chinner wrote: > > > > We could certainly think about moving to a design where fs/verity/ asks > > > > the > > > > filesy

[f2fs-dev] [RFC PATCH] fsverity: use shash API instead of ahash API

2023-04-05 Thread Eric Biggers
From: Eric Biggers The "ahash" API, like the other scatterlist-based crypto APIs such as "skcipher", comes with some well-known limitations. First, it can't easily be used with vmalloc addresses. Second, the request struct can't be allocated on the stack. This adds complexity and a possible fa

Re: [f2fs-dev] [PATCH 3/5] fstests/MAINTAINERS: add supported mailing list

2023-04-05 Thread Xiubo Li
On 4/5/23 01:14, Zorro Lang wrote: The fstests supports different kind of fs testing, better to cc specific fs mailing list for specific fs testing, to get better reviewing points. So record these mailing lists and files related with them in MAINTAINERS file. Signed-off-by: Zorro Lang --- If

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Dave Chinner via Linux-f2fs-devel
On Wed, Apr 05, 2023 at 10:54:06PM +, Eric Biggers wrote: > On Thu, Apr 06, 2023 at 08:26:46AM +1000, Dave Chinner wrote: > > > We could certainly think about moving to a design where fs/verity/ asks > > > the > > > filesystem to just *read* a Merkle tree block, without adding it to a > > > c

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Eric Biggers
On Thu, Apr 06, 2023 at 08:26:46AM +1000, Dave Chinner wrote: > > We could certainly think about moving to a design where fs/verity/ asks the > > filesystem to just *read* a Merkle tree block, without adding it to a > > cache, and > > then fs/verity/ implements the caching itself. That would requ

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Dave Chinner via Linux-f2fs-devel
On Wed, Apr 05, 2023 at 05:12:34PM +0200, Andrey Albershteyn wrote: > Hi Eric, > > On Tue, Apr 04, 2023 at 04:32:24PM -0700, Eric Biggers wrote: > > Hi Andrey, > > > > On Tue, Apr 04, 2023 at 04:53:17PM +0200, Andrey Albershteyn wrote: > > > In case of different Merkle tree block size fs-verity e

Re: [f2fs-dev] [PATCH v2 19/23] xfs: disable direct read path for fs-verity sealed files

2023-04-05 Thread Dave Chinner via Linux-f2fs-devel
On Wed, Apr 05, 2023 at 06:02:47PM +, Eric Biggers wrote: > And I really hope that you don't want to do DIO to the *Merkle tree*, as that Not for XFS - the merkle tree is not held as file data. That said, the merkle tree in XFS is not page cache or block aligned metadata either, so we really

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Dave Chinner via Linux-f2fs-devel
On Wed, Apr 05, 2023 at 06:16:00PM +, Eric Biggers wrote: > On Wed, Apr 05, 2023 at 09:38:47AM -0700, Darrick J. Wong wrote: > > > The merkle tree pages are dropped after verification. When page is > > > dropped xfs_buf is marked as verified. If fs-verity wants to > > > verify again it will get

Re: [f2fs-dev] [PATCH v2 19/23] xfs: disable direct read path for fs-verity sealed files

2023-04-05 Thread Dave Chinner via Linux-f2fs-devel
On Wed, Apr 05, 2023 at 08:09:27AM -0700, Darrick J. Wong wrote: > On Wed, Apr 05, 2023 at 05:01:42PM +0200, Andrey Albershteyn wrote: > > On Tue, Apr 04, 2023 at 09:10:47AM -0700, Darrick J. Wong wrote: > > > On Tue, Apr 04, 2023 at 04:53:15PM +0200, Andrey Albershteyn wrote: > > > > The direct pa

Re: [f2fs-dev] [PATCH] f2fs: get out of a repeat loop when getting a locked data page

2023-04-05 Thread Jaegeuk Kim
On 04/05, Jaegeuk Kim wrote: > On 03/27, Matthew Wilcox wrote: > > On Mon, Mar 27, 2023 at 08:30:33AM -0700, Jaegeuk Kim wrote: > > > On 03/26, Chao Yu wrote: > > > > On 2023/3/24 5:39, Jaegeuk Kim wrote: > > > > > https://bugzilla.kernel.org/show_bug.cgi?id=216050 > > > > > > > > > > Somehow we'r

[f2fs-dev] [Bug 216050] f2fs_gc occupies 100% cpu

2023-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #142 from Jaegeuk Kim (jaeg...@kernel.org) --- I've reviewed the refcount of the path and found one suspicious routine when handling page->private. By any chance, can we try this patch instead of the above workaround? https://lore.ke

[f2fs-dev] [PATCH] f2fs: attach/detach private value in pair

2023-04-05 Thread Jaegeuk Kim
set_page_private_# increases a refcount after attaching page->private, and clear_page_private_# decreases it. But, f2fs_release_folio and f2fs_invalidate_folio call folio_detach_private() which decreases the refcount again, which corrupts the page cache. Cc: Fixes: b763f3bedc2d ("f2fs: restructur

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Eric Biggers
On Wed, Apr 05, 2023 at 09:38:47AM -0700, Darrick J. Wong wrote: > > The merkle tree pages are dropped after verification. When page is > > dropped xfs_buf is marked as verified. If fs-verity wants to > > verify again it will get the same verified buffer. If buffer is > > evicted it won't have veri

Re: [f2fs-dev] [PATCH v2 19/23] xfs: disable direct read path for fs-verity sealed files

2023-04-05 Thread Eric Biggers
On Wed, Apr 05, 2023 at 08:50:10AM -0700, Christoph Hellwig wrote: > On Wed, Apr 05, 2023 at 08:09:27AM -0700, Darrick J. Wong wrote: > > Thinking about this a little more -- I suppose we shouldn't just go > > breaking directio reads from a verity file if we can help it. Is there > > a way to ask

Re: [f2fs-dev] [PATCH v2 05/23] fsverity: make fsverity_verify_folio() accept folio's offset and size

2023-04-05 Thread Eric Biggers
On Wed, Apr 05, 2023 at 08:46:45AM -0700, Christoph Hellwig wrote: > On Wed, Apr 05, 2023 at 12:36:42PM +0200, Andrey Albershteyn wrote: > > Hi Christoph, > > > > On Tue, Apr 04, 2023 at 08:30:36AM -0700, Christoph Hellwig wrote: > > > On Tue, Apr 04, 2023 at 04:53:01PM +0200, Andrey Albershteyn w

Re: [f2fs-dev] [PATCH] f2fs: get out of a repeat loop when getting a locked data page

2023-04-05 Thread Jaegeuk Kim
On 03/27, Matthew Wilcox wrote: > On Mon, Mar 27, 2023 at 08:30:33AM -0700, Jaegeuk Kim wrote: > > On 03/26, Chao Yu wrote: > > > On 2023/3/24 5:39, Jaegeuk Kim wrote: > > > > https://bugzilla.kernel.org/show_bug.cgi?id=216050 > > > > > > > > Somehow we're getting a page which has a different mapp

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Darrick J. Wong
On Wed, Apr 05, 2023 at 06:02:21PM +0200, Andrey Albershteyn wrote: > Hi Darrick, > > On Tue, Apr 04, 2023 at 09:36:02AM -0700, Darrick J. Wong wrote: > > On Tue, Apr 04, 2023 at 04:53:17PM +0200, Andrey Albershteyn wrote: > > > In case of different Merkle tree block size fs-verity expects > > > -

Re: [f2fs-dev] [PATCH v2 00/23] fs-verity support for XFS

2023-04-05 Thread Andrey Albershteyn
Hi Darrick, On Tue, Apr 04, 2023 at 09:39:42AM -0700, Darrick J. Wong wrote: > On Tue, Apr 04, 2023 at 04:52:56PM +0200, Andrey Albershteyn wrote: > > Hi all, > > > > This is V2 of fs-verity support in XFS. In this series I did > > numerous changes from V1 which are described below. > > > > This

[f2fs-dev] [PATCH] f2fs: fix to check return value of inc_valid_block_count()

2023-04-05 Thread Chao Yu
In __replace_atomic_write_block(), we missed to check return value of inc_valid_block_count(), for extreme testcase that f2fs image is run out of space, it may cause inconsistent status in between SIT table and total valid block count. Cc: Daeho Jeong Fixes: 3db1de0e582c ("f2fs: change the curren

[f2fs-dev] [PATCH] f2fs: fix to check return value of f2fs_do_truncate_blocks()

2023-04-05 Thread Chao Yu
Otherwise, if truncation on cow_inode failed, remained data may pollute current transaction of atomic write. Cc: Daeho Jeong Fixes: a46bebd502fe ("f2fs: synchronize atomic write aborts") Signed-off-by: Chao Yu --- fs/f2fs/file.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff -

[f2fs-dev] [PATCH] f2fs: fix to tag FIEMAP_EXTENT_DELALLOC in fiemap() for delay allocated extent

2023-04-05 Thread Chao Yu
xfstest generic/614 fails to run due below reason: generic/614 1s ... [not run] test requires delayed allocation buffered writes The root cause is f2fs tags wrong fiemap flag for delay allocated extent. Quoted from fiemap.h: FIEMAP_EXTENT_UNKNOWN 0x0002 /* Data location unknown. */

Re: [f2fs-dev] [RESEND] f2fs: set default compress option only when sb_has_compression

2023-04-05 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Fri, 31 Mar 2023 00:56:48 +0800 you wrote: > If the compress feature is not enabled, there is no need to set > compress-related parameters. > > Signed-off-by: Yangtao Li > --- > fs/f2fs/super.c | 10 ++ > 1 fil

Re: [f2fs-dev] [PATCH 1/4] f2fs: fix to check lz4hc compression when CONFIG_F2FS_FS_LZ4HC is not enabled

2023-04-05 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Tue, 24 Jan 2023 23:33:43 +0800 you wrote: > f2fs supports lz4 compression algorithm and lz4hc compression algorithm, > which the level parameter needs to be passed in. When CONFIG_F2FS_FS_LZ4HC > is not enabled, even if

[f2fs-dev] Patchwork summary for: f2fs

2023-04-05 Thread patchwork-bot+f2fs
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Series: [f2fs-dev,1/4] f2fs: fix to check lz4hc compression when CONFIG_F2FS_FS_LZ4HC is not enabled Submitter: Yangtao Li Patchwork: https://patchwork.kernel.org/project/f2fs/list/?ser

Re: [f2fs-dev] [PATCH v2] f2fs: merge lz4hc_compress_pages() to lz4_compress_pages()

2023-04-05 Thread Jaegeuk Kim
On 04/05, Chao Yu wrote: > On 2023/3/31 0:49, Yangtao Li wrote: > > +#ifdef CONFIG_F2FS_FS_LZ4HC > > + unsigned char level = F2FS_I(cc->inode)->i_compress_level; > > if (level) > > len = LZ4_compress_HC(cc->rbuf, cc->cbuf->cdata, cc->rlen, > > c

Re: [f2fs-dev] [PATCH v2 00/23] fs-verity support for XFS

2023-04-05 Thread Andrey Albershteyn
On Tue, Apr 04, 2023 at 04:37:13PM -0700, Eric Biggers wrote: > On Tue, Apr 04, 2023 at 04:52:56PM +0200, Andrey Albershteyn wrote: > > The patchset is tested with xfstests -g auto on xfs_1k, xfs_4k, > > xfs_1k_quota, and xfs_4k_quota. Haven't found any major failures. > > Just to double check, di

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Andrey Albershteyn
Hi Darrick, On Tue, Apr 04, 2023 at 09:36:02AM -0700, Darrick J. Wong wrote: > On Tue, Apr 04, 2023 at 04:53:17PM +0200, Andrey Albershteyn wrote: > > In case of different Merkle tree block size fs-verity expects > > ->read_merkle_tree_page() to return Merkle tree page filled with > > Merkle tree

Re: [f2fs-dev] [PATCH] f2fs: convert to use sysfs_emit

2023-04-05 Thread Jaegeuk Kim
On 04/05, Chao Yu wrote: > On 2023/3/31 19:33, Yangtao Li wrote: > > Let's use sysfs_emit. > > > > Signed-off-by: Yangtao Li > > --- > > fs/f2fs/sysfs.c | 10 ++ > > 1 file changed, 2 insertions(+), 8 deletions(-) > > > > diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c > > index 9ddc6e

Re: [f2fs-dev] [PATCH] f2fs: fix to trigger a checkpoint in the end of foreground garbage collection

2023-04-05 Thread Jaegeuk Kim
On 04/05, Chao Yu wrote: > On 2023/4/5 5:39, Jaegeuk Kim wrote: > > Can we do like this? > > > > From 9a58f0e59364241aa31b555cfe793d278e39b0dc Mon Sep 17 00:00:00 2001 > > From: Jaegeuk Kim > > Date: Tue, 4 Apr 2023 14:36:00 -0700 > > Subject: [PATCH] f2fs: do checkpoint when there's not enough

Re: [f2fs-dev] [PATCH v2 19/23] xfs: disable direct read path for fs-verity sealed files

2023-04-05 Thread Christoph Hellwig
On Wed, Apr 05, 2023 at 08:09:27AM -0700, Darrick J. Wong wrote: > Thinking about this a little more -- I suppose we shouldn't just go > breaking directio reads from a verity file if we can help it. Is there > a way to ask fsverity to perform its validation against some arbitrary > memory buffer t

Re: [f2fs-dev] [PATCH v2 09/23] iomap: allow filesystem to implement read path verification

2023-04-05 Thread Christoph Hellwig
On Wed, Apr 05, 2023 at 08:06:27AM -0700, Darrick J. Wong wrote: > > > I wonder if that also makes sense and keep all the deferral in the > > > file system. We'll need that for the btrfs iomap conversion anyway, > > > and it seems more flexible. The ioend processing would then move into > > > XFS

Re: [f2fs-dev] [PATCH v2 05/23] fsverity: make fsverity_verify_folio() accept folio's offset and size

2023-04-05 Thread Christoph Hellwig
On Wed, Apr 05, 2023 at 12:36:42PM +0200, Andrey Albershteyn wrote: > Hi Christoph, > > On Tue, Apr 04, 2023 at 08:30:36AM -0700, Christoph Hellwig wrote: > > On Tue, Apr 04, 2023 at 04:53:01PM +0200, Andrey Albershteyn wrote: > > > Not the whole folio always need to be verified by fs-verity (e.g.

Re: [f2fs-dev] [PATCH v2 20/23] xfs: add fs-verity support

2023-04-05 Thread Eric Sandeen
On 4/4/23 11:27 AM, Darrick J. Wong wrote: > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index d40de32362b1..b6e99ed3b187 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -30,6 +30,7 @@ > #include "xfs_filestream.h" > #include "xfs_quota.h" > #include "xfs_sysfs.h" >

Re: [f2fs-dev] [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE

2023-04-05 Thread Andrey Albershteyn
Hi Eric, On Tue, Apr 04, 2023 at 04:32:24PM -0700, Eric Biggers wrote: > Hi Andrey, > > On Tue, Apr 04, 2023 at 04:53:17PM +0200, Andrey Albershteyn wrote: > > In case of different Merkle tree block size fs-verity expects > > ->read_merkle_tree_page() to return Merkle tree page filled with > > Me

Re: [f2fs-dev] [PATCH v2 19/23] xfs: disable direct read path for fs-verity sealed files

2023-04-05 Thread Darrick J. Wong
On Wed, Apr 05, 2023 at 05:01:42PM +0200, Andrey Albershteyn wrote: > On Tue, Apr 04, 2023 at 09:10:47AM -0700, Darrick J. Wong wrote: > > On Tue, Apr 04, 2023 at 04:53:15PM +0200, Andrey Albershteyn wrote: > > > The direct path is not supported on verity files. Attempts to use direct > > > I/O pat

Re: [f2fs-dev] [PATCH v2 09/23] iomap: allow filesystem to implement read path verification

2023-04-05 Thread Darrick J. Wong
On Wed, Apr 05, 2023 at 01:01:16PM +0200, Andrey Albershteyn wrote: > Hi Christoph, > > On Tue, Apr 04, 2023 at 08:37:02AM -0700, Christoph Hellwig wrote: > > > if (iomap_block_needs_zeroing(iter, pos)) { > > > folio_zero_range(folio, poff, plen); > > > + if (iomap->flags & IOM

Re: [f2fs-dev] [PATCH v2 19/23] xfs: disable direct read path for fs-verity sealed files

2023-04-05 Thread Andrey Albershteyn
On Tue, Apr 04, 2023 at 09:10:47AM -0700, Darrick J. Wong wrote: > On Tue, Apr 04, 2023 at 04:53:15PM +0200, Andrey Albershteyn wrote: > > The direct path is not supported on verity files. Attempts to use direct > > I/O path on such files should fall back to buffered I/O path. > > > > Signed-off-b

Re: [f2fs-dev] [PATCH 3/5] fstests/MAINTAINERS: add supported mailing list

2023-04-05 Thread Zorro Lang
On Tue, Apr 04, 2023 at 03:16:53PM -0700, Eric Biggers wrote: > Hi Zorro, > > On Wed, Apr 05, 2023 at 01:14:09AM +0800, Zorro Lang wrote: > > +FSVERITY > > +L: fsver...@lists.linux.dev > > +S: Supported > > +F: common/verity > > + > > +FSCRYPT > > +L: linux-fscr...@vger.kernel.org > > +S: Sup

Re: [f2fs-dev] [PATCH v2 16/23] xfs: add inode on-disk VERITY flag

2023-04-05 Thread Andrey Albershteyn
Hi Eric and Dave, On Wed, Apr 05, 2023 at 09:56:33AM +1000, Dave Chinner wrote: > On Tue, Apr 04, 2023 at 03:41:23PM -0700, Eric Biggers wrote: > > Hi Andrey, > > > > On Tue, Apr 04, 2023 at 04:53:12PM +0200, Andrey Albershteyn wrote: > > > Add flag to mark inodes which have fs-verity enabled on

Re: [f2fs-dev] [PATCH v2 09/23] iomap: allow filesystem to implement read path verification

2023-04-05 Thread Andrey Albershteyn
Hi Christoph, On Tue, Apr 04, 2023 at 08:37:02AM -0700, Christoph Hellwig wrote: > > if (iomap_block_needs_zeroing(iter, pos)) { > > folio_zero_range(folio, poff, plen); > > + if (iomap->flags & IOMAP_F_READ_VERITY) { > > Wju do we need the new flag vs just testing that

Re: [f2fs-dev] [PATCH v2 06/23] fsverity: add drop_page() callout

2023-04-05 Thread Andrey Albershteyn
Hi Dave, On Wed, Apr 05, 2023 at 09:40:19AM +1000, Dave Chinner wrote: > On Tue, Apr 04, 2023 at 04:53:02PM +0200, Andrey Albershteyn wrote: > > Allow filesystem to make additional processing on verified pages > > instead of just dropping a reference. This will be used by XFS for > > internal buff

Re: [f2fs-dev] [PATCH v2 05/23] fsverity: make fsverity_verify_folio() accept folio's offset and size

2023-04-05 Thread Andrey Albershteyn
Hi Christoph, On Tue, Apr 04, 2023 at 08:30:36AM -0700, Christoph Hellwig wrote: > On Tue, Apr 04, 2023 at 04:53:01PM +0200, Andrey Albershteyn wrote: > > Not the whole folio always need to be verified by fs-verity (e.g. > > with 1k blocks). Use passed folio's offset and size. > > Why can't those

Re: [f2fs-dev] [PATCH 3/5] fstests/MAINTAINERS: add supported mailing list

2023-04-05 Thread Jan Kara
On Wed 05-04-23 01:14:09, Zorro Lang wrote: > The fstests supports different kind of fs testing, better to cc > specific fs mailing list for specific fs testing, to get better > reviewing points. So record these mailing lists and files related > with them in MAINTAINERS file. > > Signed-off-by: Zo

Re: [f2fs-dev] [PATCH 3/5] fstests/MAINTAINERS: add supported mailing list

2023-04-05 Thread Christian Brauner
On Wed, Apr 05, 2023 at 01:14:09AM +0800, Zorro Lang wrote: > The fstests supports different kind of fs testing, better to cc > specific fs mailing list for specific fs testing, to get better > reviewing points. So record these mailing lists and files related > with them in MAINTAINERS file. > > S

Re: [f2fs-dev] [PATCH 4/5] fstests/MAINTAINERS: add some specific reviewers

2023-04-05 Thread Christian Brauner
On Wed, Apr 05, 2023 at 01:14:10AM +0800, Zorro Lang wrote: > Some people contribute to someone specific fs testing mostly, record > some of them as Reviewer. > > Signed-off-by: Zorro Lang > --- > > If someone doesn't want to be in cc list of related fstests patch, please > reply this email, I'l