From patchwork Fri Aug 4 11:46:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Hindborg X-Patchwork-Id: 13149 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:44a:b0:3f2:4152:657d with SMTP id ez10csp256622vqb; Fri, 4 Aug 2023 06:18:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnlAmql2ACFwYfObz3fKDlX4U+1zdD6P5OS/Dvi26GF7COY49CEs8lhP6p/YDXB2r7lF0b X-Received: by 2002:a05:6a00:230b:b0:67e:5edd:e6e7 with SMTP id h11-20020a056a00230b00b0067e5edde6e7mr1761957pfh.9.1691155126108; Fri, 04 Aug 2023 06:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691155126; cv=none; d=google.com; s=arc-20160816; b=Sf52vCGIsDmgb2/PBeMXAk5KMQ6x+HRD40YtWwabCTZEWituLYJHl//qa8SVq48jvr uVm6XHSjlIlXcS2puqKHnTVTZ/WpiB10f8am430lMZTWjnxPXlKDXT+Ei0ZboZy2WQxo IQUevLjaxyMy7GKJL42You1qd0BUYTeBThOyv6NH9tnaLbAzJpsOrf/bTXmuqMwvKVkf E67xxgii9GCQ55lkJRGzAxg3lc/5mk23UvFabIS4jpr5VBHGtX0n83WbW5MHZhnl+0rj akXyAKM3BGTP9Xp+TqqahG/+aKz1zpxDk5eecPbtShKUFfNfpJyQp3hHGR1zsPrbTZL4 8+rQ== 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=BCoO+eXbLDZ6LS4ScYv1U/n5Fj5ZbQV1Lly5tQSedaA=; fh=LpfzUVEqbS1lRTip4rxe3wl5hktlC4Zs5L2DgsRkAcE=; b=mce//JkpdkH0EdQ3/LYBqtkkECITuoR/996pvzS8zVOoT0P0h7HGFF1x1riTYgzBSP uMvEZ+yBGEHGZrLZ7jEBzHabOHtgJP8olB55L0XxL09aGeXp2lILn7bYxe+I2ax1IJ1H 5+vYxmtuXbaIQnff8N4o/nI/E15vWJVqrTcMehqwlfEvKUdzkVb3+ADa3slxOBfjq575 OyFE7SJJdPjtM3bL/fuwEhKF7qh4L1HU/ObYc2flJgfu2I/gCzpc/fXHo1eug3H+ZClW Obq/kN/KEUZGzF64WwQ585R3IHUgPPYZnEiz7FHxYgOzROJG+H9mbsvLFpQBicceW5yT CHoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metaspace-dk.20221208.gappssmtp.com header.s=20221208 header.b=ex9GIswF; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020a056a001a8900b006875607bdd6si1793165pfv.18.2023.08.04.06.18.19; Fri, 04 Aug 2023 06:18:46 -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=ex9GIswF; 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 S229797AbjHDLqT (ORCPT + 99 others); Fri, 4 Aug 2023 07:46:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjHDLqR (ORCPT ); Fri, 4 Aug 2023 07:46:17 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45284B1 for ; Fri, 4 Aug 2023 04:46:13 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-99c4923195dso275188866b.2 for ; Fri, 04 Aug 2023 04:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20221208.gappssmtp.com; s=20221208; t=1691149571; x=1691754371; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BCoO+eXbLDZ6LS4ScYv1U/n5Fj5ZbQV1Lly5tQSedaA=; b=ex9GIswFD6wVaea7Y/G4QtiPWycco6WsxPzjVlDZM28jkmAO/OnGr/fV4XKKdftbK8 1zQDeAEmYQCkpMOyKA7sMpERno8pfqUksnohPEa8CGTe5LapfSzvXgW+JDX077GTZm0v 84XD0l+st2UuvHMCO93Zxfr57yTpaGp3x6/x8bXtMBgaqajL5liBrSR9/W+9+BcWKPjw U4bESYY7LvANqQ0IWgRzspnBMvPdGJqp9F/lZdoFPHdCebTMrZpTc3RqsTybMGdIHSI9 z+mLeTLF03kMaThUjZNspToUWBsL4ko75dtibBAZmvY3PLxWpsKln6CYMLH0PEoIJFy/ rX7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691149571; x=1691754371; 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=BCoO+eXbLDZ6LS4ScYv1U/n5Fj5ZbQV1Lly5tQSedaA=; b=cS8ZAzcjjGEWt1JYsKzugD74/eO+Rtyg5uATHxAY4ZhHRyMCASnLn8fi3X3HlBcoLS W+E949SSu/dE0k9ZJRzj1eZIK/o4zsXpqe67hgRTtQcN511S6/IurXN5Sd0YcAgic9cm /9jwCYC4CCXOXNVxMrHq41YNju9En6yevHTYMgRQIKFAFtMS2xH+2J/eghCiZgDwBON1 LUlPzShhTCR7X/P17fTWwQOSPrIF2QhvXOdcuruUHNuDsrb0P0QiEXmvOj5Y/3/vmWWU lHD9hD+Vnfu78TyS01vDXsluTJtKGbWitPubWOeG5yDJNuHU/eu9CYu2VKDRWD3kpEeE UFhg== X-Gm-Message-State: AOJu0Yxupe2EohRjm0z2keEQ+1fsCvsIR+kPfJglUS1EiNhv5ZKghVMm Ng7zq1S+13xklGSZ4gBseKKdSg== X-Received: by 2002:a17:906:d8:b0:99b:ca5d:1466 with SMTP id 24-20020a17090600d800b0099bca5d1466mr1435276eji.66.1691149571637; Fri, 04 Aug 2023 04:46:11 -0700 (PDT) Received: from localhost ([194.62.217.4]) by smtp.gmail.com with ESMTPSA id lc15-20020a170906f90f00b0098ce63e36e9sm1210960ejb.16.2023.08.04.04.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 04:46:11 -0700 (PDT) From: "Andreas Hindborg (Samsung)" To: Ming Lei Cc: Aravind Ramesh , Christoph Hellwig , gost.dev@samsung.com, Minwoo Im , Hans Holmberg , Matias Bjorling , Damien Le Moal , Andreas Hindborg , Johannes Thumshirn , linux-kernel@vger.kernel.org (open list), Jens Axboe , linux-block@vger.kernel.org (open list:BLOCK LAYER) Subject: [PATCH v11 0/3] ublk: enable zoned storage support Date: Fri, 4 Aug 2023 13:46:07 +0200 Message-ID: <20230804114610.179530-1-nmi@metaspace.dk> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773301245850064330 X-GMAIL-MSGID: 1773304677554779941 From: Andreas Hindborg Hi All, This patch set adds zoned storage support to `ublk`. The first two patches do some house cleaning in preparation for the last patch. The last 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_RESET - REQ_OP_ZONE_APPEND A user space component based on ubdsrv is available for testing [1] with the "loop" target. Read/write and zone operations are tested with zenfs [2]. The zone append path is tested with fio -> zonefs -> ublk -> null_blk. The series is based on v6.5-rc4. Changes for v11 - Style fixes - Use `kvmalloc()` instead of `__vmalloc()` for zone report buffer [1] https://github.com/metaspace/ubdsrv/tree/2966e5f9637b5856d4a4273ae113e31b1c53ff98 [2] https://github.com/westerndigitalcorporation/zenfs [3] https://git.kernel.dk/linux.git Andreas Hindborg (3): ublk: add helper to check if device supports user copy ublk: move check for empty address field on command submission ublk: enable zoned storage support drivers/block/ublk_drv.c | 348 ++++++++++++++++++++++++++++++++-- include/uapi/linux/ublk_cmd.h | 63 +++++- 2 files changed, 383 insertions(+), 28 deletions(-) base-commit: 5d0c230f1de8c7515b6567d9afba1f196fb4e2f4