From patchwork Wed Feb 28 19:28:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10249459 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F4E660211 for ; Wed, 28 Feb 2018 19:28:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A5C328E63 for ; Wed, 28 Feb 2018 19:28:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F69628E69; Wed, 28 Feb 2018 19:28:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8982D28D97 for ; Wed, 28 Feb 2018 19:28:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933516AbeB1T2c (ORCPT ); Wed, 28 Feb 2018 14:28:32 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:1215 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933510AbeB1T20 (ORCPT ); Wed, 28 Feb 2018 14:28:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1519846107; x=1551382107; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=wNqauiBY1lkhblCyG9R3A+BLSZaC5vb/CISFDsQVO4k=; b=gpI0HVW7+LB3z7GIEOVqis19mfDnIFkbiNjzN52Uv9xxhPCmEuwPFGJO l5+VmHFgZl6MeTfNW9S5phc6Q0t67HSCzOOEGkTyyfM5GiIuodP7zCmRP dHZg9AOfHZMqf7SxPFipc1FBkNeWCBoTCxeag7xppNPnjI3wpB26DXjoH CFEsuZjdhAxWSGAR/XO/iLJvQDbp4V5NUTJrSBEOyASk8JmIfIDYwAL3V C4idgyoar7DgOtYlqMuwYX6BO/xxN4w5uqFpvlyDHlYcelRic7HlKCsSQ OfwL84J/EdCleZNIjkposeSFmEjb1K20r/Q4l0qDDD+D5NyDypzWA43B2 w==; X-IronPort-AV: E=Sophos;i="5.47,406,1515427200"; d="scan'208";a="73137000" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 01 Mar 2018 03:28:26 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 28 Feb 2018 11:22:30 -0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO thinkpad-bart.int.fusionio.com) ([10.11.171.236]) by uls-op-cesaip01.wdc.com with ESMTP; 28 Feb 2018 11:28:25 -0800 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Michael Lyle , Kent Overstreet , Hannes Reinecke , Johannes Thumshirn , Ming Lei Subject: [PATCH 06/11] bcache: Use the blk_queue_flag_{set, clear}() functions Date: Wed, 28 Feb 2018 11:28:18 -0800 Message-Id: <20180228192823.5191-7-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180228192823.5191-1-bart.vanassche@wdc.com> References: <20180228192823.5191-1-bart.vanassche@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the blk_queue_flag_{set,clear}() functions instead of open-coding these. Signed-off-by: Bart Van Assche Cc: Michael Lyle Cc: Kent Overstreet Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen --- drivers/md/bcache/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 312895788036..047e30cb93dc 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -833,9 +833,9 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size, q->limits.io_min = block_size; q->limits.logical_block_size = block_size; q->limits.physical_block_size = block_size; - set_bit(QUEUE_FLAG_NONROT, &d->disk->queue->queue_flags); - clear_bit(QUEUE_FLAG_ADD_RANDOM, &d->disk->queue->queue_flags); - set_bit(QUEUE_FLAG_DISCARD, &d->disk->queue->queue_flags); + blk_queue_flag_set(QUEUE_FLAG_NONROT, d->disk->queue); + blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, d->disk->queue); + blk_queue_flag_set(QUEUE_FLAG_DISCARD, d->disk->queue); blk_queue_write_cache(q, true, true);