diff mbox series

[04/15] ceph: Add a migrate_folio method

Message ID 20230825201225.348148-5-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Many folio conversions for ceph | expand

Commit Message

Matthew Wilcox Aug. 25, 2023, 8:12 p.m. UTC
The ceph_snap_context is independent of the address of the data, so we
can implement folio migration by just removing the ceph_snap_context
from the existing folio and attach it to the new one, which is exactly
what filemap_migrate_folio() does.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/ceph/addr.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 7c7dfcd63cd1..a0a1fac1a0db 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1563,6 +1563,7 @@  const struct address_space_operations ceph_aops = {
 	.invalidate_folio = ceph_invalidate_folio,
 	.release_folio = ceph_release_folio,
 	.direct_IO = noop_direct_IO,
+	.migrate_folio = filemap_migrate_folio,
 };
 
 static void ceph_block_sigs(sigset_t *oldset)