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>
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)) {