@@ -716,9 +716,8 @@ page lookup by address, and keeping track of pages tagged as Dirty or
716
716
Writeback.
717
717
718
718
The first can be used independently to the others. The VM can try to
719
- either write dirty pages in order to clean them, or release clean pages
720
- in order to reuse them. To do this it can call the ->writepage method
721
- on dirty pages, and ->release_folio on clean folios with the private
719
+ release clean pages in order to reuse them. To do this it can call
720
+ ->release_folio on clean folios with the private
722
721
flag set. Clean pages without PagePrivate and with no external references
723
722
will be released without notice being given to the address_space.
724
723
@@ -731,8 +730,8 @@ maintains information about the PG_Dirty and PG_Writeback status of each
731
730
page, so that pages with either of these flags can be found quickly.
732
731
733
732
The Dirty tag is primarily used by mpage_writepages - the default
734
- ->writepages method. It uses the tag to find dirty pages to call
735
- ->writepage on . If mpage_writepages is not used (i.e. the address
733
+ ->writepages method. It uses the tag to find dirty pages to
734
+ write back . If mpage_writepages is not used (i.e. the address
736
735
provides its own ->writepages) , the PAGECACHE_TAG_DIRTY tag is almost
737
736
unused. write_inode_now and sync_inode do use it (through
738
737
__sync_single_inode) to check if ->writepages has been successful in
@@ -756,23 +755,23 @@ pages, however the address_space has finer control of write sizes.
756
755
757
756
The read process essentially only requires 'read_folio'. The write
758
757
process is more complicated and uses write_begin/write_end or
759
- dirty_folio to write data into the address_space, and writepage and
758
+ dirty_folio to write data into the address_space, and
760
759
writepages to writeback data to storage.
761
760
762
761
Adding and removing pages to/from an address_space is protected by the
763
762
inode's i_mutex.
764
763
765
764
When data is written to a page, the PG_Dirty flag should be set. It
766
- typically remains set until writepage asks for it to be written. This
765
+ typically remains set until writepages asks for it to be written. This
767
766
should clear PG_Dirty and set PG_Writeback. It can be actually written
768
767
at any point after PG_Dirty is clear. Once it is known to be safe,
769
768
PG_Writeback is cleared.
770
769
771
770
Writeback makes use of a writeback_control structure to direct the
772
- operations. This gives the writepage and writepages operations some
771
+ operations. This gives the writepages operation some
773
772
information about the nature of and reason for the writeback request,
774
773
and the constraints under which it is being done. It is also used to
775
- return information back to the caller about the result of a writepage or
774
+ return information back to the caller about the result of a
776
775
writepages request.
777
776
778
777
@@ -819,7 +818,6 @@ cache in your filesystem. The following members are defined:
819
818
.. code-block :: c
820
819
821
820
struct address_space_operations {
822
- int (*writepage)(struct page *page, struct writeback_control *wbc);
823
821
int (*read_folio)(struct file *, struct folio *);
824
822
int (*writepages)(struct address_space *, struct writeback_control *);
825
823
bool (*dirty_folio)(struct address_space *, struct folio *);
@@ -848,25 +846,6 @@ cache in your filesystem. The following members are defined:
848
846
int (*swap_rw)(struct kiocb *iocb, struct iov_iter *iter);
849
847
};
850
848
851
- ``writepage ``
852
- called by the VM to write a dirty page to backing store. This
853
- may happen for data integrity reasons (i.e. 'sync'), or to free
854
- up memory (flush). The difference can be seen in
855
- wbc->sync_mode. The PG_Dirty flag has been cleared and
856
- PageLocked is true. writepage should start writeout, should set
857
- PG_Writeback, and should make sure the page is unlocked, either
858
- synchronously or asynchronously when the write operation
859
- completes.
860
-
861
- If wbc->sync_mode is WB_SYNC_NONE, ->writepage doesn't have to
862
- try too hard if there are problems, and may choose to write out
863
- other pages from the mapping if that is easier (e.g. due to
864
- internal dependencies). If it chooses not to start writeout, it
865
- should return AOP_WRITEPAGE_ACTIVATE so that the VM will not
866
- keep calling ->writepage on that page.
867
-
868
- See the file "Locking" for more details.
869
-
870
849
``read_folio ``
871
850
Called by the page cache to read a folio from the backing store.
872
851
The 'file' argument supplies authentication information to network
@@ -909,7 +888,7 @@ cache in your filesystem. The following members are defined:
909
888
given and that many pages should be written if possible. If no
910
889
->writepages is given, then mpage_writepages is used instead.
911
890
This will choose pages from the address space that are tagged as
912
- DIRTY and will pass them to ->writepage .
891
+ DIRTY and will write them back .
913
892
914
893
``dirty_folio ``
915
894
called by the VM to mark a folio as dirty. This is particularly
0 commit comments