mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
bdi: separate out congested state into a separate struct
Currently, a wb's (bdi_writeback) congestion state is carried in its ->state field; however, cgroup writeback support will require multiple wb's sharing the same congestion state. This patch separates out congestion state into its own struct - struct bdi_writeback_congested. A new field wb field, wb_congested, points to its associated congested struct. The default wb, bdi->wb, always points to bdi->wb_congested. While this patch adds a layer of indirection, it doesn't introduce any behavior changes. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
8395cd9f81
commit
4aa9c692e0
3 changed files with 18 additions and 5 deletions
|
@ -167,7 +167,7 @@ static inline int bdi_congested(struct backing_dev_info *bdi, int bdi_bits)
|
|||
{
|
||||
if (bdi->congested_fn)
|
||||
return bdi->congested_fn(bdi->congested_data, bdi_bits);
|
||||
return (bdi->wb.state & bdi_bits);
|
||||
return (bdi->wb.congested->state & bdi_bits);
|
||||
}
|
||||
|
||||
static inline int bdi_read_congested(struct backing_dev_info *bdi)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue