Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755798AbcCWP0S (ORCPT ); Wed, 23 Mar 2016 11:26:18 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:42607 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754284AbcCWP0N (ORCPT ); Wed, 23 Mar 2016 11:26:13 -0400 From: Jens Axboe To: , , CC: Jens Axboe Subject: [PATCH 3/8] writeback: use WRITE_SYNC for reclaim or sync writeback Date: Wed, 23 Mar 2016 09:25:45 -0600 Message-ID: <1458746750-9213-4-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.4.1.168.g1ea28e1 In-Reply-To: <1458746750-9213-1-git-send-email-axboe@fb.com> References: <1458746750-9213-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-03-23_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 695 Lines: 23 If we're doing reclaim or sync IO, use WRITE_SYNC to inform the lower levels of the importance of this IO. Signed-off-by: Jens Axboe --- include/linux/writeback.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 719c255e105a..b2c75b8901da 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -102,7 +102,7 @@ struct writeback_control { static inline int wbc_to_write(struct writeback_control *wbc) { - if (wbc->sync_mode == WB_SYNC_ALL) + if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_reclaim || wbc->for_sync) return WRITE_SYNC; return WRITE; -- 2.4.1.168.g1ea28e1