> I think xarray here is overkill. I'd just make this a plain array: > > struct bdi_writeback_ctx **bdi_wb_ctx_arr; > > which will get allocated with nr_wb_ctx entries during bdi_init(). Also I'd > make default_ctx just be entry at index 0 in this array. I'm undecided > whether it will be clearer to just drop default_ctx altogether or keep it > and set: > > struct bdi_writeback_ctx *default_ctx = bdi_wb_ctx_arr[0]; > > on init so I'll leave that up to you. Killing default_ctx completely seems like a better choice here. This allows us to unconditionally use the for_each_bdi_wb_ctx loop, even for the existing single writeback case, by simply relying on bdi_wb_ctx[0]. It also eliminates the need for is_parallel, simplifying the design. Thanks for the detailed review, Jan! Your suggestions look good to me and help streamline the plumbing. I'll incorporate them in the next version. Thanks, Anuj Gupta