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 X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56370C4338F for ; Sat, 24 Jul 2021 00:54:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CAA560EB6 for ; Sat, 24 Jul 2021 00:54:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233586AbhGXANn (ORCPT ); Fri, 23 Jul 2021 20:13:43 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:37922 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233337AbhGXANl (ORCPT ); Fri, 23 Jul 2021 20:13:41 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UgkuJRR_1627088050; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0UgkuJRR_1627088050) by smtp.aliyun-inc.com(127.0.0.1); Sat, 24 Jul 2021 08:54:12 +0800 Date: Sat, 24 Jul 2021 08:54:10 +0800 From: Gao Xiang To: Matthew Wilcox Cc: linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, LKML , Christoph Hellwig , "Darrick J . Wong" , Andreas Gruenbacher , Huang Jianan Subject: Re: [PATCH v7] iomap: make inline data support more flexible Message-ID: Mail-Followup-To: Matthew Wilcox , linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, LKML , Christoph Hellwig , "Darrick J . Wong" , Andreas Gruenbacher , Huang Jianan References: <20210723174131.180813-1-hsiangkao@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Cc: Darrick J. Wong > > Cc: Matthew Wilcox > > Cc: Andreas Gruenbacher > > Tested-by: Huang Jianan # erofs > > Signed-off-by: Gao Xiang > > Reviewed-by: Matthew Wilcox (Oracle) Many thanks for the review! Thanks, Gao Xiang