Re: [PATCH 2/4] erofs-utils: add a built-in DEFLATE compressor

2023-07-09 Thread Eric Biggers
On Mon, Jul 10, 2023 at 11:01:16AM +0800, Gao Xiang wrote: > Hi Eric, > > On 2023/7/10 10:33, Eric Biggers wrote: > > Hi Gao, > > > > On Mon, Jul 10, 2023 at 02:25:09AM +0800, Gao Xiang wrote: > > > > > > Since there is _no fixed-sized output DE

Re: [PATCH 2/4] erofs-utils: add a built-in DEFLATE compressor

2023-07-09 Thread Eric Biggers
Hi Gao, On Mon, Jul 10, 2023 at 02:25:09AM +0800, Gao Xiang wrote: > > Since there is _no fixed-sized output DEFLATE compression appoach_ > available in public (fitblk is somewhat ineffective) and the original > zlib is quite slowly developping, let's work out one for our use cases. > Fortunately

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

2023-04-11 Thread Eric Biggers
On Mon, Apr 10, 2023 at 10:19:46PM -0700, Christoph Hellwig wrote: > Dave is going to hate me for this, but.. > > I've been looking over some of the interfaces here, and I'm starting > to very seriously questioning the design decisions of storing the > fsverity hashes in xattrs. > > Yes, storing

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

2023-04-07 Thread Eric Biggers
On Wed, Apr 05, 2023 at 05:44:36PM -0700, Eric Biggers wrote: > > Not vmalloc'ed, but vmapped. we allocate the pages individually, but > > then call vm_map_page() to present the higher level code with a > > single contiguous memory range if it is a multi-page buffer.

