From: Dave Kleikamp Date: Tue, 24 Apr 2012 22:43:47 +0000 (-0500) Subject: loop: loop_thread needs to set the PF_LESS_THROTTLE flag X-Git-Tag: v2.6.39-400.9.0~426^2~7^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b67ffdd0b198da23a53ffb5a2f58b673cd9159eb;p=users%2Fjedix%2Flinux-maple.git loop: loop_thread needs to set the PF_LESS_THROTTLE flag The underlying file system may call balance_dirty_pages. We don't want it to throttle there since we may be in the process of writing dirty pages. This patch addresses the problem in the same manner as a local nfs mount, as nfsd does the same. Signed-off-by: Dave Kleikamp --- diff --git a/drivers/block/loop.c b/drivers/block/loop.c index d22ddcd69630..0198e259cfdb 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -623,6 +623,8 @@ static int loop_thread(void *data) struct loop_device *lo = data; struct bio *bio; + current->flags |= PF_LESS_THROTTLE; + set_user_nice(current, -20); while (!kthread_should_stop() || !bio_list_empty(&lo->lo_bio_list)) {