https://bugzilla.kernel.org/show_bug.cgi?id=200951

--- Comment #11 from Chao Yu (c...@kernel.org) ---
Actually, the problem here is during mount(),  both blk_queue_discard(q) and
f2fs_sb_has_blkzoned(sbi) return false, so f2fs will skip allocating memory for
se->discard_map.

static inline bool f2fs_discard_en(struct f2fs_sb_info *sbi)
{
        struct request_queue *q = bdev_get_queue(sbi->sb->s_bdev);

        return blk_queue_discard(q) || f2fs_sb_has_blkzoned(sbi);
}

[    4.372580] f2fs_discard_en(1):0
[    4.498957] f2fs_discard_en(2):0

But later, during update_sit_entiry(), f2fs_discard_en() return true, then it
will cause f2fs to update se->discard_map bitmap, result in panic.

[   56.939547] f2fs_discard_en(3):1 new_blkaddr:0xFFFF00000AB0383C
[   56.945027] f2fs_discard_en(5):1 se:0xFFFF8000ED285ED8


Is there any interface we can turn on discard of device in real time?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to