[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YPtksjmvVbcsKwlK@B-P7TQMD6M-0146.local>
Date: Sat, 24 Jul 2021 08:54:10 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-erofs@...ts.ozlabs.org, linux-fsdevel@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@....de>,
"Darrick J . Wong" <djwong@...nel.org>,
Andreas Gruenbacher <andreas.gruenbacher@...il.com>,
Huang Jianan <huangjianan@...o.com>
Subject: Re: [PATCH v7] iomap: make inline data support more flexible
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 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. It'd be better to be implemented if upcoming real users
> > care and provide a real pattern rather than leave untested dead code
> > around.
>
> My one complaint with this version is the subject line. It's a bit vague.
> I went with:
>
> iomap: Support file tail packing
>
> I also wrote a changelog entry that reads:
> The existing inline data support only works for cases where the entire
> file is stored as inline data. For larger files, EROFS stores the
> initial blocks separately and then can pack a small tail adjacent to
> the inode. Generalise inline data to allow for tail packing. Tails
> may not cross a page boundary in memory.
>
Yeah, we could complete the commit message like this.
Actually EROFS inode base is only 32-byte or 64-byte (so the maximum could
not be exactly small), compared to using another tail block or storing other
(maybe) irrelevant inodes. According to cache locality principle, a strategy
can be selected by mkfs to load tail block with the inode base itself to the
page cache by the tail-packing inline and so reduce I/O and fragmentation.
> ... but I'm not sure that's necessarily better than what you've written
> here.
>
> > Cc: Christoph Hellwig <hch@....de>
> > Cc: Darrick J. Wong <djwong@...nel.org>
> > Cc: Matthew Wilcox <willy@...radead.org>
> > Cc: Andreas Gruenbacher <andreas.gruenbacher@...il.com>
> > Tested-by: Huang Jianan <huangjianan@...o.com> # erofs
> > Signed-off-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>
Many thanks for the review!
Thanks,
Gao Xiang
Powered by blists - more mailing lists