Skip to content

Commit b844048

Browse files
Matthew Wilcox (Oracle)Andreas Gruenbacher
authored andcommitted
gfs2: Add a migrate_folio operation for journalled files
For journalled data, folio migration currently works by writing the folio back, freeing the folio and faulting the new folio back in. We can bypass that by telling the migration code to migrate the buffer_heads attached to our folios. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 75377ae commit b844048

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/gfs2/aops.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ static int gfs2_write_jdata_folio(struct folio *folio,
116116
* @folio: The folio to write
117117
* @wbc: The writeback control
118118
*
119-
* This is shared between writepage and writepages and implements the
120-
* core of the writepage operation. If a transaction is required then
119+
* Implements the core of write back. If a transaction is required then
121120
* the checked flag will have been set and the transaction will have
122121
* already been started before this is called.
123122
*/
@@ -755,6 +754,7 @@ static const struct address_space_operations gfs2_jdata_aops = {
755754
.readahead = gfs2_readahead,
756755
.dirty_folio = jdata_dirty_folio,
757756
.bmap = gfs2_bmap,
757+
.migrate_folio = buffer_migrate_folio,
758758
.invalidate_folio = gfs2_invalidate_folio,
759759
.release_folio = gfs2_release_folio,
760760
.is_partially_uptodate = block_is_partially_uptodate,

0 commit comments

Comments
 (0)