Re: [PATCH v5 2/3] writeback: let foreign flushes reach dying cgwbs
From: Tejun Heo
Date: Fri Oct 02 2026 - 15:21:29 EST
Hello, Liz.
On Thu, Oct 01, 2026 at 11:50:20PM +0000, Liz Fong-Jones wrote:
> + * The wb may have been killed and its blkcg association may be stale. This
> + * is what foreign flushes want: they target the wb that owns the dirty
> + * inodes, which can be a killed one. Use wb_get_create() to get a wb to
> + * attach inodes to.
The next patch attaches inodes to what this returns. Maybe just say that it
returns the wb in @memcg_css's slot, killed or not?
> + * This function uses css_get() on @memcg_css and thus expects its refcnt
> + * to be positive on invocation. IOW, rcu_read_lock() protection on
> + * @memcg_css isn't enough. try_get it before calling this function.
This describes cgwb_create(), so wb_get_create() is where it belongs.
The struct bdi_writeback comment in backing-dev-defs.h and wb_dying()'s
still describe the old lifetime rule. Can you update them too?
Acked-by: Tejun Heo <tj@xxxxxxxxxx>
Thanks.
--
tejun