Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3598897pxv; Mon, 19 Jul 2021 04:24:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzCI1dS2QE6llQYB/SA9qh1qB6KhrKvme8iVLnH35MvYsbVD1ieX2eYAsZ5dJbIxyTZTg9 X-Received: by 2002:a05:6402:27d2:: with SMTP id c18mr33658793ede.261.1626693886408; Mon, 19 Jul 2021 04:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626693886; cv=none; d=google.com; s=arc-20160816; b=GKfBtthcW26IX2ufE4/TkbwJ1xSkwlhoU7tfT5LexyuoT9RXR82AdsJ+XrIKEUuZJg QzQls8J08m0LdCjRaSTfBpOPolEi49cNCeaFLX17waABMoXRa/XMXbWM3J5DArfzAqZO 1xgqULGrlY7zyr4u8YVYVcnPnkdYJdApUBAiTPJTLll1IjM6F55EtDEE8JtFIQ2C04lb JXS9z8e5i8k7Yz1EbnV1C+o6g7SlQTr7QyDS1eMCN2KZVT0hTlX/mNGOx+S0Sqx9R1A2 NOebF3QA9E/rOmUird81SmEGz04c+IgfWMyPnUTuJnwRDYxTNKLG++gt1n+0e/v2FaXJ 04CQ== 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=oHvZCvnyWx34050zBCmoBlfirYI9L7hPimae0Gd3np4=; b=1JHcl+3zmqFO0cdnQFmi5wrMAm6UeLq8rfUOWTGQXJEj/S9IeSROE70GiaSd4M3ZkZ Lx/nO5pdvTfEsraB31I65jB1Ci6H5DNZWCtTYsoYO8aYyQ5GoE3Yi5hibORxhXJeSuT/ 3Pj7Kf2SNDC2uXyrpoVhCcKago7MyZTOG7lNfK3pbjSOeoemz3BdO4ug00ti09Yn17Qi PotN+OehclggIcD+v5h2if7vzgXdL1R8Zy1pICfqb3hZlCJolLWF+ydVgUyIFS77OEsf 2LySaErmyFwS3Suz1qKwcNqCpfCut7Z7pyoX7J+wc7L2UxV9gKQS96UmYvWiW3l1eSqN dFOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=H4yUT9cW; 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 j5si1977210ejm.413.2021.07.19.04.24.23; Mon, 19 Jul 2021 04:24:46 -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=H4yUT9cW; 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 S232156AbhGSKlu (ORCPT + 99 others); Mon, 19 Jul 2021 06:41:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236825AbhGSKlL (ORCPT ); Mon, 19 Jul 2021 06:41:11 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15651C061574; Mon, 19 Jul 2021 03:32:33 -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=oHvZCvnyWx34050zBCmoBlfirYI9L7hPimae0Gd3np4=; b=H4yUT9cWMYv6PGWGnrxRQtjaqD tikdFFkPspmpm9WWHPs2lMO3rgdjm+yD8xfWJ4m8QSvKpK0FmtEvknaMdhjHm32O60PZ7W3ONTuLn 9JXAac35lG0QVkL8qmcTP6EvkRwAyM0IFklG6p8pq5Cyp/YVAd8uAvbm/I3YMiCnNmBJFp/lj5wjv ii3u9rPfSPFUDDkSDCqrwtPepY5ShmRTv4r5H1XKzTdQfGvbvj98RGa21oYlDCxeteU8dV7LRLk5y iKZyCZy2iKDHqLpEEKk5BJTJ+7TDna/d7Mk9NuvRNAhfekwXOl3NH24wEJWNvwTJkzBq2jzk3/cac 1XZtUd7Q==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5RJ8-006naF-3J; Mon, 19 Jul 2021 11:19:42 +0000 Date: Mon, 19 Jul 2021 12:19:34 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Andreas Gr?nbacher , Christoph Hellwig , linux-erofs@lists.ozlabs.org, Linux FS-devel Mailing List , LKML , "Darrick J. Wong" , Chao Yu , Liu Bo , Joseph Qi , Liu Jiang Subject: Re: [PATCH 1/2] iomap: support tail packing inline read Message-ID: References: <20210716050724.225041-2-hsiangkao@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 17, 2021 at 07:40:41PM +0100, Matthew Wilcox wrote: > Well, either sense of a WARN_ON is wrong. > > For a file which is PAGE_SIZE + 3 bytes in size, to_iomap_page() will > be NULL. For a file which is PAGE_SIZE/2 + 3 bytes in size, > to_iomap_page() will not be NULL. (assuming the block size is <= > PAGE_SIZE / 2). > > I think we need a prep patch that looks something like this: Something like this is where we should eventually end up, but it also affects the read from disk case so we need to be careful.