Documentation/fs: Move swap_[de]activate() to file_operations
Subsystems (7)
PATCH 1/1 Documentation/fs: Move swap_[de]activate() to file_operations
From: Ira Weiny <[email protected]>
Update the documentation for the move of the swap_* functions out of address_space_operations and into file_operations.
---
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(-)
Documentation/filesystems/vfs.rst +12 -12
@@ -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
Signature · 1 line
2.21.0
Quoted 6 lines · On Thu, Nov 14, 2019 at 03:19:43PM -0800, [email protected] wrote:
From: Ira Weiny <[email protected]>
Update the documentation for the move of the swap_* functions out of
address_space_operationsand intofile_operations.Signed-off-by Ira Weiny <[email protected]>
Looks ok,
--D
Quoted 66 lines
---
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 tofile_operations"Documentation/filesystems/vfs.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)Documentation/filesystems/vfs.rst +12
-12@@ -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 specialSignature · 1 line
2.21.0
Quoted 9 lines · On Thu, Nov 14, 2019 at 03:19:43PM -0800, [email protected] wrote:
From: Ira Weiny <[email protected]>
Update the documentation for the move of the swap_* functions out of
address_space_operationsand intofile_operations.Signed-off-by Ira Weiny <[email protected]>---
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 tofile_operations"