Re: [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 +0000, 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/veri

Re: [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: [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: [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: [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: [PATCH v2 00/23] fs-verity support for XFS

2023-04-04 Thread Eric Biggers
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, did you verify that the tests in the "verity" group are running, and were

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

2023-04-04 Thread Eric Biggers
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 > Merkle tree blocks. The XFS stores each merkle tree block under > extended attribute.

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

2023-04-04 Thread Eric Biggers
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 them (i.e. > descriptor exist and tree is built). > > Signed-off-by: Andrey Albershteyn > --- > fs/ioctl.c | 4 > fs/xfs/libxfs/xfs_forma

Re: [PATCH] ext4: convert to DIV_ROUND_UP() in mpage_process_page_bufs()

2023-03-09 Thread Eric Biggers
On Fri, Mar 10, 2023 at 02:27:38PM +0800, Yangtao Li wrote: > > Please don't do this. This makes the code compile down to a division, > > which is > > far less efficient. I've verified this by checking the assembly generated. > > How much is the performance impact? So should the following be mo

Re: [PATCH v5] erofs: add per-cpu threads for decompression as an option

2023-02-23 Thread Eric Biggers
Hi, On Wed, Feb 08, 2023 at 05:33:22PM +0800, Gao Xiang wrote: > From: Sandeep Dhavale > > Using per-cpu thread pool we can reduce the scheduling latency compared > to workqueue implementation. With this patch scheduling latency and > variation is reduced as per-cpu threads are high priority kth

Re: [RFC] fs-verity and encryption for EROFS

2022-12-30 Thread Eric Biggers
Hi Gao, On Thu, Dec 22, 2022 at 11:24:34AM +0800, Gao Xiang wrote: > ( + more lists ) > > On Wed, Dec 21, 2022 at 02:41:40PM +0800, Gao Xiang wrote: > > Hi folks, > > > > (As Eric suggested, I post it on list now..) > > > > In order to outline what we could do next to benefit various image-base

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-12 Thread Eric Biggers
On Sun, Oct 11, 2020 at 11:56:35PM -0700, Ira Weiny wrote: > > > > And I still don't really understand. After this patchset, there is still > > code > > nearly identical to the above (doing a temporary mapping just for a memcpy) > > that > > would still be using kmap_atomic(). > > I don't unde

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-09 Thread Eric Biggers
On Sat, Oct 10, 2020 at 01:39:54AM +0100, Matthew Wilcox wrote: > On Fri, Oct 09, 2020 at 02:34:34PM -0700, Eric Biggers wrote: > > On Fri, Oct 09, 2020 at 12:49:57PM -0700, ira.we...@intel.com wrote: > > > The kmap() calls in this FS are localized to a single thread. To avoid &

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-09 Thread Eric Biggers
On Fri, Oct 09, 2020 at 12:49:57PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > The kmap() calls in this FS are localized to a single thread. To avoid > the over head of global PKRS updates use the new kmap_thread() call. > > Cc: Jaegeuk Kim > Cc: Chao Yu > Signed-off-by: Ira Weiny

Re: [PATCH v10 12/25] mm: Move end_index check out of readahead loop

2020-03-23 Thread Eric Biggers
page = xa_load(&mapping->i_pages, index + i); > if (page && !xa_is_value(page)) { > /* >* Page already present? Kick off the current batch of > -- Reviewed-by: Eric Biggers - Eric

Re: [PATCH v9 23/25] f2fs: Pass the inode to f2fs_mpage_readpages

2020-03-20 Thread Eric Biggers
ct readahead_control > *rac) > if (f2fs_has_inline_data(inode)) > return; > > - f2fs_mpage_readpages(rac->mapping, rac, NULL); > + f2fs_mpage_readpages(inode, rac, NULL); > } > > int f2fs_encrypt_one_page(struct f2fs_io_info *fio) > -- Reviewed-by: Eric Biggers - Eric

Re: [PATCH v9 22/25] f2fs: Convert from readpages to readahead

2020-03-20 Thread Eric Biggers
fs/f2fs/data.c | 47 +++-- > include/trace/events/f2fs.h | 6 ++--- > 2 files changed, 22 insertions(+), 31 deletions(-) > Reviewed-by: Eric Biggers > @@ -2210,7 +2204,7 @@ static int f2fs_mpage_readpages(struct address_space > *mapping, >

Re: [PATCH v9 21/25] ext4: Pass the inode to ext4_mpage_readpages

2020-03-20 Thread Eric Biggers
es(struct address_space *mapping, > +int ext4_mpage_readpages(struct inode *inode, > struct readahead_control *rac, struct page *page) > { > struct bio *bio = NULL; > sector_t last_block_in_bio = 0; > > - struct inode *inode = mapping->host; > const unsigned blkbits = inode->i_blkbits; > const unsigned blocks_per_page = PAGE_SIZE >> blkbits; > const unsigned blocksize = 1 << blkbits; > -- Reviewed-by: Eric Biggers - Eric

Re: [PATCH v9 20/25] ext4: Convert from readpages to readahead

2020-03-20 Thread Eric Biggers
On Fri, Mar 20, 2020 at 10:48:48AM -0700, Matthew Wilcox wrote: > On Fri, Mar 20, 2020 at 10:37:34AM -0700, Eric Biggers wrote: > > On Fri, Mar 20, 2020 at 07:22:26AM -0700, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > >

Re: [PATCH v9 12/25] mm: Move end_index check out of readahead loop

2020-03-20 Thread Eric Biggers
On Fri, Mar 20, 2020 at 11:11:32AM -0700, Matthew Wilcox wrote: > On Fri, Mar 20, 2020 at 11:00:17AM -0700, Eric Biggers wrote: > > On Fri, Mar 20, 2020 at 10:30:40AM -0700, Matthew Wilcox wrote: > > > On Fri, Mar 20, 2020 at 09:58:28AM -0700, Eric Biggers wrote: > > > &

Re: [PATCH v9 12/25] mm: Move end_index check out of readahead loop

2020-03-20 Thread Eric Biggers
On Fri, Mar 20, 2020 at 10:30:40AM -0700, Matthew Wilcox wrote: > On Fri, Mar 20, 2020 at 09:58:28AM -0700, Eric Biggers wrote: > > On Fri, Mar 20, 2020 at 07:22:18AM -0700, Matthew Wilcox wrote: > > > + /* Avoid wrapping to the beginning of the file */ > > > + if

Re: [PATCH v9 20/25] ext4: Convert from readpages to readahead

2020-03-20 Thread Eric Biggers
3 +-- > fs/ext4/inode.c| 21 + > fs/ext4/readpage.c | 22 -- > 3 files changed, 18 insertions(+), 28 deletions(-) > Reviewed-by: Eric Biggers > + if (rac) { > + page = readahead_page(

Re: [PATCH v9 13/25] mm: Add page_cache_readahead_unbounded

2020-03-20 Thread Eric Biggers
directly. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Christoph Hellwig > Reviewed-by: William Kucharski Reviewed-by: Eric Biggers Tested-by: Eric Biggers - Eric

Re: [PATCH v9 12/25] mm: Move end_index check out of readahead loop

2020-03-20 Thread Eric Biggers
On Fri, Mar 20, 2020 at 07:22:18AM -0700, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > By reducing nr_to_read, we can eliminate this check from inside the loop. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: John Hubbard > Reviewed-by: William Kucharski > --- > mm/r

Re: [WIP] [PATCH v0.0-20200229 00/11] ez: LZMA fixed-sized output compression

2020-02-28 Thread Eric Biggers
On Sat, Feb 29, 2020 at 12:50:06PM +0800, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > This is a WIP PREVIEW patchset, just for archiving to open > source community only. > > For now, it implements LZMA SDK-like GetOptimumFast approach > and GetOptimum is still on schedule. > > It's s

Re: [PATCH 3/3] erofs: handle corrupted images whose decompressed size less than it'd be

2020-02-25 Thread Eric Biggers
On Wed, Feb 26, 2020 at 10:30:11AM +0800, Gao Xiang wrote: > As Lasse pointed out, "Looking at fs/erofs/decompress.c, > the return value from LZ4_decompress_safe_partial is only > checked for negative value to catch errors. ... So if > I understood it correctly, if there is bad data whose > uncompr

Re: [PATCH v6 10/19] fs: Convert mpage_readpages to mpage_readahead

2020-02-18 Thread Eric Biggers
On Tue, Feb 18, 2020 at 07:47:41PM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 07:28:26PM -0800, Eric Biggers wrote: > > On Mon, Feb 17, 2020 at 10:45:58AM -0800, Matthew Wilcox wrote: > > > diff --git a/include/linux/mpage.h b/include/linux/mpage.h > &

Re: [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-18 Thread Eric Biggers
On Tue, Feb 18, 2020 at 07:10:44PM -0800, Eric Biggers wrote: > On Mon, Feb 17, 2020 at 10:45:54AM -0800, Matthew Wilcox wrote: > > diff --git a/Documentation/filesystems/vfs.rst > > b/Documentation/filesystems/vfs.rst > > index 7d4d09dd5e6d..81ab30fbe45c 100644 &g

Re: [PATCH v6 14/19] ext4: Convert from readpages to readahead

2020-02-18 Thread Eric Biggers
On Mon, Feb 17, 2020 at 10:46:05AM -0800, Matthew Wilcox wrote: > diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c > index c1769afbf799..e14841ade612 100644 > --- a/fs/ext4/readpage.c > +++ b/fs/ext4/readpage.c > @@ -7,8 +7,8 @@ > * > * This was originally taken from fs/mpage.c > * > - *

Re: [PATCH v6 10/19] fs: Convert mpage_readpages to mpage_readahead

2020-02-18 Thread Eric Biggers
On Mon, Feb 17, 2020 at 10:45:58AM -0800, Matthew Wilcox wrote: > diff --git a/include/linux/mpage.h b/include/linux/mpage.h > index 001f1fcf9836..f4f5e90a6844 100644 > --- a/include/linux/mpage.h > +++ b/include/linux/mpage.h > @@ -13,9 +13,9 @@ > #ifdef CONFIG_BLOCK > > struct writeback_contr

Re: [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-18 Thread Eric Biggers
On Mon, Feb 17, 2020 at 10:45:54AM -0800, Matthew Wilcox wrote: > diff --git a/Documentation/filesystems/vfs.rst > b/Documentation/filesystems/vfs.rst > index 7d4d09dd5e6d..81ab30fbe45c 100644 > --- a/Documentation/filesystems/vfs.rst > +++ b/Documentation/filesystems/vfs.rst > @@ -706,6 +706,7 @@

Re: [PATCH] erofs: move erofs out of staging

2019-08-18 Thread Eric Biggers
On Sun, Aug 18, 2019 at 09:22:01AM -0700, Christoph Hellwig wrote: > On Sun, Aug 18, 2019 at 09:16:38AM -0700, Eric Biggers wrote: > > Ted's observation was about maliciously-crafted filesystems, though, so > > integrity-only features such as metadata checksums are i

Re: [PATCH] erofs: move erofs out of staging

2019-08-18 Thread Eric Biggers
On Sun, Aug 18, 2019 at 08:58:12AM -0700, Christoph Hellwig wrote: > On Sun, Aug 18, 2019 at 11:11:54AM -0400, Theodore Y. Ts'o wrote: > > Note that of the mainstream file systems, ext4 and xfs don't guarantee > > that it's safe to blindly take maliciously provided file systems, such > > as those p

Re: [PATCH 10/13] iomap: use a function pointer for dio submits

2019-08-09 Thread Eric Biggers
On Fri, Aug 09, 2019 at 05:31:35PM -0700, Eric Biggers wrote: > On Sat, Aug 10, 2019 at 07:45:59AM +0800, Gao Xiang wrote: > > Hi Willy, > > > > On Fri, Aug 09, 2019 at 01:45:17PM -0700, Matthew Wilcox wrote: > > > On Wed, Aug 07, 2019 at 10:49:36PM -0700, Eric Bigg

Re: [PATCH 10/13] iomap: use a function pointer for dio submits

2019-08-09 Thread Eric Biggers
On Sat, Aug 10, 2019 at 07:45:59AM +0800, Gao Xiang wrote: > Hi Willy, > > On Fri, Aug 09, 2019 at 01:45:17PM -0700, Matthew Wilcox wrote: > > On Wed, Aug 07, 2019 at 10:49:36PM -0700, Eric Biggers wrote: > > > On Thu, Aug 08, 2019 at 12:26:42PM +0800, Gao Xiang wrote

Re: [PATCH 10/13] iomap: use a function pointer for dio submits

2019-08-09 Thread Eric Biggers
On Fri, Aug 09, 2019 at 01:45:17PM -0700, Matthew Wilcox wrote: > On Wed, Aug 07, 2019 at 10:49:36PM -0700, Eric Biggers wrote: > > On Thu, Aug 08, 2019 at 12:26:42PM +0800, Gao Xiang wrote: > > > 1. decrypt->verity->decompress > > > > > > 2. veri

Re: [PATCH 10/13] iomap: use a function pointer for dio submits

2019-08-07 Thread Eric Biggers
On Thu, Aug 08, 2019 at 12:26:42PM +0800, Gao Xiang wrote: > > > > > > That's why I don't like this hook - I think hiding data operations > > > > and/or custom bio manipulations in opaque filesystem callouts is > > > > completely the wrong approach to be taking. We need to do these > > > > things