Skip to content

Commit 9579559

Browse files
Matthew Wilcox (Oracle)smb49
authored andcommitted
9p: Add a migrate_folio method
BugLink: https://bugs.launchpad.net/bugs/2119603 commit 03ddd7725ed1b39cf9251e1a420559f25dac49b3 upstream. The migration code used to be able to migrate dirty 9p folios by writing them back using writepage. When the writepage method was removed, we neglected to add a migrate_folio method, which means that dirty 9p folios have been unmovable ever since. This reduced our success at defragmenting memory on machines which use 9p heavily. Fixes: 80105ed (9p: Use netfslib read/write_iter) Cc: stable@vger.kernel.org Cc: David Howells <dhowells@redhat.com> Cc: v9fs@lists.linux.dev Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Link: https://lore.kernel.org/r/20250402150005.2309458-2-willy@infradead.org Acked-by: Dominique Martinet <asmadeus@codewreck.org> Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
1 parent d4317c3 commit 9579559

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/9p/vfs_addr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,5 @@ const struct address_space_operations v9fs_addr_operations = {
164164
.invalidate_folio = netfs_invalidate_folio,
165165
.direct_IO = noop_direct_IO,
166166
.writepages = netfs_writepages,
167+
.migrate_folio = filemap_migrate_folio,
167168
};

0 commit comments

Comments
 (0)