]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
loop: loop_thread needs to set the PF_LESS_THROTTLE flag
authorDave Kleikamp <dave.kleikamp@oracle.com>
Tue, 24 Apr 2012 22:43:47 +0000 (17:43 -0500)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Tue, 24 Apr 2012 22:43:47 +0000 (17:43 -0500)
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 <dave.kleikamp@oracle.com>
drivers/block/loop.c

index d22ddcd696304361127a1487705d4b59818bc3a9..0198e259cfdb7f00b9dfbd2e159541ff5b6e72c8 100644 (file)
@@ -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)) {