Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3827201ybc; Thu, 14 Nov 2019 15:21:33 -0800 (PST) X-Google-Smtp-Source: APXvYqyweS723x4tLF74NmosXxbq5P7Nh8Tzunv1DGuzr9MRfnVAB1iNjXT+fe9ogTV21IVq4Uc9 X-Received: by 2002:adf:f6cf:: with SMTP id y15mr10906318wrp.97.1573773693178; Thu, 14 Nov 2019 15:21:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573773693; cv=none; d=google.com; s=arc-20160816; b=j6aW+5JWOAnc3p9XEm4gW569yx3eBVFCXb8QByIWrP6TJ3+xrYpP+UJcMV+/hbT6qU 6szqWiJQiPr1L8MccMqbaOqte4oB2HtVoQjrV0ApoUQHwzgQRS9D4k/Iv4mttFYvywsd uDnLzAF9SRwmzaUkpv0sEl7S/Upq7SF2mZpW5slPszD3erijhbjhOlFzQYMF+TB642/K 8PKUmhswuBy1aEC4JyCXiTV8WaH4wcxpA1Qq0NI7w4kQjtDloLbPwxRQ72pOoVykGpxo VfDuofwFarPubXljeyo4/m1spEfokwyY4CyEES1E40AuwMQAumWLr6di31Eaxzaz4wpn oMtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=M9BV5AOahRsBpG/lR5WR7uD4sSJaB2/5KhmrzcgOZDM=; b=yI2KscAcyNHvRw2fGXMfBTV9u4BkIJ+oB3yvJ/Ou1ZsdNUSmaEC84+ECPC7e05ZLV6 EANwaHJ9Ra/Bn7K5ZvhbIST3QSDUSZ4BvpOe5lH8Gr9DwgfMKeJVYhIeOmn/Pg0l+2l1 qznH7LgKIjwSO0+WOzIkSREt0XeN+J2EAoZkrBQATmxjs7zoT2Qps+l2W9phzGupIKij UjHS0cVR8hc4DRDbEuI6KsqyD7FVdi7LR4R0hzyF+uDviAOcChEmp2WdzdyivFeI+9rC afViAoO/14HjLKfw1leL3iRQpj6CbPGNxPdBdwsMq30rsqXuSD0xXNyTjFhOfituPaBr V8XA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si4687006edq.317.2019.11.14.15.21.08; Thu, 14 Nov 2019 15:21:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727224AbfKNXTs (ORCPT + 99 others); Thu, 14 Nov 2019 18:19:48 -0500 Received: from mga18.intel.com ([134.134.136.126]:23503 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbfKNXTs (ORCPT ); Thu, 14 Nov 2019 18:19:48 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2019 15:19:47 -0800 X-IronPort-AV: E=Sophos;i="5.68,306,1569308400"; d="scan'208";a="199003287" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.157]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2019 15:19:46 -0800 From: ira.weiny@intel.com To: Andrew Morton 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, Ira Weiny Subject: [PATCH] Documentation/fs: Move swap_[de]activate() to file_operations Date: Thu, 14 Nov 2019 15:19:43 -0800 Message-Id: <20191114231943.11220-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny Update the documentation for the move of the swap_* functions out of address_space_operations and into file_operations. Signed-off-by: Ira Weiny --- Follow on to the V2 series sent earlier. If I need to spin a V3 I will squash this into patch 2/2 "fs: Move swap_[de]activate to file_operations" Documentation/filesystems/vfs.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst index 7d4d09dd5e6d..03a740d7faa4 100644 --- a/Documentation/filesystems/vfs.rst +++ b/Documentation/filesystems/vfs.rst @@ -731,8 +731,6 @@ cache in your filesystem. The following members are defined: unsigned long); void (*is_dirty_writeback) (struct page *, bool *, bool *); int (*error_remove_page) (struct mapping *mapping, struct page *page); - int (*swap_activate)(struct file *); - int (*swap_deactivate)(struct file *); }; ``writepage`` @@ -924,16 +922,6 @@ cache in your filesystem. The following members are defined: Setting this implies you deal with pages going away under you, unless you have them locked or reference counts increased. -``swap_activate`` - Called when swapon is used on a file to allocate space if - necessary and pin the block lookup information in memory. A - return value of zero indicates success, in which case this file - can be used to back swapspace. - -``swap_deactivate`` - Called during swapoff on files where swap_activate was - successful. - The File Object =============== @@ -988,6 +976,8 @@ This describes how the VFS can manipulate an open file. As of kernel struct file *file_out, loff_t pos_out, loff_t len, unsigned int remap_flags); int (*fadvise)(struct file *, loff_t, loff_t, int); + int (*swap_activate)(struct file *); + int (*swap_deactivate)(struct file *); }; Again, all methods are called without any locks being held, unless @@ -1108,6 +1098,16 @@ otherwise noted. ``fadvise`` possibly called by the fadvise64() system call. +``swap_activate`` + Called when swapon is used on a file to allocate space if + necessary and pin the block lookup information in memory. A + return value of zero indicates success, in which case this file + can be used to back swapspace. + +``swap_deactivate`` + Called during swapoff on files where swap_activate was + successful. + Note that the file operations are implemented by the specific filesystem in which the inode resides. When opening a device node (character or block special) most filesystems will call special -- 2.21.0