linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] Documentation/fs: Move swap_[de]activate() to file_operations
@ 2019-11-14 23:19 ira.weiny
  2019-11-15  0:28 ` Darrick J. Wong
  2019-11-15  8:44 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: ira.weiny @ 2019-11-14 23:19 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-nfs, linux-kernel, linux-mm, linux-fsdevel, Josef Bacik,
	Anna Schumaker, linux-xfs, Chris Mason, Alexander Viro,
	David Sterba, Jaegeuk Kim, linux-f2fs-devel, Ira Weiny,
	Trond Myklebust, linux-btrfs

From: Ira Weiny <ira.weiny@intel.com>

Update the documentation for the move of the swap_* functions out of
address_space_operations and into file_operations.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
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



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] Documentation/fs: Move swap_[de]activate() to file_operations
  2019-11-14 23:19 [f2fs-dev] [PATCH] Documentation/fs: Move swap_[de]activate() to file_operations ira.weiny
@ 2019-11-15  0:28 ` Darrick J. Wong
  2019-11-15  8:44 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2019-11-15  0:28 UTC (permalink / raw)
  To: ira.weiny
  Cc: linux-nfs, linux-kernel, linux-mm, linux-fsdevel, Josef Bacik,
	Anna Schumaker, linux-xfs, Chris Mason, Alexander Viro,
	David Sterba, Jaegeuk Kim, Andrew Morton, linux-f2fs-devel,
	Trond Myklebust, linux-btrfs

On Thu, Nov 14, 2019 at 03:19:43PM -0800, ira.weiny@intel.com wrote:
> From: Ira Weiny <ira.weiny@intel.com>
> 
> Update the documentation for the move of the swap_* functions out of
> address_space_operations and into file_operations.
> 
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
> 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
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] Documentation/fs: Move swap_[de]activate() to file_operations
  2019-11-14 23:19 [f2fs-dev] [PATCH] Documentation/fs: Move swap_[de]activate() to file_operations ira.weiny
  2019-11-15  0:28 ` Darrick J. Wong
@ 2019-11-15  8:44 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2019-11-15  8:44 UTC (permalink / raw)
  To: ira.weiny
  Cc: linux-nfs, linux-kernel, linux-mm, linux-fsdevel, Josef Bacik,
	Anna Schumaker, linux-xfs, Chris Mason, Alexander Viro,
	David Sterba, Jaegeuk Kim, Andrew Morton, linux-f2fs-devel,
	Trond Myklebust, linux-btrfs

On Thu, Nov 14, 2019 at 03:19:43PM -0800, ira.weiny@intel.com wrote:
> From: Ira Weiny <ira.weiny@intel.com>
> 
> Update the documentation for the move of the swap_* functions out of
> address_space_operations and into file_operations.
> 
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> ---
> 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"

Reviewed-by: David Sterba <dsterba@suse.com>


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-15  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 23:19 [f2fs-dev] [PATCH] Documentation/fs: Move swap_[de]activate() to file_operations ira.weiny
2019-11-15  0:28 ` Darrick J. Wong
2019-11-15  8:44 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).