* [PATCH RESEND] writeback: account BDI's min_ratio for unregistered device
@ 2015-09-08 15:53 Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2015-09-08 15:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Akinobu Mita, Tejun Heo, Jens Axboe
>From mm/page-writeback.c:
/*
* bdi_min_ratio keeps the sum of the minimum dirty shares of all
* registered backing devices, which, for obvious reasons, can not
* exceed 100%.
*/
static unsigned int bdi_min_ratio;
But when a backing device is unregistered, the BDI's min_ratio is not
subtracted from bdi_min_ratio. So the second attempt to set min_ratio
in the following commands will fail.
# modprobe null_blk
# echo 50 > /sys/block/nullb0/bdi/min_ratio
# modprobe -r null_blk
# modprobe null_blk
# echo 50 > /sys/block/nullb0/bdi/min_ratio
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
---
Resending with Tejun's ACK
mm/backing-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 885361b..ccf72be 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -849,6 +849,7 @@ void bdi_destroy(struct backing_dev_info *bdi)
}
wb_exit(&bdi->wb);
+ bdi_set_min_ratio(bdi, 0);
}
EXPORT_SYMBOL(bdi_destroy);
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-08 15:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-08 15:53 [PATCH RESEND] writeback: account BDI's min_ratio for unregistered device Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®