Re: [PATCH 2/2] iomap: Support inline data with block size < page size

2021-07-23 Thread Gao Xiang
On Sat, Jul 24, 2021 at 12:46:45PM +0800, Gao Xiang wrote: > Hi Matthew, > > On Sat, Jul 24, 2021 at 04:44:35AM +0100, Matthew Wilcox (Oracle) wrote: > > Remove the restriction that inline data must start on a page boundary > > in a file. This allows, for example, the first 2KiB to be stored out

Re: [PATCH 2/2] iomap: Support inline data with block size < page size

2021-07-23 Thread Gao Xiang
Hi Matthew, On Sat, Jul 24, 2021 at 04:44:35AM +0100, Matthew Wilcox (Oracle) wrote: > Remove the restriction that inline data must start on a page boundary > in a file. This allows, for example, the first 2KiB to be stored out > of line and the trailing 30 bytes to be stored inline. > >

[PATCH 2/2] iomap: Support inline data with block size < page size

2021-07-23 Thread Matthew Wilcox (Oracle)
Remove the restriction that inline data must start on a page boundary in a file. This allows, for example, the first 2KiB to be stored out of line and the trailing 30 bytes to be stored inline. Signed-off-by: Matthew Wilcox (Oracle) --- fs/iomap/buffered-io.c | 18 -- 1 file

[PATCH 0/2] iomap: make inline data support more flexible

2021-07-23 Thread Matthew Wilcox (Oracle)
The first patch seems to be where Gao Xiang, Christoph and I have settled for immediate support of EROFS tails. The second is a prequel to the folio work. Because folios are variable size, if we have, eg, an 8.1KiB file, we must support reading the first two pages of the folio from blocks and

[PATCH 1/2] iomap: Support file tail packing

2021-07-23 Thread Matthew Wilcox (Oracle)
From: Gao Xiang Add support for reading inline data content into the page cache from nonzero page-aligned file offsets. This enables the EROFS tailpacking mode where the last few bytes of the file are stored right after the inode. The buffered write path remains untouched since EROFS cannot be

Re: [PATCH v7] iomap: make inline data support more flexible

2021-07-23 Thread Gao Xiang
Hi Matthew, On Fri, Jul 23, 2021 at 08:40:51PM +0100, Matthew Wilcox wrote: > On Sat, Jul 24, 2021 at 01:41:31AM +0800, Gao Xiang wrote: > > Add support for reading inline data content into the page cache from > > nonzero page-aligned file offsets. This enables the EROFS tailpacking > > mode

Re: [PATCH v7] iomap: make inline data support more flexible

2021-07-23 Thread Matthew Wilcox
On Sat, Jul 24, 2021 at 01:41:31AM +0800, Gao Xiang wrote: > Add support for reading inline data content into the page cache from > nonzero page-aligned file offsets. This enables the EROFS tailpacking > mode where the last few bytes of the file are stored right after the > inode. > > The

[PATCH v7] iomap: make inline data support more flexible

2021-07-23 Thread Gao Xiang
Add support for reading inline data content into the page cache from nonzero page-aligned file offsets. This enables the EROFS tailpacking mode where the last few bytes of the file are stored right after the inode. The buffered write path remains untouched since EROFS cannot be used for testing.

Re: [PATCH v6] iomap: support tail packing inline read

2021-07-23 Thread Gao Xiang
On Fri, Jul 23, 2021 at 04:56:35PM +0100, Matthew Wilcox wrote: > On Fri, Jul 23, 2021 at 11:23:38PM +0800, Gao Xiang wrote: > > Hi Matthew, > > > > On Fri, Jul 23, 2021 at 04:05:29PM +0100, Matthew Wilcox wrote: > > > On Thu, Jul 22, 2021 at 07:39:47AM +0200, Christoph Hellwig wrote: > > > > @@

Re: [PATCH v6] iomap: support tail packing inline read

2021-07-23 Thread Matthew Wilcox
On Fri, Jul 23, 2021 at 11:23:38PM +0800, Gao Xiang wrote: > Hi Matthew, > > On Fri, Jul 23, 2021 at 04:05:29PM +0100, Matthew Wilcox wrote: > > On Thu, Jul 22, 2021 at 07:39:47AM +0200, Christoph Hellwig wrote: > > > @@ -675,7 +676,7 @@ static size_t iomap_write_end_inline(struct inode > > >

Re: [PATCH v6] iomap: support tail packing inline read

2021-07-23 Thread Gao Xiang
Hi Matthew, On Fri, Jul 23, 2021 at 04:05:29PM +0100, Matthew Wilcox wrote: > On Thu, Jul 22, 2021 at 07:39:47AM +0200, Christoph Hellwig wrote: > > @@ -675,7 +676,7 @@ static size_t iomap_write_end_inline(struct inode > > *inode, struct page *page, > > > > flush_dcache_page(page); > >

Re: [PATCH v6] iomap: support tail packing inline read

2021-07-23 Thread Matthew Wilcox
On Thu, Jul 22, 2021 at 07:39:47AM +0200, Christoph Hellwig wrote: > @@ -675,7 +676,7 @@ static size_t iomap_write_end_inline(struct inode *inode, > struct page *page, > > flush_dcache_page(page); > addr = kmap_atomic(page); > - memcpy(iomap->inline_data + pos, addr + pos,

[PATCH v2] erofs-utils: no compression case for tail-end block in vle_write_indexes()

2021-07-23 Thread Yue Hu
From: Yue Hu Note that count value will be always greater than EROFS_BLKSIZ when calling erofs_compress_destsize() in vle_compress_one(). So, the d1 always >= 1 for compressed block in vle_write_indexes(). That is to say tail-end block can't be compressed. Signed-off-by: Yue Hu --- v2: add

Re: [PATCH v6] iomap: support tail packing inline read

2021-07-23 Thread Huang Jianan via Linux-erofs
Hi Xiang, I have tested this patch based on the erofs dax support below, It works well for me. https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git/log/?h=erofs/dax Tested-by: Huang Jianan Thanks, Jianan On 2021/7/23 9:26, Gao Xiang wrote: Hi Darrick, On Thu, Jul 22, 2021 at

Re: [PATCH] erofs-utils: no compression case for tail-end block in vle_write_indexes()

2021-07-23 Thread Yue Hu
On Fri, 23 Jul 2021 13:02:14 +0800 Gao Xiang wrote: > Hi Yue, > > On Fri, Jul 23, 2021 at 11:49:45AM +0800, Yue Hu wrote: > > From: Yue Hu > > > > Note that count value will be always greater than EROFS_BLKSIZ when > > calling erofs_compress_destsize() in vle_compress_one(). So, the d1 > >