Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1285115pxv; Fri, 16 Jul 2021 06:05:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj0EfnfJhGE7ntzmqgmSOOJt2Viv2skKpryijxnFte0motxsaUeQ5nBhJBzYNp5myVnV3I X-Received: by 2002:a02:8184:: with SMTP id n4mr8867377jag.17.1626440701854; Fri, 16 Jul 2021 06:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626440701; cv=none; d=google.com; s=arc-20160816; b=NejVextA5Ddz6iSYxxIlg7vyA2iaDRORwkH2yCY4Nm8mxyfSa0+Q2PsT/xooTUf1j8 PClUXG4ugk4q+U83nE7fZXhUIsWLDIEhG1sSNVOK8n7ItL/LuaZznUkaTAVnTvINuOQ3 fN9OmMDeTtb36X6qyGI4MVN+H89kbOjiipeCwl7ePqQGqG5C+NphUnQalmcIaTSqkV4v fMopG1hRc2xNxNXJJmTepy1IWExxVz/MeufRrZUuHNVWs7QCcKkQDH6yiam4pEUxQLVL C+zAtmsPzuIIefAHrz8pkadtA56OUv6w+InCtUP99+dTaBZ8RUf45E1kHHSh/+lrxKqb nNIA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZnncS7EMVgffQsq6qFPh/18HhJ7accRmRlB/yo0s+qU=; b=ZnQV00Y2eeiY/etcd+uWQu3WIrz+wj+gWTJsYyKvaIZrwlyIUyQzNcYgKhcBE/nKGo f3daivGyDccCCDtReVhByB6XAl9I2jDTX715770xXH73jxufqkbU9Mqlk2KKDL/mWjER rdITZ9+6nXWnJMWQYAGNX8vWPJ6iuVcUK3ey2U29qVIZ/WcyXh3clyuw9iuvdIRdQU8S fYT06xVVI2R1/FMZoysD4Rh/r+XuKli0b3x3HP+34IN/vqkYNSbaSIcLWF2nvDMorMYN rObibjBF2nOjfux3S4AuP+IpUs3juoWdfjmuqdsblo4M4j9obfogqqbKMYV72v+J0WnE y2MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JSAv+m6Z; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si9511259ilr.23.2021.07.16.06.04.43; Fri, 16 Jul 2021 06:05:01 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JSAv+m6Z; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239590AbhGPNG5 (ORCPT + 99 others); Fri, 16 Jul 2021 09:06:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232706AbhGPNG4 (ORCPT ); Fri, 16 Jul 2021 09:06:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF456C061760; Fri, 16 Jul 2021 06:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZnncS7EMVgffQsq6qFPh/18HhJ7accRmRlB/yo0s+qU=; b=JSAv+m6ZpKT/OgpPZ5INhBHanu QVyPEIr/P4R+CJu/yBbb24MkyFoVlRsOhkblNsYi+CBUoalGt+yQLUtQ3PMNxYtPDBRBGc6LB62jU XOcXv8JP7Htt4hYsHDeeBN0ZeqGwM3MouwXrhVMkRVQWeztziQ9eNQR8T/xZe8KGTqXMWdv8JePdu snYUMYkPAdRMiWJmWnBasals+i5LGXq8PACRz1efviUrq1ahXYxCVgcsla2P+zXpN3vMBS61C4gri DntZyk/SJXTLoCRkKaDzsL0L0vswEtdBFgClxONP/qIEs0NSlGCSz1TUhIrHRt34N1SahOCOpvtGs XjGd69zQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4NU5-004URh-SL; Fri, 16 Jul 2021 13:02:44 +0000 Date: Fri, 16 Jul 2021 14:02:29 +0100 From: Matthew Wilcox To: Gao Xiang Cc: linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, LKML , "Darrick J. Wong" , Christoph Hellwig , Chao Yu , Liu Bo , Joseph Qi , Liu Jiang Subject: Re: [PATCH 1/2] iomap: support tail packing inline read Message-ID: References: <20210716050724.225041-1-hsiangkao@linux.alibaba.com> <20210716050724.225041-2-hsiangkao@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210716050724.225041-2-hsiangkao@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 16, 2021 at 01:07:23PM +0800, Gao Xiang wrote: > This tries to add tail packing inline read to iomap. Different from > the previous approach, it only marks the block range uptodate in the > page it covers. Why? This path is called under two circumstances: readahead and readpage. In both cases, we're trying to bring the entire page uptodate. The inline extent is always the tail of the file, so we may as well zero the part of the page past the end of file and mark the entire page uptodate instead and leaving the end of the page !uptodate. I see the case where, eg, we have the first 2048 bytes of the file out-of-inode and then 20 bytes in the inode. So we'll create the iop for the head of the file, but then we may as well finish the entire PAGE_SIZE chunk as part of this iteration rather than update 2048-3071 as being uptodate and leave the 3072-4095 block for a future iteration.