Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22407602rwd; Fri, 30 Jun 2023 07:41:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDyGGbc227xNCfzJWZQNxFAGfOiqq0QCMNIV0t5Eq1f0Rvn6pszO/lgvKyxGej31Au4vSe X-Received: by 2002:a62:64d2:0:b0:668:81c5:2f8a with SMTP id y201-20020a6264d2000000b0066881c52f8amr3017484pfb.17.1688136079268; Fri, 30 Jun 2023 07:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688136079; cv=none; d=google.com; s=arc-20160816; b=BaQhZavUJKAyLAVFaZ26Jg0uhEOzYj9CtS1biqxubAIc3iKhlfQ2XotGpTXZkfT95p GN3B+btlURSQq7WzPX+rYK1gP6Io7spp8WdVhI17Em5piiaeaVmDwnXZp44Pog4XP08c JTYVrtHxcUd2p8E8pZStUpxdcW3kRL95jXVLEcXvIrFP9wl7xWHIh1kKEnrGvOr1Pehg J5Cdj0L/h0RnKHG5WhqKYjq8qmZZPYE3PZeinFd8neGnLt72NRQJkPjoWAgJLeaS19pM naBvH+BThds9a2GNdKYabUW6b1KXY9Xd0mbe5SWhaxOTMircOv5eE9cSQ/CQiCZ1rVd4 a+1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:in-reply-to:date:subject:cc:to:from:user-agent :references:dkim-signature; bh=jsEa83LElgV+AQL5e6o9aSSV0H6S/EdnOsnoqxBROhA=; fh=mfzUXBBNLxgs4T2jzdu02yUISnW+OUn9Jaip7rG49ho=; b=PD1Bb1MwGvEL3zyH7Ts7MPPEa7f3d5wot4H3c5b3fhIQtktBNJ9QtGmV1imfEeaC0m yLtfPe1000E/w60zomkgI3ud7sHVzBIYC8DUEq7SrEWB/81cimTQlE0CV2lkxas+Vhr0 RaDfkqcfdRK2xe4qePWHOPy0JSniS1CToJkIQ+H1iqbI5GOWNsF2HSBq5+nYL4RSrJV7 FQR7mHB4tIpKKD6ZsY+Us6K/sT7EHTWWWJP1gCkJTjHTG0vdBnNtGTlohIJI+98NkFKF p6LgbCu+Fw32J1C0Sk+UACLWZyE1sWk1QKtvG6lfnzK8YoMeWa/k2N7TSZ/a6PqI6XH0 2jVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metaspace-dk.20221208.gappssmtp.com header.s=20221208 header.b=H+Os4B7h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a056a00005100b0068265f40634si780336pfk.400.2023.06.30.07.41.05; Fri, 30 Jun 2023 07:41:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@metaspace-dk.20221208.gappssmtp.com header.s=20221208 header.b=H+Os4B7h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232613AbjF3Ods (ORCPT + 99 others); Fri, 30 Jun 2023 10:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232599AbjF3Odp (ORCPT ); Fri, 30 Jun 2023 10:33:45 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FD0C10D7 for ; Fri, 30 Jun 2023 07:33:43 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-313f18f5295so2289155f8f.3 for ; Fri, 30 Jun 2023 07:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20221208.gappssmtp.com; s=20221208; t=1688135621; x=1690727621; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=jsEa83LElgV+AQL5e6o9aSSV0H6S/EdnOsnoqxBROhA=; b=H+Os4B7hYlGqCKP3ZBTL1CfbmQZAnDdA1Ma95DpqUEcPbitEtWpwDZroRvTY/Yd+Qj 55yAJTSAzluveA0lcf4cot1uAHJTD5IxVpP3U33+/25vUo2yQRW28xqYUacd7JpKTaQh 0VxMG0rwaI0ypKW1awW+rOqc8asLoLz7ciVrdelUHf6oWeLftc1sAUrqENr429lDxrzf FfsT0Dj5SON37+8P+ZGLYBM6o+r9QWBX7Y3/1j5+d5tP1FCetdVBNlx+x/+BbPCyx84n ZquXktVmxqaGYy6LVAUF+PgYVyVwYTx+dhsV6xlnBXXBCPycrfu4P2TfQWio0GPm0uTR DKZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688135621; x=1690727621; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jsEa83LElgV+AQL5e6o9aSSV0H6S/EdnOsnoqxBROhA=; b=PmFb8/B1DjtlQLBd/YIlIqPLVHycC/ODB1sEQajyjyr+8mVx+z0IdqCSQr7zYpPVJQ qtcGd7sRKswc4ZZvE4w7fZYEcIAjtydeVpWcgvdga0hPxxhQ7b2j7tm6hZtAJpWMvbp2 fyAKX/nC4vB3VX5kcynNeOk5l3t4lEcovjnr/wB7rLSxVZJ65M9ttD2Oi42LO9fll00b z8RQH4SGsmFuXgk7nnumb04V5AlRqsvh7FMEt9pQBSR5Ye2XNXAOOqqpBx9vYpNyJLu+ gu1205oDBXMsUaivcw8f2SffaL8bq8HFUw/Dj026o55HtOwrkmUciBfCLTJhdR7MGSs2 kSOg== X-Gm-Message-State: ABy/qLYn5LJVkl2v1sJS6pJcBlmv4RMbIY9U8TAm3ZavJRpqUSOgm5++ 7T1sgzzzvO1r3ghVWU2fqwE4iA== X-Received: by 2002:a05:6000:1cb:b0:314:13a6:af20 with SMTP id t11-20020a05600001cb00b0031413a6af20mr2161017wrx.31.1688135621090; Fri, 30 Jun 2023 07:33:41 -0700 (PDT) Received: from localhost ([165.225.194.214]) by smtp.gmail.com with ESMTPSA id g6-20020a5d6986000000b0031130b9b173sm18354949wru.34.2023.06.30.07.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 07:33:40 -0700 (PDT) References: <20230628190649.11233-1-nmi@metaspace.dk> <5F597343-EC91-4698-ACBE-9111B52FC3FC@wdc.com> User-agent: mu4e 1.10.4; emacs 28.2.50 From: "Andreas Hindborg (Samsung)" To: aravind.ramesh@opensource.wdc.com Cc: Hans Holmberg , Jens Axboe , "open list:BLOCK LAYER" , hch@infradead.org, Matias =?utf-8?Q?Bj=C3=B8rling?= , open list , Damien Le Moal , gost.dev@samsung.com, Minwoo Im , Ming Lei Subject: Re: [PATCH v4 0/4] ublk: add zoned storage support Date: Fri, 30 Jun 2023 16:26:28 +0200 In-reply-to: Message-ID: <87edltdnp8.fsf@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aravind.ramesh@opensource.wdc.com writes: >> =EF=BB=BFOn 29/06/23, 12:37 AM, "Andreas Hindborg" > > wrote: >> From: Andreas Hindborg > > >> Hi All, >> This patch set adds zoned storage support to `ublk`. The first two patch= es >> does >> some house cleaning in preparation for the last two patches. The third p= atch >> adds support for report_zones and the following operations: >>=20 > > Just to clarify, we do need you ublk user space patches > to create a ublk device node (with these patches in kernel), right ? I provide an example implementation. I put a link in the cover letter, but I think the sentence referring to the link got lost, thanks for pointing out. https://github.com/metaspace/ubdsrv/commit/7de0d901c329fde7dc5a2e998952dd88= bf5e668b This implementation is based on Ming's ubdsrv code. You do not need to use this one, you can write your own. I am also working on an implementation in Rust, but that is still very early. I think Ming is also writing a Rust library for user space ublk devices. But currently my patched ubdsrv is the only user space implementation supporting zoned ublk devices (with the loop and null targets). > >> - REQ_OP_ZONE_OPEN >> - REQ_OP_ZONE_CLOSE >> - REQ_OP_ZONE_FINISH >> - REQ_OP_ZONE_RES > > REQ_OP_ZONE_RESET Thanks! > >> The last patch adds support for REQ_OP_ZONE_APPEND. >> v3 [2] -> v4 changes: >> - Split up v3 patches >> - Add zone append support >> - Change order of variables in `ublk_report_zones` >> Read/write and zone operations are tested with zenfs [3]. >> The zone append path is tested with fio -> zonefs -> ublk -> null_blk. >> The implementation of zone append requires ublk user copy feature, and >> therefore >> the series is based on branch for-next (6afa337a3789) of [4]. >> [1] >> https://github.com/metaspace/ubdsrv/commit/7de0d901c329fde7dc5a2e998952d= d88bf5e668b >> >> [2] >> https://lore.kernel.org/linux-block/20230316145539.300523-1-nmi@metaspac= e.dk >> / >> [3] https://github.com/westerndigitalcorporation/zenfs >> >> [4] https://git.kernel.dk/linux.git >> Andreas Hindborg (4): >> ublk: change ublk IO command defines to enum >> ublk: move types to shared header file >> ublk: enable zoned storage support >> ublk: add zone append >> MAINTAINERS | 2 + >> drivers/block/Kconfig | 4 + >> drivers/block/Makefile | 4 +- >> drivers/block/ublk_drv-zoned.c | 155 +++++++++++++++++++++++++++++++++ >> drivers/block/ublk_drv.c | 150 +++++++++++++++++++------------ >> drivers/block/ublk_drv.h | 71 +++++++++++++++ >> include/uapi/linux/ublk_cmd.h | 38 ++++++-- >> 7 files changed, 363 insertions(+), 61 deletions(-) >> create mode 100644 drivers/block/ublk_drv-zoned.c >> create mode 100644 drivers/block/ublk_drv.h >> base-commit: 3261ea42710e9665c9151006049411bd23b5411f > > Regards, > Aravind