From 0e4e6dcf8e724f78b1452fa3a26d08202cfa575c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 14 Apr 2016 09:53:24 -0600 Subject: [PATCH 03/80] writeback: use WRITE_BG for kupdate and background writeback If we're doing background type writes, then use the appropriate write command for that. Signed-off-by: Jens Axboe --- include/linux/writeback.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 608afd3..e53abf2 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -104,6 +104,8 @@ static inline int wbc_to_write_flags(struct writeback_control *wbc) { if (wbc->sync_mode == WB_SYNC_ALL) return WRITE_SYNC; + else if (wbc->for_kupdate || wbc->for_background) + return WRITE_BG; return 0; } -- 2.7.4