From patchwork Tue Apr 12 18:36:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 8814321 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7B58E9FD6F for ; Tue, 12 Apr 2016 18:36:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B422A201C8 for ; Tue, 12 Apr 2016 18:36:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E338620374 for ; Tue, 12 Apr 2016 18:36:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934185AbcDLSgi (ORCPT ); Tue, 12 Apr 2016 14:36:38 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:49931 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934125AbcDLSgh (ORCPT ); Tue, 12 Apr 2016 14:36:37 -0400 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u3CITmfP007663; Tue, 12 Apr 2016 11:36:35 -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=oYlwx45gt1DXZBLJo9IfYEffF+lNdZQg5iTUlx14DSI=; b=FjmGjFCa7fb0JcPsZlbPLwlKa3j7bHzK4JJNo8pdtNYJ47wPyNUTWSK2MlyE+5+XlwsC qhKbnsLCr+2FKMCTQUA7bnhsviuY26tvW7qG2uqhqfRnCjyvWJ5c7k+VT5DsCTTvK+JT dIgplSaNg+i3vg4CTbXzdD8w25V350Qc7iI= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 228rbntwf1-5 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NOT); Tue, 12 Apr 2016 11:36:35 -0700 Received: from localhost.localdomain (192.168.54.13) by mail.thefacebook.com (192.168.16.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Apr 2016 11:36:23 -0700 From: Jens Axboe To: CC: , Jens Axboe Subject: [PATCH 07/20] nbd: switch to using blk_queue_write_cache() Date: Tue, 12 Apr 2016 12:36:02 -0600 Message-ID: <1460486175-25724-8-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.8.0.rc4.6.g7e4ba36 In-Reply-To: <1460486175-25724-1-git-send-email-axboe@fb.com> References: <1460486175-25724-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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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 Signed-off-by: Jens Axboe --- drivers/block/nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 08afbc7a2bb8..31e73a7a40f2 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -693,9 +693,9 @@ static void nbd_parse_flags(struct nbd_device *nbd, struct block_device *bdev) if (nbd->flags & NBD_FLAG_SEND_TRIM) queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, nbd->disk->queue); if (nbd->flags & NBD_FLAG_SEND_FLUSH) - blk_queue_flush(nbd->disk->queue, REQ_FLUSH); + blk_queue_write_cache(nbd->disk->queue, true, false); else - blk_queue_flush(nbd->disk->queue, 0); + blk_queue_write_cache(nbd->disk->queue, false, false); } static int nbd_dev_dbg_init(struct nbd_device *nbd);