Re: [PATCH v2 07/12] f2fs: cache: use node cache

From: Chao Yu

Date: Tue Aug 25 2026 - 02:40:27 EST


On 8/25/26 13:43, Wenjie Qi wrote:
Hi Chao,

if (!f2fs_clear_cache_dirty(entry))
goto continue_unlock;

if (!__write_node_cache(entry, ...))
...

and in `__write_node_cache()`:

if (unlikely(ni.blk_addr == NULL_ADDR)) {
f2fs_cache_clear_uptodate(entry);
dec_page_count(sbi, F2FS_DIRTY_NODES);
...
return true;
}

`f2fs_clear_cache_dirty()` clears the entry state bit but leaves the DIRTY
radix tag for the writeback transition. The `NULL_ADDR` return does not reach
that transition, while it clears UPTODATE and decrements the dirty-node count.

What clears the DIRTY radix tag when this already-truncated path returns?

Hmm, Actually, I don't change the logic here, just change the API, I can take
a look original logic a bit later.

Thanks,