diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2016-03-06 23:27:26 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-06-30 23:30:52 -0400 |
commit | f4e6d844bdc142322905d137a9e44e07eee43c5c (patch) | |
tree | 3feaa4a6dd2e88ddaa8867d645f9ed2346e7b38b | |
parent | d4c91a8f7e5514a1e9cd37b453fda0dedfa8045d (diff) |
Remove last traces of ->sync_page
Commit 7eaceaccab5f removed ->sync_page, but a few mentions of it still
existed in documentation and comments,
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | Documentation/block/biodoc.txt | 3 | ||||
-rw-r--r-- | Documentation/filesystems/Locking | 11 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 8 | ||||
-rw-r--r-- | fs/isofs/compress.c | 1 | ||||
-rw-r--r-- | fs/ntfs/inode.c | 2 |
5 files changed, 7 insertions, 18 deletions
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 5be8a7f4cc7f..026d13362aca 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -1024,8 +1024,7 @@ could be on demand. For example wait_on_buffer sets the unplugging going | |||
1024 | through sync_buffer() running blk_run_address_space(mapping). Or the caller | 1024 | through sync_buffer() running blk_run_address_space(mapping). Or the caller |
1025 | can do it explicity through blk_unplug(bdev). So in the read case, | 1025 | can do it explicity through blk_unplug(bdev). So in the read case, |
1026 | the queue gets explicitly unplugged as part of waiting for completion on that | 1026 | the queue gets explicitly unplugged as part of waiting for completion on that |
1027 | buffer. For page driven IO, the address space ->sync_page() takes care of | 1027 | buffer. |
1028 | doing the blk_run_address_space(). | ||
1029 | 1028 | ||
1030 | Aside: | 1029 | Aside: |
1031 | This is kind of controversial territory, as it's not clear if plugging is | 1030 | This is kind of controversial territory, as it's not clear if plugging is |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 75eea7ce3d7c..08086dc160d3 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -179,7 +179,6 @@ unlocks and drops the reference. | |||
179 | prototypes: | 179 | prototypes: |
180 | int (*writepage)(struct page *page, struct writeback_control *wbc); | 180 | int (*writepage)(struct page *page, struct writeback_control *wbc); |
181 | int (*readpage)(struct file *, struct page *); | 181 | int (*readpage)(struct file *, struct page *); |
182 | int (*sync_page)(struct page *); | ||
183 | int (*writepages)(struct address_space *, struct writeback_control *); | 182 | int (*writepages)(struct address_space *, struct writeback_control *); |
184 | int (*set_page_dirty)(struct page *page); | 183 | int (*set_page_dirty)(struct page *page); |
185 | int (*readpages)(struct file *filp, struct address_space *mapping, | 184 | int (*readpages)(struct file *filp, struct address_space *mapping, |
@@ -208,7 +207,6 @@ locking rules: | |||
208 | PageLocked(page) i_mutex | 207 | PageLocked(page) i_mutex |
209 | writepage: yes, unlocks (see below) | 208 | writepage: yes, unlocks (see below) |
210 | readpage: yes, unlocks | 209 | readpage: yes, unlocks |
211 | sync_page: maybe | ||
212 | writepages: | 210 | writepages: |
213 | set_page_dirty no | 211 | set_page_dirty no |
214 | readpages: | 212 | readpages: |
@@ -226,8 +224,8 @@ error_remove_page: yes | |||
226 | swap_activate: no | 224 | swap_activate: no |
227 | swap_deactivate: no | 225 | swap_deactivate: no |
228 | 226 | ||
229 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() | 227 | ->write_begin(), ->write_end() and ->readpage() may be called from |
230 | may be called from the request handler (/dev/loop). | 228 | the request handler (/dev/loop). |
231 | 229 | ||
232 | ->readpage() unlocks the page, either synchronously or via I/O | 230 | ->readpage() unlocks the page, either synchronously or via I/O |
233 | completion. | 231 | completion. |
@@ -283,11 +281,6 @@ will leave the page itself marked clean but it will be tagged as dirty in the | |||
283 | radix tree. This incoherency can lead to all sorts of hard-to-debug problems | 281 | radix tree. This incoherency can lead to all sorts of hard-to-debug problems |
284 | in the filesystem like having dirty inodes at umount and losing written data. | 282 | in the filesystem like having dirty inodes at umount and losing written data. |
285 | 283 | ||
286 | ->sync_page() locking rules are not well-defined - usually it is called | ||
287 | with lock on page, but that is not guaranteed. Considering the currently | ||
288 | existing instances of this method ->sync_page() itself doesn't look | ||
289 | well-defined... | ||
290 | |||
291 | ->writepages() is used for periodic writeback and for syscall-initiated | 284 | ->writepages() is used for periodic writeback and for syscall-initiated |
292 | sync operations. The address_space should start I/O against at least | 285 | sync operations. The address_space should start I/O against at least |
293 | *nr_to_write pages. *nr_to_write must be decremented for each page which is | 286 | *nr_to_write pages. *nr_to_write must be decremented for each page which is |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index c61a223ef3ff..d4e07c00e18e 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -534,9 +534,7 @@ __sync_single_inode) to check if ->writepages has been successful in | |||
534 | writing out the whole address_space. | 534 | writing out the whole address_space. |
535 | 535 | ||
536 | The Writeback tag is used by filemap*wait* and sync_page* functions, | 536 | The Writeback tag is used by filemap*wait* and sync_page* functions, |
537 | via filemap_fdatawait_range, to wait for all writeback to | 537 | via filemap_fdatawait_range, to wait for all writeback to complete. |
538 | complete. While waiting ->sync_page (if defined) will be called on | ||
539 | each page that is found to require writeback. | ||
540 | 538 | ||
541 | An address_space handler may attach extra information to a page, | 539 | An address_space handler may attach extra information to a page, |
542 | typically using the 'private' field in the 'struct page'. If such | 540 | typically using the 'private' field in the 'struct page'. If such |
@@ -554,8 +552,8 @@ address_space has finer control of write sizes. | |||
554 | 552 | ||
555 | The read process essentially only requires 'readpage'. The write | 553 | The read process essentially only requires 'readpage'. The write |
556 | process is more complicated and uses write_begin/write_end or | 554 | process is more complicated and uses write_begin/write_end or |
557 | set_page_dirty to write data into the address_space, and writepage, | 555 | set_page_dirty to write data into the address_space, and writepage |
558 | sync_page, and writepages to writeback data to storage. | 556 | and writepages to writeback data to storage. |
559 | 557 | ||
560 | Adding and removing pages to/from an address_space is protected by the | 558 | Adding and removing pages to/from an address_space is protected by the |
561 | inode's i_mutex. | 559 | inode's i_mutex. |
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c index 2e4e834d1a98..22dce16a8db9 100644 --- a/fs/isofs/compress.c +++ b/fs/isofs/compress.c | |||
@@ -361,7 +361,6 @@ static int zisofs_readpage(struct file *file, struct page *page) | |||
361 | 361 | ||
362 | const struct address_space_operations zisofs_aops = { | 362 | const struct address_space_operations zisofs_aops = { |
363 | .readpage = zisofs_readpage, | 363 | .readpage = zisofs_readpage, |
364 | /* No sync_page operation supported? */ | ||
365 | /* No bmap operation supported */ | 364 | /* No bmap operation supported */ |
366 | }; | 365 | }; |
367 | 366 | ||
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index f40972d6df90..e01287c964a8 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
@@ -1854,7 +1854,7 @@ int ntfs_read_inode_mount(struct inode *vi) | |||
1854 | /* Need this to sanity check attribute list references to $MFT. */ | 1854 | /* Need this to sanity check attribute list references to $MFT. */ |
1855 | vi->i_generation = ni->seq_no = le16_to_cpu(m->sequence_number); | 1855 | vi->i_generation = ni->seq_no = le16_to_cpu(m->sequence_number); |
1856 | 1856 | ||
1857 | /* Provides readpage() and sync_page() for map_mft_record(). */ | 1857 | /* Provides readpage() for map_mft_record(). */ |
1858 | vi->i_mapping->a_ops = &ntfs_mst_aops; | 1858 | vi->i_mapping->a_ops = &ntfs_mst_aops; |
1859 | 1859 | ||
1860 | ctx = ntfs_attr_get_search_ctx(ni, m); | 1860 | ctx = ntfs_attr_get_search_ctx(ni, m); |