Re: [PATCH 09/13] f2fs: add support in f2fs to handle multiple writeback contexts

Christoph Hellwig
2025-06-02T14:20:23Z

> } else if (type == DIRTY_DENTS) {
> - if (sbi->sb->s_bdi->wb_ctx_arr[0]->wb.dirty_exceeded)
> - return false;
> + for_each_bdi_wb_ctx(sbi->sb->s_bdi, bdi_wb_ctx)
> + if (bdi_wb_ctx->wb.dirty_exceeded)
> + return false;

I think we need to figure out what the dirty_exceeded here and in
the other places in f2fs and gfs2 is trying to do and factor that into
well-documented core helpers instead of adding these loops in places
that should not really poke into writeback internals.