https://bugzilla.kernel.org/show_bug.cgi?id=220575
--- Comment #11 from Chao Yu ([email protected]) --- (In reply to JY from comment #8) > OK, I will try it. > > At the last experiment, I used the newly added '_private' to record non-null > value and dump it when fscrypt_is_bounce_page(page) is true. > > + pr_crit("bounced_page:0xpx, pp:0x%px, > fscrypt_pagecache_page(page):0x%px\n", page, page->_private, > fscrypt_pagecache_page(page)); > > The result is : > bounced_page:0xfffffffe82282290, pp:0x0000000000000000, > fscrypt_pagecache_page(page):0x0000000000000000 > (pp is page->_private) > > I think the 'pp:0x0000000000000000' proves this page is not a bounce_page. > Am I misunderstanding? :( Can you please try below diff? --- fs/f2fs/data.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 1b0050b8421d..13bde4a2f40d 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -884,6 +884,15 @@ void f2fs_submit_merged_ipu_write(struct f2fs_sb_info *sbi, } } +#define sanity_check_page(sbi, enc_page, page) \ + do { \ + if (page && !page->private) { \ + dump_page(enc_page, "dump enc_page"); \ + dump_page(page, "dump data page"); \ + BUG_ON(1); \ + } \ + } while (0) + int f2fs_merge_page_bio(struct f2fs_io_info *fio) { struct bio *bio = *fio->bio; @@ -896,9 +905,13 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio) trace_f2fs_submit_page_bio(page, fio); + sanity_check_page(fio->sbi, fio->encrypted_page, fio->page); + if (bio && !page_is_mergeable(fio->sbi, bio, *fio->last_block, fio->new_blkaddr)) f2fs_submit_merged_ipu_write(fio->sbi, &bio, NULL); + + sanity_check_page(fio->sbi, fio->encrypted_page, fio->page); alloc_new: if (!bio) { bio = __bio_alloc(fio, BIO_MAX_VECS); @@ -906,15 +919,19 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio) page_folio(fio->page)->index, fio, GFP_NOIO); add_bio_entry(fio->sbi, bio, page, fio->temp); + sanity_check_page(fio->sbi, fio->encrypted_page, fio->page); } else { if (add_ipu_page(fio, &bio, page)) goto alloc_new; + sanity_check_page(fio->sbi, fio->encrypted_page, fio->page); } if (fio->io_wbc) wbc_account_cgroup_owner(fio->io_wbc, page_folio(fio->page), PAGE_SIZE); + sanity_check_page(fio->sbi, fio->encrypted_page, fio->page); + inc_page_count(fio->sbi, WB_DATA_TYPE(page, false)); *fio->last_block = fio->new_blkaddr; -- 2.40.1 -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
