Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34985011rwd; Mon, 10 Jul 2023 00:28:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlEe32C/OakZxZRSC1c7AMKo2IcK6e4ET01fo8ifO9UXWuq77dnaN2bwypcV4x8ke2JEYwNP X-Received: by 2002:a17:906:9492:b0:991:e695:cb7 with SMTP id t18-20020a170906949200b00991e6950cb7mr10165910ejx.68.1688974092637; Mon, 10 Jul 2023 00:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688974092; cv=none; d=google.com; s=arc-20160816; b=QYoK3jdFhvnRTaCDBc6Iw1JZJzW2/Lf18gfHZHPx9h3mgbAOfan2rO252d41TUuvZy iZ/du7P22nACtphnCdmATtajKBOnembpcqPgD72NKK4n1Ais8sakswjx7s2+hcSHYUnT 5DepoeD04AsuLs8qzUyZi/cA07yARHoQyncHbWJkOP/+pLTRJJLcYYHTvezlkznCg89x tgK1vS5PsySGTZxz92B0a44a7zHJOcGlOG/U7oErJdvXjtap/p0n+NFy9PEOYI3TyHy2 0tbVXiabZkc0sWwsNpOTfj/0l3ihUsNcWFwR+mH/oYiLV5D7SyWJCNqKMsyGx0bvUL93 rq4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0WJwmYqGqfC5+F7X8O+8MxIciM7Dnfe4X3/zGG+C5NM=; fh=0xH4M+wV4DQobwbm8H4QGingw+RZI04bx6Q5gRLGelQ=; b=Tl+nw6QeP3T2qvhS+1EzjCxw7S1879Akuw21nnVzjkbZeiWCrZKweKANio6ng7oxlk wdjrtYRwlI29zYi9BCo/+0WuGtIdyu86eHgQcOmJ/2r/31gx0SiulmD2MGwq4rA9k80x tA0CrUwU0hMVLbHIjhzRqgEmo0nQDuxjrMlxZzlah8IW5UPUdDDWHRzfZzNejcxe1FVN KftTXkUdc3t4PXDAAYuiB5I2IZisPDWhheGlH/S8IyVmS2G5XELQ9giBvcBfngV0wc9L myPyeBzgc6OyQOYVp5Xw3Az6g279DDuo902Dfw3iEn9sD/X3ACESeZUwpztULmHbpCge UEww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=iU4lk5jz; 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 e2-20020a170906080200b00977cb7af75asi9535518ejd.719.2023.07.10.00.27.48; Mon, 10 Jul 2023 00:28:12 -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=@infradead.org header.s=bombadil.20210309 header.b=iU4lk5jz; 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 S230125AbjGJGwq (ORCPT + 99 others); Mon, 10 Jul 2023 02:52:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbjGJGwp (ORCPT ); Mon, 10 Jul 2023 02:52:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B463B8; Sun, 9 Jul 2023 23:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0WJwmYqGqfC5+F7X8O+8MxIciM7Dnfe4X3/zGG+C5NM=; b=iU4lk5jzwQZah8E0ji7rSHbjxI ++1tF3GKKf7Za5Vx+eTSlYJvNobHySd/+D5glJC0omq0h3xJKlFMOIFhjy86yVJmY9hUeezj6Ro12 KGnaVeMWzPhgQBsbJPOpBAoyEF0yXAWLAKbKUrqHd+IHv2/22MXOBL4EYg0aK/faTTJUxe1rYepgx XYyRGwZemGjTiCgqDHqWcB7Iph1ybeIxIzxPKiqeLtHYLL2mqBJBYTnqv4fCmfbWTM+0+RpQOaRgL WlOaGUYITW9gOPAwXOLdgP7etwjsWEultGqoJ3iEM76+d3iFeAdY9dhEtOY8SX/jMaIpKmu4n4TFy uIGKFtXQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qIklD-00AdNW-09; Mon, 10 Jul 2023 06:52:39 +0000 Date: Sun, 9 Jul 2023 23:52:39 -0700 From: Christoph Hellwig To: Ming Lei Cc: Damien Le Moal , Andreas Hindborg , open list , "open list:BLOCK LAYER" , Andreas Hindborg , Minwoo Im , Matias Bjorling , gost.dev@samsung.com, Jens Axboe , Aravind Ramesh , Johannes Thumshirn , Hans Holmberg , Christoph Hellwig Subject: Re: [PATCH v6 1/3] ublk: add opcode offsets for DRV_IN/DRV_OUT Message-ID: References: <20230706130930.64283-1-nmi@metaspace.dk> <20230706130930.64283-2-nmi@metaspace.dk> <51b660f3-8145-d35e-87b4-d9ac0623606d@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On Fri, Jul 07, 2023 at 08:59:03AM +0800, Ming Lei wrote: > > let's clearly state so. But then, I still not understand why these need > > a different naming pattern using the "__UBLK" prefix... > > I think __UBLK just meant we don't suggest userspace to use it directly, > since the added macros are just for making ranges for DRV_IN and DRV_OUT, > so we can check command direction easily be using this start/end info in > both sides. Folks, please stop coupling a uapi (or on-disk protocol) too tightly to Linux internals. Think of what makes sense as a communication protocol, not what is an internal kernel interface. REPORT_ZONES is a sensible command, and supported in ATA/SCSI/NVMe in one way or another. In Linux it is a synchronous method call right now for one reason or another, and most implementation map it to a passthrough command - be that the actual protocol command or something internal for virtio. So for ublk this is just another command like any other, that needs to be defined and documented. Nothing internal or driver specific.