[lkml]   [2011]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[068/102] mm/backing-dev.c: reset bdi min_ratio in bdi_unregister()
3.0-stable review patch.  If anyone has any objections, please let us know.


From: Peter Zijlstra <>

commit ccb6108f5b0b541d3eb332c3a73e645c0f84278e upstream.

Vito said:

: The system has many usb disks coming and going day to day, with their
: respective bdi's having min_ratio set to 1 when inserted. It works for
: some time until eventually min_ratio can no longer be set, even when the
: active set of bdi's seen in /sys/class/bdi/*/min_ratio doesn't add up to
: anywhere near 100.
: This then leads to an unrelated starvation problem caused by write-heavy
: fuse mounts being used atop the usb disks, a problem the min_ratio setting
: at the underlying devices bdi effectively prevents.

Fix this leakage by resetting the bdi min_ratio when unregistering the

Signed-off-by: Peter Zijlstra <>
Reported-by: Vito Caputo <>
Cc: Wu Fengguang <>
Cc: Miklos Szeredi <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Greg Kroah-Hartman <>

mm/backing-dev.c | 1 +
1 file changed, 1 insertion(+)

--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -606,6 +606,7 @@ static void bdi_prune_sb(struct backing_
void bdi_unregister(struct backing_dev_info *bdi)
if (bdi->dev) {
+ bdi_set_min_ratio(bdi, 0);

 \ /
  Last update: 2011-08-04 01:43    [W:0.222 / U:11.644 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site