writeback: mark background writeback as such
authorJens Axboe <axboe@fb.com>
Tue, 1 Nov 2016 16:01:35 +0000 (10:01 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 2 Nov 2016 16:24:04 +0000 (10:24 -0600)
If we're doing background type writes, then use the appropriate
background write flags for that.

Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
include/linux/writeback.h

index 50c96ee8108f90ed527ec9f7c28abe32420b225a..c78f9f0920b51b61bc8d954438e02eca5b4a6513 100644 (file)
@@ -107,6 +107,8 @@ static inline int wbc_to_write_flags(struct writeback_control *wbc)
 {
        if (wbc->sync_mode == WB_SYNC_ALL)
                return REQ_SYNC;
+       else if (wbc->for_kupdate || wbc->for_background)
+               return REQ_BACKGROUND;
 
        return 0;
 }