Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754722AbcKAVJM (ORCPT ); Tue, 1 Nov 2016 17:09:12 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:49287 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754336AbcKAVJJ (ORCPT ); Tue, 1 Nov 2016 17:09:09 -0400 From: Jens Axboe To: , , , CC: , , Jens Axboe Subject: [PATCH 3/8] writeback: mark background writeback as such Date: Tue, 1 Nov 2016 15:08:46 -0600 Message-ID: <1478034531-28559-4-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478034531-28559-1-git-send-email-axboe@fb.com> References: <1478034531-28559-1-git-send-email-axboe@fb.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-01_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 635 Lines: 23 If we're doing background type writes, then use the appropriate background write flags 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 50c96ee8108f..c78f9f0920b5 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -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; } -- 2.7.4