Thread (15 messages) 15 messages, 3 authors, 2016-09-01
STALE3592d

[PATCH 3/8] writeback: use WRITE_BG for kupdate and background writeback

From: Jens Axboe <axboe@fb.com>
Date: 2016-08-31 17:05:59
Also in: linux-fsdevel, lkml
Subsystem: page cache, the rest · Maintainers: Matthew Wilcox, Linus Torvalds

If we're doing background type writes, then use the appropriate
write command for that.

Signed-off-by: Jens Axboe <axboe@fb.com>
---
 include/linux/writeback.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index e1fc25172397..7fb80c78f159 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 WRITE;
 }
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help