linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 0/2] JFS: Implement migrate_folio for jfs_metapage_aops
@ 2025-04-17  6:06 Shivank Garg
  2025-04-17  6:06 ` [PATCH V3 1/2] mm: export folio_expected_refs for JFS migration handler Shivank Garg
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Shivank Garg @ 2025-04-17  6:06 UTC (permalink / raw)
  To: shaggy, akpm
  Cc: willy, shivankg, david, wangkefeng.wang, jane.chu, ziy, donettom,
	apopple, jfs-discussion, linux-kernel, linux-mm,
	syzbot+8bb6fd945af4e0ad9299

This patch addresses a warning that occurs during memory compaction due
to JFS's missing migrate_folio operation. The warning was introduced by
commit 7ee3647 ("migrate: Remove call to ->writepage") which added
explicit warnings when filesystem don't implement migrate_folio.

The syzbot reported following [1]:
  jfs_metapage_aops does not implement migrate_folio
  WARNING: CPU: 1 PID: 5861 at mm/migrate.c:955 fallback_migrate_folio mm/migrate.c:953 [inline]
  WARNING: CPU: 1 PID: 5861 at mm/migrate.c:955 move_to_new_folio+0x70e/0x840 mm/migrate.c:1007
  Modules linked in:
  CPU: 1 UID: 0 PID: 5861 Comm: syz-executor280 Not tainted 6.15.0-rc1-next-20250411-syzkaller #0 PREEMPT(full) 
  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
  RIP: 0010:fallback_migrate_folio mm/migrate.c:953 [inline]
  RIP: 0010:move_to_new_folio+0x70e/0x840 mm/migrate.c:1007

This Implement metapage_migrate_folio which handles both single and multiple
metapages per page configurations.

[1]: https://syzkaller.appspot.com/bug?extid=8bb6fd945af4e0ad9299

V1/V2:
https://lore.kernel.org/all/20250413172356.561544-1-shivankg@amd.com

#syz test: https://github.com/AMDESE/linux-mm.git 07246f14ea

Best Regards,
Shivank

Shivank Garg (2):
  mm: export folio_expected_refs for JFS migration handler
  jfs: implement migrate_folio for jfs_metapage_aops

 fs/jfs/jfs_metapage.c   | 94 +++++++++++++++++++++++++++++++++++++++++
 include/linux/migrate.h |  1 +
 mm/migrate.c            |  3 +-
 3 files changed, 97 insertions(+), 1 deletion(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-04-22 11:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-17  6:06 [PATCH V3 0/2] JFS: Implement migrate_folio for jfs_metapage_aops Shivank Garg
2025-04-17  6:06 ` [PATCH V3 1/2] mm: export folio_expected_refs for JFS migration handler Shivank Garg
2025-04-17  8:40   ` David Hildenbrand
2025-04-22 11:28     ` Shivank Garg
2025-04-17  6:06 ` [PATCH V3 2/2] jfs: implement migrate_folio for jfs_metapage_aops Shivank Garg
2025-04-17  8:47 ` [syzbot] [mm?] WARNING in move_to_new_folio syzbot
2025-04-17  9:06   ` Shivank Garg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox