From patchwork Tue Apr 12 18:43:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 8814471 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1AAA5C0554 for ; Tue, 12 Apr 2016 18:44:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50B8620361 for ; Tue, 12 Apr 2016 18:44:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BC512034C for ; Tue, 12 Apr 2016 18:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965491AbcDLSoI (ORCPT ); Tue, 12 Apr 2016 14:44:08 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:52294 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965405AbcDLSoE (ORCPT ); Tue, 12 Apr 2016 14:44:04 -0400 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u3CIfof4014836; Tue, 12 Apr 2016 11:44:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=/GuIAlgtZtKXHaqdQpJRgIazu4t4zDVD8ZqzeQ6Mo3g=; b=IGe1MFBEzGZuStyPoQgQ0pyVOtCLixFLHenX5rqrsaHapwpeVPc9qNTk4md0kGws9xsZ 3tii5en9Eu8vUvLTmjDgM95m1q2hXhCrn7UTsCSEda04V+POyQL4Vj6DxzOjwyvJWf72 01KV9Eh0knT62vEUcOabMyHX0+wv+24o9Pw= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2290kh1p3f-2 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NOT); Tue, 12 Apr 2016 11:44:02 -0700 Received: from localhost.localdomain (192.168.54.13) by mail.thefacebook.com (192.168.16.16) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Apr 2016 11:44:00 -0700 From: Jens Axboe To: , CC: , Jens Axboe Subject: [PATCH 3/3] writeback: use WRITE_SYNC for reclaim or sync writeback Date: Tue, 12 Apr 2016 12:43:53 -0600 Message-ID: <1460486633-26099-4-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.8.0.rc4.6.g7e4ba36 In-Reply-To: <1460486633-26099-1-git-send-email-axboe@fb.com> References: <1460486633-26099-1-git-send-email-axboe@fb.com> MIME-Version: 1.0 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-12_09:, , signatures=0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;