Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbcDREZH (ORCPT ); Mon, 18 Apr 2016 00:25:07 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:2015 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733AbcDREZB (ORCPT ); Mon, 18 Apr 2016 00:25:01 -0400 From: Jens Axboe To: , , CC: , , Jens Axboe Subject: [PATCH 3/8] writeback: use WRITE_BG for kupdate and background writeback Date: Sun, 17 Apr 2016 23:24:42 -0500 Message-ID: <1460953487-3430-4-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.8.0.rc4.6.g7e4ba36 In-Reply-To: <1460953487-3430-1-git-send-email-axboe@fb.com> References: <1460953487-3430-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-04-18_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 639 Lines: 23 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 aa66fa05ff0d..6e4a35acaa3e 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -104,6 +104,8 @@ static inline int wbc_to_write_cmd(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.8.0.rc4.6.g7e4ba36