Re: [PATCH v5 04/12] f2fs: cache: introduce writeback thread

From: Chao Yu

Date: Wed Sep 02 2026 - 08:24:49 EST


Wenjie,

Thanks for the review, I've fixed all issues in 04/12 and 09/12 patch in
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=feature/cache,

please take a look.

On 9/2/26 19:56, Wenjie Qi wrote:
> Hi Chao,
>
>> static int f2fs_cache_writeback_kthread(void *data)
>> {
>> unsigned int interval = cache_thread->cache_wb_interval;
>> }
>
> and startup initializes the field after `kthread_run()`:
>
>> task = kthread_run(f2fs_cache_writeback_kthread, sbi, "%s", name);
>> if (IS_ERR(task))
>> return PTR_ERR(task);
>>
>> cache_thread->cache_wb_task = task;
>> cache_thread->cache_wb_interval = DEF_DIRTY_CACHE_TIMEOUT;
>
> `kthread_run()` wakes the new thread before returning, while
> `cache_wb_interval` is initially zero. The worker copies the field only
> once, and the sysfs store later updates the field rather than the local
> `interval`.
>
> Can the worker observe zero at startup, and can a later
> `cache_wb_interval` write change the interval used by that worker?