Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19659773rwd; Wed, 28 Jun 2023 12:18:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6c3+HGNE2ci4g4p+cfflZBww3JASLteYhZi3a2Ixv/ee5vUtx186KI2I7N1Zh6xohk+IV1 X-Received: by 2002:a05:6a20:3d12:b0:125:dee7:cfed with SMTP id y18-20020a056a203d1200b00125dee7cfedmr12298983pzi.16.1687979902571; Wed, 28 Jun 2023 12:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687979902; cv=none; d=google.com; s=arc-20160816; b=UNCv1XOp/DuoGSl72FmEQraIkgl4mTZClSkm+Y2aVzKgnHOsK1q4REhuHa1k2pQ8Gg A+iH3Ueib5FlfecSgWEpkt9WYjeMm5iJ+vZpmof/2LAugwM2wrXt9t/JIbswxBqGmGye hSvYJytqx+wKBo7C5SUSH40UC/+TNGyYebi/18pvH5d2PzWtLCRfhnrNnoRxQhD6tM7O 4jj0w3Y/qQSKDI2p2v9sDzOdoYaoutr48bq1ciZ6SERaxnkRoWJGrPqLvMkiwmmEHayD 1n1Rk8LBqTOWJYU4B3tICg8hE8LhCzAIJbGvbERXAmWWKBdur9ffOrFUqoUU+JFTlTSX IHRw== 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:date:subject:cc:to:from:dkim-signature; bh=tHp3wJL5M2L2G+YbB2Q2IPPSaeVG/zhpefUOIq4q2Os=; fh=PtLHm9B0+hM1tQPeQT3fpvfpYSsUVoUxZslaqHBKa8M=; b=oNDX5LyuQqa1x/w+a3h/G1FrJNsfShA8/pRzTd95dhvZw49uhXxgtfPbrHAXALj803 oHYsiMWe9bOvZjHDM6Zj+AZsTH2FeZQlhQv2vmC3QJKqcwGIVv8gNxow1s8WFSye7Hrl g9gq8lU54ofW4O+k9zd91lD538En0FQf3dyftwCb6rrveKI5BV3Pv9lVDbVXlurM/+cu nEjXFRMCbztUIqRsZvkpk7nBnAvT+JN86o1rXmxRP5pSvMCXXSSBXkuljHVMYZxA5xzL PZPn2FIOwXFO9qggOJ1+ScUudyyylM3XoJsoufzuQ3aAX6Z/fVyW5lySUVp2zHZqp/Sd Yz5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metaspace-dk.20221208.gappssmtp.com header.s=20221208 header.b=jDgSFPLY; 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 65-20020a630244000000b0053fa62e7c4csi9252778pgc.776.2023.06.28.12.18.09; Wed, 28 Jun 2023 12:18:22 -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=jDgSFPLY; 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 S231835AbjF1THN (ORCPT + 99 others); Wed, 28 Jun 2023 15:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232109AbjF1TG6 (ORCPT ); Wed, 28 Jun 2023 15:06:58 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA2201FE8 for ; Wed, 28 Jun 2023 12:06:53 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-991ef0b464cso241521966b.0 for ; Wed, 28 Jun 2023 12:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20221208.gappssmtp.com; s=20221208; t=1687979212; x=1690571212; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tHp3wJL5M2L2G+YbB2Q2IPPSaeVG/zhpefUOIq4q2Os=; b=jDgSFPLYEQZXyfEfZwepmlvYqaf7ynGTJ/aFKkuF+COAMkmY5RIkoCJE95ml123D3X UqZWhOf4hphOdA7/m4fHFsFpUS/J/mSoH8ZBxH2RGgl53vhshBiaN7SuwAJRhfooVX/x WWNrTdXp1DqTl6AAr/hWDTEdkXv0ytzmp7ANidt/mJIlX4pEENnkZvzAmnA/QqEvu4gP uQoECeyhbrWd471Vo0z5ntYEPpMAkwabOLZz59o1I2Lu6FhlbxyEdnZDSCsOO7G1Z1O3 FJ78dss+Xv1TrnD1mS8ISDOVB0TVcdv79MsmZPK0uFbMqe5mr3Xycd13426VHGsDgq2D Uq7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687979212; x=1690571212; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tHp3wJL5M2L2G+YbB2Q2IPPSaeVG/zhpefUOIq4q2Os=; b=i1kZcWUQ+6qRS9Xfog5S6uu4uiOum0uvEPD9qj3a2L1ybDUxSt0ydQYHGrhZmAzlzl +jbhff55+yvNX6YQPXdulvtHACItOxvYgwih0vsiPJaGdTt8mT5yfxIlFau/ugZicNJV zV1NsO8w7LaJTPFpWWgYjkKqBiyfsQFrEss0Qku4z+X+i5UZCt+RXzmVpCNRCiYytPP8 dUwC6SAUyphO9FxE0ehh44Pk4LcvV4hx4LQUe7ojIQnklz7WsC2HxgSkgAJkGyY+abia 9YfM5EMOIDGgkBF5w5DVMk4yVoHfhlLNz3BJqrf1/16+QImXrN4BYnIuKJvuMCRaIX0o RjYw== X-Gm-Message-State: AC+VfDyGMM9AO3SF/bQPVu3RcX9Skf3fWM0hc03BMNB/uBhOMJMhXhsn +Qwho8d2Mgjk8vGds9TurlzNpw== X-Received: by 2002:a17:907:60d5:b0:98d:f2c9:a1eb with SMTP id hv21-20020a17090760d500b0098df2c9a1ebmr2479087ejc.24.1687979212156; Wed, 28 Jun 2023 12:06:52 -0700 (PDT) Received: from localhost ([79.142.230.34]) by smtp.gmail.com with ESMTPSA id r16-20020aa7da10000000b0051d2968b26asm5072022eds.77.2023.06.28.12.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 12:06:51 -0700 (PDT) From: Andreas Hindborg To: Ming Lei Cc: Hans Holmberg , Aravind Ramesh , Jens Axboe , linux-block@vger.kernel.org (open list:BLOCK LAYER), Christoph Hellwig , Matias Bjorling , Andreas Hindborg , linux-kernel@vger.kernel.org (open list), Damien Le Moal , gost.dev@samsung.com, Minwoo Im Subject: [PATCH v4 0/4] ublk: add zoned storage support Date: Wed, 28 Jun 2023 21:06:45 +0200 Message-ID: <20230628190649.11233-1-nmi@metaspace.dk> X-Mailer: git-send-email 2.41.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Andreas Hindborg Hi All, This patch set adds zoned storage support to `ublk`. The first two patches does some house cleaning in preparation for the last two patches. The third patch adds support for report_zones and the following operations: - REQ_OP_ZONE_OPEN - REQ_OP_ZONE_CLOSE - REQ_OP_ZONE_FINISH - REQ_OP_ZONE_RES 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/7de0d901c329fde7dc5a2e998952dd88bf5e668b [2] https://lore.kernel.org/linux-block/20230316145539.300523-1-nmi@metaspace.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 -- 2.41.0