From patchwork Thu Oct 6 01:04:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 9363587 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 BE0226075E for ; Thu, 6 Oct 2016 01:07:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0AA828DA6 for ; Thu, 6 Oct 2016 01:07:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4C2A28DA9; Thu, 6 Oct 2016 01:07:03 +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 2B60A28DA6 for ; Thu, 6 Oct 2016 01:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754675AbcJFBHB (ORCPT ); Wed, 5 Oct 2016 21:07:01 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:42651 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752582AbcJFBG6 (ORCPT ); Wed, 5 Oct 2016 21:06:58 -0400 X-IronPort-AV: E=Sophos;i="5.31,451,1473091200"; d="scan'208";a="20799444" Received: from mail-sn1nam02lp0017.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.17]) by ob1.hgst.iphmx.com with ESMTP; 06 Oct 2016 09:05:10 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-hgst-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h0HBgEkFJ28PJZ7ZYXALTduJmLLJlbwZAOl7aTGMNDo=; b=nYVJvfi49l2khepaDzvyIE/S9diVWOywHeo2We9x3W9eUnh7fDSznbzhHJ2PsTp1E/4BgRbHOdpLygovO7VW2eDq5hLzsi/7vUDj6ERksHtl7FzpYiqbNVBSDA092wD2MhpbuMulAR7h86CkWtPHsC/I1E1uKkTAsWR/+/xikGU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@hgst.com; Received: from washi.fujisawa.hgst.com (199.255.47.8) by SN1PR04MB1983.namprd04.prod.outlook.com (10.166.69.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Thu, 6 Oct 2016 01:05:07 +0000 From: Damien Le Moal To: Jens Axboe CC: , , Christoph Hellwig , "Martin K . Petersen" , Hannes Reinecke , Shaun Tancheff , Damien Le Moal Subject: [PATCH v7 1/7] block: Add 'zoned' queue limit Date: Thu, 6 Oct 2016 10:04:46 +0900 Message-ID: <1475715892-18856-2-git-send-email-damien.lemoal@hgst.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475715892-18856-1-git-send-email-damien.lemoal@hgst.com> References: <1475715892-18856-1-git-send-email-damien.lemoal@hgst.com> MIME-Version: 1.0 X-Originating-IP: [199.255.47.8] X-ClientProxiedBy: SN1PR17CA0065.namprd17.prod.outlook.com (10.163.3.161) To SN1PR04MB1983.namprd04.prod.outlook.com (10.166.69.143) X-MS-Office365-Filtering-Correlation-Id: 794a9bd2-9bbd-4bc2-b188-08d3ed84d13a X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 2:64R6gxb225IHagKJXaWlo+QodDmiFRA1qFFu1GPPLSIlOl4ufYlOxaRfb3MCS3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+PTC/zpti0oSHvTiyLwoTFGQRHzWFfSHAV9vCqN/GEPgyWyeGSE8DVq0gpruusEBUBQdfOpVhL5Yv/79wkMvrew6RoWHVQ70jduOrhbS/bCdJB/OpTyWxjDcr1dxv4EaAVz4rRqm136FVcBYc8X5LNp8On+tSj3IexQiaiSvQm4GgCappZFaVAgD4Hfc+JlnAMPJb+R645clBfdGnh8uy+MY/JtzQ9ssQg/j56n+D0rdZ8Q+7H3tV+RL2h8W8lJD80EOjFtZO5MxbZSIyQmU8HQuSevU0fk+48FwfFyz93B8jWNvxvgMwLJwZKxRzG7f/y/S4BAgWkyLuDcjKwiHKkGZPoPFm6iXtQWEQdVpTZx11bWb0xoTuh/rSTV18AEtsF4PcZUxAmdgHLXKD9nPdkpLrETgB9zXE9tpLiNjfStGb8Sc3kvLptZOqSIeUD6z+n5NQNwiQXVFt3fKdAiR50p3Lv6qSCqC2H X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(79135771888625)(278428928389397)(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:SN1PR04MB1983; BCL:0; PCL:0; RULEID:; SRVR:SN1PR04MB1983; X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 4:puFnKEowW/tBjo3YaLBGN9ngQRuqKQCTUakz2D05aHCP0OalJpNHkUKXJZsYECRAgCf3QWMky4uzGUxyzKh5AIaTnHPUFWtBXaLh8xY31hs75PuiEeKhYmaZk3WbiJnvx3MFC4x7WgLuCZKAmzvl9uPWMIQ7/fHL70juC/vjC3tKyJ9N56N7pU/Ar2IpjkZIhbu6j64h5SJAIzWXczOttVp/qIQCzaYT7BoHkWyVPk1X7irwJG36fxn0m+x0KwAL9wJ+H2f3paB6A3tU63F4EaMkcWPT9vc1PGuaDP4empSYI+dGgLIuSyROO7hWfkX0RahJW93aH5ka3fAw2dOTR3VClE9fEJEsiQBhgggNdAYSFgamBF9knnSY/NunBatR3Vax16l5D5Pll7vEBhrH83WRSrWr4S5EkjccYUJAA8qsy8zJniWRB76CZi6NeiED8OCNn4iG8+uw0aWxoxww2hlVWCwFCyyk4PFqQeuVfgBU8VJzjSr7Cd6imJ62HJfEH71mqZNU8ijsK4OE79e0Kg== X-Forefront-PRVS: 00872B689F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(50944005)(92566002)(2950100002)(19580395003)(19580405001)(6916009)(97736004)(4001430100002)(305945005)(6666003)(7736002)(7846002)(6116002)(3846002)(586003)(229853001)(189998001)(66066001)(107886002)(5660300001)(33646002)(110136003)(47776003)(86362001)(48376002)(2906002)(76176999)(68736007)(4326007)(5003940100001)(50466002)(42186005)(105586002)(106356001)(77096005)(36756003)(81156014)(81166006)(101416001)(50226002)(50986999)(8676002)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR04MB1983; H:washi.fujisawa.hgst.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: hgst.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR04MB1983; 23:2BK3MSDs3q+8aMdHlEbEjWdTaYKup5P+rFKSg6PEE?= =?us-ascii?Q?UvXTO/vcyuMw8GrMzcUAb7O9aXTDZeO8DAuRfs+IVM0u2DpBbMkDRKBkQ9Ye?= =?us-ascii?Q?pADS2Zmso5kXX5J8eH3gBm9ikzF9g/ST/mATup8MZkZ2CQbZXAI4N9PGut/h?= =?us-ascii?Q?d5k0ebCeFpkWx+gGLrhTpBwjXrtx1thVxd5psOQ0qZP63TdvTYHsuq8MlGiB?= =?us-ascii?Q?d9YQQP0Sc477GozCy+wg6YBtijQ7bmMBGYtf60JH4RjKSHwIQRQRwsZA9iaW?= =?us-ascii?Q?ESC1k8Z/3rY9L2pOAu4/G/zq/A6u6lbiMscV+ViYhJh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SRJh74KPaIzPfYOOFtI7WEG8hMaUnAKM+74LH85Ovuxg/M7CYbslOptjaHaRX+o0syT0wycRQjZro4/OodO9uBC/Wyv2F3WgxzDuhqoX52dDDRTdSv9uDyEM6hmTJ4oQPaEEG3YEzpXAT6PvMNpJauJN+emJYtJBUmgVeXELSUR4HrJgnDZE2zr47hV1JCq/4ZFbAyes1QhyaH0RA X-OriginatorOrg: hgst.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2016 01:05:07.7331 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR04MB1983 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 Add the zoned queue limit to indicate the zoning model of a block device. Defined values are 0 (BLK_ZONED_NONE) for regular block devices, 1 (BLK_ZONED_HA) for host-aware zone block devices and 2 (BLK_ZONED_HM) for host-managed zone block devices. The standards defined drive managed model is not defined here since these block devices do not provide any command for accessing zone information. Drive managed model devices will be reported as BLK_ZONED_NONE. The helper functions blk_queue_zoned_model and bdev_zoned_model return the zoned limit and the functions blk_queue_is_zoned and bdev_is_zoned return a boolean for callers to test if a block device is zoned. The zoned attribute is also exported as a string to applications via sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as "host-aware" and BLK_ZONED_HM as "host-managed". Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff --- Documentation/ABI/testing/sysfs-block | 16 ++++++++++++ block/blk-settings.c | 1 + block/blk-sysfs.c | 18 ++++++++++++++ include/linux/blkdev.h | 47 +++++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block index 71d184d..75a5055 100644 --- a/Documentation/ABI/testing/sysfs-block +++ b/Documentation/ABI/testing/sysfs-block @@ -235,3 +235,19 @@ Description: write_same_max_bytes is 0, write same is not supported by the device. +What: /sys/block//queue/zoned +Date: September 2016 +Contact: Damien Le Moal +Description: + zoned indicates if the device is a zoned block device + and the zone model of the device if it is indeed zoned. + The possible values indicated by zoned are "none" for + regular block devices and "host-aware" or "host-managed" + for zoned block devices. The characteristics of + host-aware and host-managed zoned block devices are + described in the ZBC (Zoned Block Commands) and ZAC + (Zoned Device ATA Command Set) standards. These standards + also define the "drive-managed" zone model. However, + since drive-managed zoned block devices do not support + zone commands, they will be treated as regular block + devices and zoned will report "none". diff --git a/block/blk-settings.c b/block/blk-settings.c index f679ae1..b1d5b7f 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -107,6 +107,7 @@ void blk_set_default_limits(struct queue_limits *lim) lim->io_opt = 0; lim->misaligned = 0; lim->cluster = 1; + lim->zoned = BLK_ZONED_NONE; } EXPORT_SYMBOL(blk_set_default_limits); diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 9cc8d7c..ff9cd9c 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -257,6 +257,18 @@ QUEUE_SYSFS_BIT_FNS(random, ADD_RANDOM, 0); QUEUE_SYSFS_BIT_FNS(iostats, IO_STAT, 0); #undef QUEUE_SYSFS_BIT_FNS +static ssize_t queue_zoned_show(struct request_queue *q, char *page) +{ + switch (blk_queue_zoned_model(q)) { + case BLK_ZONED_HA: + return sprintf(page, "host-aware\n"); + case BLK_ZONED_HM: + return sprintf(page, "host-managed\n"); + default: + return sprintf(page, "none\n"); + } +} + static ssize_t queue_nomerges_show(struct request_queue *q, char *page) { return queue_var_show((blk_queue_nomerges(q) << 1) | @@ -485,6 +497,11 @@ static struct queue_sysfs_entry queue_nonrot_entry = { .store = queue_store_nonrot, }; +static struct queue_sysfs_entry queue_zoned_entry = { + .attr = {.name = "zoned", .mode = S_IRUGO }, + .show = queue_zoned_show, +}; + static struct queue_sysfs_entry queue_nomerges_entry = { .attr = {.name = "nomerges", .mode = S_IRUGO | S_IWUSR }, .show = queue_nomerges_show, @@ -546,6 +563,7 @@ static struct attribute *default_attrs[] = { &queue_discard_zeroes_data_entry.attr, &queue_write_same_max_entry.attr, &queue_nonrot_entry.attr, + &queue_zoned_entry.attr, &queue_nomerges_entry.attr, &queue_rq_affinity_entry.attr, &queue_iostats_entry.attr, diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c47c358..f19e16b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -261,6 +261,15 @@ struct blk_queue_tag { #define BLK_SCSI_MAX_CMDS (256) #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) +/* + * Zoned block device models (zoned limit). + */ +enum blk_zoned_model { + BLK_ZONED_NONE, /* Regular block device */ + BLK_ZONED_HA, /* Host-aware zoned block device */ + BLK_ZONED_HM, /* Host-managed zoned block device */ +}; + struct queue_limits { unsigned long bounce_pfn; unsigned long seg_boundary_mask; @@ -290,6 +299,7 @@ struct queue_limits { unsigned char cluster; unsigned char discard_zeroes_data; unsigned char raid_partial_stripes_expensive; + enum blk_zoned_model zoned; }; struct request_queue { @@ -627,6 +637,23 @@ static inline unsigned int blk_queue_cluster(struct request_queue *q) return q->limits.cluster; } +static inline enum blk_zoned_model +blk_queue_zoned_model(struct request_queue *q) +{ + return q->limits.zoned; +} + +static inline bool blk_queue_is_zoned(struct request_queue *q) +{ + switch (blk_queue_zoned_model(q)) { + case BLK_ZONED_HA: + case BLK_ZONED_HM: + return true; + default: + return false; + } +} + /* * We regard a request as sync, if either a read or a sync write */ @@ -1354,6 +1381,26 @@ static inline unsigned int bdev_write_same(struct block_device *bdev) return 0; } +static inline enum blk_zoned_model bdev_zoned_model(struct block_device *bdev) +{ + struct request_queue *q = bdev_get_queue(bdev); + + if (q) + return blk_queue_zoned_model(q); + + return BLK_ZONED_NONE; +} + +static inline bool bdev_is_zoned(struct block_device *bdev) +{ + struct request_queue *q = bdev_get_queue(bdev); + + if (q) + return blk_queue_is_zoned(q); + + return false; +} + static inline int queue_dma_alignment(struct request_queue *q) { return q ? q->dma_alignment : 511;