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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C368C17441 for ; Tue, 12 Nov 2019 00:43:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD5052196E for ; Tue, 12 Nov 2019 00:43:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="SOzp8l2j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD5052196E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 749766B026E; Mon, 11 Nov 2019 19:43:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6FA796B0273; Mon, 11 Nov 2019 19:43:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6104E6B0275; Mon, 11 Nov 2019 19:43:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id 496516B026E for ; Mon, 11 Nov 2019 19:43:23 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 0CA09180AD801 for ; Tue, 12 Nov 2019 00:43:23 +0000 (UTC) X-FDA: 76145776686.27.knot62_3a9a09b7a7127 X-HE-Tag: knot62_3a9a09b7a7127 X-Filterd-Recvd-Size: 3074 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Nov 2019 00:43:22 +0000 (UTC) Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D337121872; Tue, 12 Nov 2019 00:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573519401; bh=2ydOdcJmPK7SfwcXHI6Om5OCHngakPJ/DYZhOTWW10o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SOzp8l2jF+hnRTMM8q4NciR40xpr2wA8IEZXzXLtzty1uJCCAHC48frwRoMrmhIgj /7KlrVHe8GSSQzkgLciyKV6Wjc2QrBzyUz7KSoNvmSZmxLcVP9FF5gG3lBZZ8iYeIs 16TeSWpaFSFmQYkdL5nMvM/M08VwG7jCggvpqX5s= Date: Mon, 11 Nov 2019 16:43:20 -0800 From: Andrew Morton To: ira.weiny@intel.com Cc: Alexander Viro , Chris Mason , Josef Bacik , David Sterba , Jaegeuk Kim , Chao Yu , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Trond Myklebust , Anna Schumaker , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-mm@kvack.org, Dave Chinner , Jan Kara Subject: Re: [PATCH 2/2] fs: Move swap_[de]activate to file_operations Message-Id: <20191111164320.80f814161469055b14f27045@linux-foundation.org> In-Reply-To: <20191112003452.4756-3-ira.weiny@intel.com> References: <20191112003452.4756-1-ira.weiny@intel.com> <20191112003452.4756-3-ira.weiny@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 11 Nov 2019 16:34:52 -0800 ira.weiny@intel.com wrote: > From: Ira Weiny > > swap_activate() and swap_deactivate() have nothing to do with > address spaces. We want to eventually make the address space operations > dynamic to switch inode flags on the fly. What does this mean? > So to simplify this code as > well as properly track these operations we move these functions to the > file_operations vector. > > This has been tested with XFS but not NFS, f2fs, or btrfs. > > Also note f2fs and xfs have simple moves of their functions to > facilitate compilation. No functional changes are contained within > those functions. > > ... > > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -11002,6 +11002,8 @@ static const struct file_operations btrfs_dir_file_operations = { > #endif > .release = btrfs_release_file, > .fsync = btrfs_sync_file, > + .swap_activate = btrfs_swap_activate, > + .swap_deactivate = btrfs_swap_deactivate, > }; Shouldn't this be btrfs_file_operations?