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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB0C8C433F5 for ; Mon, 24 Jan 2022 07:30:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E3E66B0081; Mon, 24 Jan 2022 02:30:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 56C866B0083; Mon, 24 Jan 2022 02:30:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45B176B0085; Mon, 24 Jan 2022 02:30:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay036.a.hostedemail.com [64.99.140.36]) by kanga.kvack.org (Postfix) with ESMTP id 329A26B0081 for ; Mon, 24 Jan 2022 02:30:32 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E109422894 for ; Mon, 24 Jan 2022 07:30:31 +0000 (UTC) X-FDA: 79064357862.03.7B2E44E Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf28.hostedemail.com (Postfix) with ESMTP id 965B3C0042 for ; Mon, 24 Jan 2022 07:30:31 +0000 (UTC) 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=T/0oTeq5v1ZGP3qGpJ+MQW5tAL9vDWjxzsmMqt+GWbk=; b=1ZX+gL19O9OIi5/UKe7DGF8ZyC oX9e8rVU9GSB6cHERUs8lIDyyB923CxgTzr8ESuwgAljOlDFc2ZRCSm1GyjdVImceT+mvFGLBdE0H jLtJ3H0omGP9hBMOEVHHba5PqhYfG217gGGswIx3bK6QYilFewk0pMiCrAACvst+ckm5l8AO1Ebk/ am0dt7ar8ILik1psIJkvff/5VM2377zwMBs/83+P5gWjLtVJsQa/vCrqyQ0d+AyXnVd+QLMhOPDAy yWElEUvYhyMt1DSsFTxRIOSYScYzUwNXkJuqEUmAV8mSGfgUp7S7As4suReB+lpWftPV57uFphamo 9us+R7UQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBto0-002USC-MT; Mon, 24 Jan 2022 07:30:24 +0000 Date: Sun, 23 Jan 2022 23:30:24 -0800 From: Christoph Hellwig To: NeilBrown Cc: Trond Myklebust , Anna Schumaker , Chuck Lever , Andrew Morton , Mel Gorman , Christoph Hellwig , David Howells , linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/23] MM: move responsibility for setting SWP_FS_OPS to ->swap_activate Message-ID: References: <164299573337.26253.7538614611220034049.stgit@noble.brown> <164299611275.26253.11641346650863170349.stgit@noble.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <164299611275.26253.11641346650863170349.stgit@noble.brown> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=1ZX+gL19; spf=none (imf28.hostedemail.com: domain of BATV+b18af077b488c69bdec9+6728+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+b18af077b488c69bdec9+6728+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 965B3C0042 X-Stat-Signature: 35e63tuaawa5dmjgifus564uhx1dqget X-HE-Tag: 1643009431-609842 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 24, 2022 at 02:48:32PM +1100, NeilBrown wrote: > If a filesystem wishes to handle all swap IO itself (via ->direct_IO), Right now it's half ->direct_IO and half ->readpage and about to change with your series, isn't it? > rather than just providing devices addresses for submit_bio(), > SWP_FS_OPS must be set. > Currently the protocol for setting this it to have ->swap_activate > return zero. In that case SWP_FS_OPS is set, and add_swap_extent() > is called for the entire file. > > This is a little clumsy as different return values for ->swap_activate > have quite different meanings, and it makes it hard to search for which > filesystems require SWP_FS_OPS to be set. > > So remove the special meaning of a zero return, and require the > filesystem to set SWP_FS_OPS if it so desires, and to always call > add_swap_extent() as required. > > Currently only NFS and CIFS return zero for add_swap_extent(). > > Signed-off-by: NeilBrown Otherwise looks good: Reviewed-by: Christoph Hellwig