Re: [PATCH] jfs: implement migrate_folio for jfs_metapage_aops
From: Shivank Garg
Date: Mon Apr 14 2025 - 00:53:24 EST
On 4/14/2025 2:11 AM, Matthew Wilcox wrote:
> On Sun, Apr 13, 2025 at 05:23:57PM +0000, Shivank Garg wrote:
>> +++ b/fs/jfs/jfs_metapage.c
>> @@ -570,6 +570,7 @@ const struct address_space_operations jfs_metapage_aops = {
>> .release_folio = metapage_release_folio,
>> .invalidate_folio = metapage_invalidate_folio,
>> .dirty_folio = filemap_dirty_folio,
>> + .migrate_folio = filemap_migrate_folio,
>> };
>
> Ooh, damn, I think we're going to need more than this ;-(
>
> static inline struct metapage *folio_to_mp(struct folio *folio, int offset)
> {
> return folio->private;
> }
>
> struct metapage {
> ...
> void *data; /* Data pointer */
>
> So we're going to need something like buffer_migrate_folio(), but
> specialised to jfs metadata. And when we come up with it, that'll
> be Fixes: 35474d52c605
Thanks for the pointers. I missed the private data aspect earlier.
I think it's doable - IIUC, I'll need to
update mp->folio and mp->data to point to the dst folio info.
I'll work on a patch for it.
Best Regards,
Shivank