Re: [PATCH v2] btrfs: trigger cow fixup via dirty_folio()
Qu Wenruo <[email protected]> Mon, 27 Jul 2026 18:57:12 +0930
| Newsgroups | org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <[email protected]> |
在 2026/7/27 18:08, Qu Wenruo 写道:
[...]
>> +again:
>> + folio_lock(folio);
>> +
>> + if (!folio->mapping || !folio_test_fixup_pending(folio))
>> + goto out;
>> + if (ret)
>> + goto out_error;
>> +
>> + btrfs_lock_extent(&inode->io_tree, page_start, page_end,
>> &cached_state);
>> +
>> + for (bit = 0; bit < blocks_per_folio; bit++) {
>> + struct btrfs_ordered_extent *ordered;
>> + const u64 start = page_start + (bit << fs_info-
>> >sectorsize_bits);
>> +
>> + if (test_bit(bit, delalloc_bitmap))
>
> Dead check. It's always false, as the delalloc_bitmap is initialized to
> all zero.
I'm an idiot, we can retry from again label, so this is the correct way
to handle it.
Please ignore this one.
Thanks,
Qu