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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 D8CC2C432BE for ; Mon, 26 Jul 2021 13:27:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0D246008E for ; Mon, 26 Jul 2021 13:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233517AbhGZMrY (ORCPT ); Mon, 26 Jul 2021 08:47:24 -0400 Received: from verein.lst.de ([213.95.11.211]:45189 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232572AbhGZMrX (ORCPT ); Mon, 26 Jul 2021 08:47:23 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5A9F867373; Mon, 26 Jul 2021 15:27:49 +0200 (CEST) Date: Mon, 26 Jul 2021 15:27:49 +0200 From: Christoph Hellwig To: Andreas =?iso-8859-1?Q?Gr=FCnbacher?= Cc: Christoph Hellwig , Andreas Gruenbacher , Gao Xiang , "Darrick J . Wong" , Matthew Wilcox , Huang Jianan , linux-erofs@lists.ozlabs.org, Linux FS-devel Mailing List , Linux Kernel Mailing List Subject: Re: [PATCH v7] iomap: make inline data support more flexible Message-ID: <20210726132749.GA6535@lst.de> References: <20210723174131.180813-1-hsiangkao@linux.alibaba.com> <20210725221639.426565-1-agruenba@redhat.com> <20210726110611.459173-1-agruenba@redhat.com> <20210726121702.GA528@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 26, 2021 at 02:27:12PM +0200, Andreas Grünbacher wrote: > > That is how can size be different from iomap->length? > > Quoting from my previous reply, > > "In the iomap_readpage case (iomap_begin with flags == 0), > iomap->length will be the amount of data up to the end of the inode. > In the iomap_file_buffered_write case (iomap_begin with flags == > IOMAP_WRITE), iomap->length will be the size of iomap->inline_data. > (For extending writes, we need to write beyond the current end of > inode.) So iomap->length isn't all that useful for > iomap_read_inline_data." I think we should fix that now that we have the srcmap concept. That is or IOMAP_WRITE|IOMAP_ZERO return the inline map as the soure map, and return the actual block map we plan to write into as the main iomap. > > > Shouldn't the offset_in_page also go into iomap_inline_data_size_valid, > > which should probably be called iomap_inline_data_valid then? > > Hmm, not sure what you mean: iomap_inline_data_size_valid does take > offset_in_page(iomap->inline_data) into account. Indeed, orry for the braino. > I thought people were okay with 80 character long lines? No.