Commit b17621fed6aa039387e35f9b4d34d98f213e5673

Authored by Wu Fengguang
Committed by Jens Axboe
1 parent 951c30d135

writeback: introduce wbc.for_background

It will lower the flush priority for NFS, and maybe more in future.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

Showing 3 changed files with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -738,6 +738,7 @@
738 738 .sync_mode = args->sync_mode,
739 739 .older_than_this = NULL,
740 740 .for_kupdate = args->for_kupdate,
  741 + .for_background = args->for_background,
741 742 .range_cyclic = args->range_cyclic,
742 743 };
743 744 unsigned long oldest_jif;
... ... @@ -178,7 +178,7 @@
178 178 {
179 179 if (wbc->for_reclaim)
180 180 return FLUSH_HIGHPRI | FLUSH_STABLE;
181   - if (wbc->for_kupdate)
  181 + if (wbc->for_kupdate || wbc->for_background)
182 182 return FLUSH_LOWPRI;
183 183 return 0;
184 184 }
include/linux/writeback.h
... ... @@ -49,6 +49,7 @@
49 49 unsigned nonblocking:1; /* Don't get stuck on request queues */
50 50 unsigned encountered_congestion:1; /* An output: a queue is full */
51 51 unsigned for_kupdate:1; /* A kupdate writeback */
  52 + unsigned for_background:1; /* A background writeback */
52 53 unsigned for_reclaim:1; /* Invoked from the page allocator */
53 54 unsigned range_cyclic:1; /* range_start is cyclic */
54 55 unsigned more_io:1; /* more io to be dispatched */