Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9088848rwp; Wed, 19 Jul 2023 22:26:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZbWg27lGhYlpl0dq39E8ijHp8fy3Jdzj3psDPjsVQfr2hjI3fOnC5LOMD9QJLnemuMhTw X-Received: by 2002:a17:90a:498c:b0:263:b62:4472 with SMTP id d12-20020a17090a498c00b002630b624472mr766618pjh.48.1689830792092; Wed, 19 Jul 2023 22:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689830792; cv=none; d=google.com; s=arc-20160816; b=USg7RcmqlhdddLVfDEVndBf8dVBA0Xm/hgGCyWjniXBkz0JrVytBpspDZIRIowOe+o 6XduUQfYFPjpd798wjoU5+/1oNtUmNyUfP1p/+xlMdCmTx4vbrLL4ytlDx0f1G8gyS+N yO8/6dEF/BUJU0LTrElH2RD7qGzoxd7qiMxlvcNFKmhF6CMd//75S48vVPnYYigJwrgn cb0mNEyGsZLA3yoyfpMSSP+418X/58otxI8V5le/UniPmCHhAePqGbgKoCKJv6QoBKLO abitbBaE8E8z8tvbHRHeB1F7Dcbh35Wp7ko90sbzy72t7JCrwEF3mYlXjoYxltvxazuu 9B1Q== 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=Au36BTKjh60X/IX5uvDzqozJt2g/PHKqry8jTcwngCg=; fh=pdfnHZCo56NpfDcM6nRqy+85PfBhGcCNyyiDc41BuAY=; b=r2t69SOAY44eoa85/YLgqv0mvkt3t0RsLy72LsKxamkUz3NbBtNMLG2pE/v49/E1d6 XdSmNL5fGoDrF3YzmDbhOkljnrIu2/UAJgRsw0fFya/nd4HRAx+/6HNAYgOLFpRfA3aA Z6RchDtECq14yE5CO4B+rz+TxpgtxY8bNOtzt3cb/xhTcTU5ZfpZR/DU6mPWOPY9TOnm b7Ge+AFwqZv2Hd0EQl8a/eztlrB6yaGrR7CvJJHCc0X82Y8WnSAlLvW0XDPxhRy5IBPC 9Fv2kJG41Wu53O6lSLDpLQcrkqw26vZOLtm0YaD50OxJM9YSE3ry6L3j+5ranguHnul4 YAzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Agun3Dfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p6-20020a17090adf8600b00260d0644358si2758893pjv.187.2023.07.19.22.26.19; Wed, 19 Jul 2023 22:26:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Agun3Dfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbjGTFVm (ORCPT + 99 others); Thu, 20 Jul 2023 01:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjGTFVi (ORCPT ); Thu, 20 Jul 2023 01:21:38 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 970681710 for ; Wed, 19 Jul 2023 22:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=Au36BTKjh60X/IX5uvDzqozJt2g/PHKqry8jTcwngCg=; b=Agun3DfuD4Ct2W+pw6tk5K6HON Q95uIEriBOmCM5tQ1yhB1gg6FGiOgOjItEdMMyq13QXjCmvAeV9ZNoV8FXEIyjHQLSKhlpDsQ+4H5 5+aL8JdjvmOksu0KvJWyLZd6QVmDLIME0H4V/Vf2YqLp6GGijpyLKXvHb6yfCiQ+HXjmYapjuQEXo whIbL6YnAq3ZN2jaCNAxsWMro10zZSlKy24MBEa4CYUUTKfHsW7GoING4UG1sXyo5aA9knwrpG4Hg xnP/3Yi4dqinFAyzb4Pm99capvHooYN0ahR2BAEA7NQlnGcG394HYAt5FLHPwzmpE4ZOE19I4fSg9 Z3llPNsw==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qMM64-009opH-2y; Thu, 20 Jul 2023 05:21:05 +0000 Date: Wed, 19 Jul 2023 22:21:04 -0700 From: Christoph Hellwig To: Matthew Wilcox Cc: "zhangpeng (AS)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, sidhartha.kumar@oracle.com, akpm@linux-foundation.org, wangkefeng.wang@huawei.com, sunnanyong@huawei.com Subject: Re: [PATCH 1/6] mm/page_io: use a folio in __end_swap_bio_read() Message-ID: References: <20230717132602.2202147-1-zhangpeng362@huawei.com> <20230717132602.2202147-2-zhangpeng362@huawei.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 bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 18, 2023 at 05:16:15PM +0100, Matthew Wilcox wrote: > How does _this_ folio end up in btrfs's write_dev_supers()? This is a > swap read. The only folios which are swapped are anonymous and tmpfs. > btrfs takes care of doing its own I/O. wait_dev_supers() is looking > for the error set in btrfs_end_super_write() which is the completion > routine for write_dev_supers(). The pages involved there are attached > to a btrfs address_space, not shmem or anon. It actually operates on the block_device inode. That does not matter for this series, but complicates things in other ways.