Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3492646pxb; Mon, 24 Jan 2022 10:41:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTkzW2nV4+DLlTC/wQK2F11KeEVydrF/UylmDzASo5Ld3GUpMQYWIR5yEQwZ8YxuxQSK+w X-Received: by 2002:a05:6a00:148c:b0:4c2:6f06:8c70 with SMTP id v12-20020a056a00148c00b004c26f068c70mr15351292pfu.48.1643049680985; Mon, 24 Jan 2022 10:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643049680; cv=none; d=google.com; s=arc-20160816; b=Yg4/wFeamyG/kZ/P+D191FC6jFHIhJ2DKOV27t2jhKMNndCanya3KhYTlDQlPKXQ6K KYkPd5xWDFq1BK3h01km6Pcs4FTbZmmQFuh2hK+EWkz2RY8ECaQ/VyYMk4HhS1fJZY29 Z3HaKpJtUQ4jyqLvGeVZmCf2kJvZCTlXPz+Yf72hsaYH0KnX6O09hK0IdVLU+beybv1O E0U0dzjoukETERfCpS3x+erilANW6mSk9D8BVhy512k4DOeicTcPwgBeHn3tObUfnoh1 5GVKJkZWJdw5GlWK53F31yi7reDSxiB0/dHHS63gYwBwfifIkzaBpBvDFxZRWKx+KZBE Zzwg== 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=T/0oTeq5v1ZGP3qGpJ+MQW5tAL9vDWjxzsmMqt+GWbk=; b=ebDo/YzD7diDtBHXm17UujqxtM6MVJbnlreFeHBO98nPU2g3GWPJ8Brk+48d2Ajx7S /1UdVDTrrzpeL0W9qAOtS/v9Lg0HiY1GpAsQSvby7YB7Zn4rxR5HbDXSE08D0v0r3oDJ kj87NXgBkWYihCHLTn1WQS6WpeF3vt1wN+HOs7Cdb/B5s2zsWFUZTVcc0PchFgM/ffc7 CO1UmVUDCeyuNN83H/3RvF0MCehjllCI5YFujGkJ0LK9g2DRC/BxVhbqPmWsALLyg8+/ /1diFtzUovZDwZDf2SnbAqKOV5vh9g+kqn6yB+TY5E7H//6i8sitbBhzV6jus1jA2HMs rmaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=1ZX+gL19; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 z17si14756007pgk.199.2022.01.24.10.40.50; Mon, 24 Jan 2022 10:41:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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=bombadil.20210309 header.b=1ZX+gL19; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232279AbiAXHab (ORCPT + 99 others); Mon, 24 Jan 2022 02:30:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232329AbiAXHaa (ORCPT ); Mon, 24 Jan 2022 02:30:30 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4AD7C06173B; Sun, 23 Jan 2022 23:30:30 -0800 (PST) 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 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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