Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5249690pxv; Wed, 21 Jul 2021 00:32:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/wubcSvDtKZQ80LdS94oq7+ZjDtkqDcS0pTmYjHWRVZ+WANofNiC6obfPd3rugPHHHa+m X-Received: by 2002:a17:906:a185:: with SMTP id s5mr36713616ejy.96.1626852723649; Wed, 21 Jul 2021 00:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626852723; cv=none; d=google.com; s=arc-20160816; b=GQd43COusaf0Lmc+lq+DVT1bGDLrOJg4VXlbIIUBHACnb4QKYgJGVpOX6R0qSqdTlP +6Qrfv9ca0qyYReenr6K05KmB0FdV20Vmlt9IZw8QTjKaA6WTnUlYimWZo9Tw0OQqcNR rX44xszePYL4JESTaB3rg7k9AJkfObv2iT+TVGxLx13Mn9fkpkvbyZvqzHBo4r4cs0hy 4BF/1QzZndIzKdK57CXjxyJ8Q0l7Viysr19djf+lEAR0zFU4j2y5CqIKEPU16zIjb51t lVvJVXxl+6R2uYcx2xmCHiYlwXNpP0oTnlUIhu1qj1u8cN+4R4JB74Un9u+HGQPytblK ulqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=ODckXC4vz8APmlvgRBW+18ghW+wnapSRSRouXbkTigs=; b=NCiRXGzAasULTV4uEMvL3iKm6gbENH/sL5Mz0WPoCIapJBYFw57fdTj3Eb2geSX0Hf +kWHhpI95NUsSmn08s4odFWGPrJoHkJrfDDUigoBE/tykdhuEBmKUOmBi6qfbHicZbi1 todto+uQnaH7vftFl7QIrcqnkHz55grzz6Sxq/hdYhsIfz+s9rScctGTHKEoOy293i+C 1K3ra5rAHcu/SHJS3Ff3OP90QN22Z390e+I1jm8eIcguWdxxYpQblswboWh1DQ1JT1WA B+o/P5v+Rv9w6EIGykK0URYhheqqgijh0DlYp31gQ/UcAUqUn0nABoX0a4XsKrbLllSR GBxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs3si17369042ejc.368.2021.07.21.00.31.39; Wed, 21 Jul 2021 00:32:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235338AbhGUGs6 (ORCPT + 99 others); Wed, 21 Jul 2021 02:48:58 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:59771 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234659AbhGUGsY (ORCPT ); Wed, 21 Jul 2021 02:48:24 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UgVICqi_1626852531; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0UgVICqi_1626852531) by smtp.aliyun-inc.com(127.0.0.1); Wed, 21 Jul 2021 15:28:52 +0800 Date: Wed, 21 Jul 2021 15:28:51 +0800 From: Gao Xiang To: Andreas =?utf-8?Q?Gr=C3=BCnbacher?= Cc: "Darrick J. Wong" , Matthew Wilcox , linux-erofs@lists.ozlabs.org, Linux FS-devel Mailing List , LKML , Christoph Hellwig Subject: Re: [PATCH v4] iomap: support tail packing inline read Message-ID: Mail-Followup-To: Andreas =?utf-8?Q?Gr=C3=BCnbacher?= , "Darrick J. Wong" , Matthew Wilcox , linux-erofs@lists.ozlabs.org, Linux FS-devel Mailing List , LKML , Christoph Hellwig References: <20210720133554.44058-1-hsiangkao@linux.alibaba.com> <20210720204224.GK23236@magnolia> <20210721001720.GS22357@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 21, 2021 at 08:43:00AM +0200, Andreas Grünbacher wrote: > Am Mi., 21. Juli 2021 um 04:54 Uhr schrieb Gao Xiang > : > > Hi Andreas, > > > > On Wed, Jul 21, 2021 at 04:26:47AM +0200, Andreas Grünbacher wrote: > > > Am Mi., 21. Juli 2021 um 02:33 Uhr schrieb Gao Xiang > > > : > > > > > And since you can only kmap one page at a time, an inline read grabs the > > > > > first part of the data in "page one" and then we have to call > > > > > iomap_begin a second time get a new address so that we can read the rest > > > > > from "page two"? > > > > > > > > Nope, currently EROFS inline data won't cross page like this. > > > > > > > > But in principle, yes, I don't want to limit it to the current > > > > EROFS or gfs2 usage. I think we could make this iomap function > > > > more generally (I mean, I'd like to make the INLINE extent > > > > functionity as general as possible, > > > > > > Nono. Can we please limit this patch what we actually need right now, > > > and worry about extending it later? > > > > Can you elaborate what it will benefit us if we only support one tail > > block for iomap_read_inline_data()? (I mean it has similar LOC changes, > > similar implementation / complexity.) The only concern I think is if > > it causes gfs2 regression, so that is what I'd like to confirm. > > iomap_read_inline_data supports one inline page now (i.e., from the > beginning of the file). It seems that you don't need more than one > tail page in EROFS, right? > > You were speculating about inline data in the middle of a file. That > sounds like a really, really bad idea to me, and I don't think we > should waste any time on it. Huh? why do you think it's a bad idea? I could give real example to you. At least, it can be used for some encoded data or repeated pattern (such as AABBAABBAABB...) in a packed way (marked in extent metadata). Is that enough? Again, I don't see what the benefits if limiting it to one tail block, it (maybe) just modifies: + /* handle tail-packing blocks cross the current page into the next */ + size = min_t(unsigned int, iomap->length + pos - iomap->offset, + PAGE_SIZE - poff); to + size = min_t(unsigned int, i_blocksize(inode), + PAGE_SIZE - poff); And which has the similar complexity, so why not using iomap->length here instead? Thanks, Gao Xiang