From patchwork Mon Jan 28 13:14:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 10783679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 541F31390 for ; Mon, 28 Jan 2019 13:15:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 442092A82A for ; Mon, 28 Jan 2019 13:15:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3846E2AA57; Mon, 28 Jan 2019 13:15:13 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 D939D2A82A for ; Mon, 28 Jan 2019 13:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbfA1NPM (ORCPT ); Mon, 28 Jan 2019 08:15:12 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:31555 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726647AbfA1NPM (ORCPT ); Mon, 28 Jan 2019 08:15:12 -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=1548681312; x=1580217312; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0oktnb5c+ZxGU/792H6YJ1FgxEgeE8jHcYYjYH+9ZnY=; b=Yz0wapKjrbax2KKCuS8iPVIeNZrRozhXKSnDcWEF0hNW5W1WSBi2Vy7P MCcqwWzZpHjPkmpAGeQjAZaqguyZ7qQSfBcCEwO04p4YqHupcdYS+fOxO mRYUtOE4N0XrGrnat3zjxvgHVK5u7aXzb4t3gh1KL+oYMgIG0Sx1dRVBZ wzjHIeU2NFbzzVDrOssODwc2UlGv4nLW1nfY8BNLMK0Al5x5J4cOylkZ6 RivR2YP+Cofs/+hHcRgDE/1CtBRHDMdvWR5fsPRVqJUArEGzXMRi1JnCv XBs3ZnkGeoesghQIa57G9PJsQNPgMmrt0TMM5OiCjmDKsQBQ0Z6spDMSo A==; X-IronPort-AV: E=Sophos;i="5.56,534,1539619200"; d="scan'208";a="104898840" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2019 21:15:12 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 28 Jan 2019 04:54:15 -0800 Received: from shin_dev.dhcp.fujisawa.hgst.com (HELO shin_dev.fujisawa.hgst.com) ([10.149.52.166]) by uls-op-cesaip02.wdc.com with ESMTP; 28 Jan 2019 05:15:09 -0800 From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, Omar Sandoval , Masato Suzuki , Shinichiro Kawasaki Cc: Omar Sandoval , Jens Axboe , Matias Bjorling , Hannes Reinecke , Mike Snitzer , "Martin K . Petersen" , Damien Le Moal , Chaitanya Kulkarni Subject: [PATCH blktests v4 03/12] block/004: Adjust fio conditions for zoned block devices Date: Mon, 28 Jan 2019 22:14:46 +0900 Message-Id: <20190128131455.31997-4-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190128131455.31997-1-shinichiro.kawasaki@wdc.com> References: <20190128131455.31997-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 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 For a random write pattern to a zoned block device, fio requires --direct=1 and --zonemode=zbd options as well as deadline I/O scheduler to be specified. Specify these options and set the I/O scheduler if the target device is a zoned block device. Before doing that, also make sure that the deadline scheduler is available and that fio supports the zbd zone mode. Set CAN_BE_ZONED flag to run this test case for zoned block devices. Signed-off-by: Shin'ichiro Kawasaki --- tests/block/004 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/block/004 b/tests/block/004 index 4c14c4b..d181725 100755 --- a/tests/block/004 +++ b/tests/block/004 @@ -8,18 +8,32 @@ DESCRIPTION="run lots of flushes" TIMED=1 +CAN_BE_ZONED=1 requires() { _have_fio } +device_requires() { + ! _test_dev_is_zoned || _have_fio_zbd_zonemode +} + test_device() { echo "Running ${TEST_NAME}" + local directio="" + local zbdmode="" + + if _test_dev_is_zoned; then + _test_dev_queue_set scheduler deadline + directio="--direct=1" + zbdmode="--zonemode=zbd" + fi + FIO_PERF_FIELDS=("write iops") _fio_perf --bs=4k --rw=randwrite --norandommap --fsync=1 \ --number_ios=256 --numjobs=64 --name=flushes \ - --filename="$TEST_DEV" + ${directio} ${zbdmode} --filename="$TEST_DEV" echo "Test complete" }