Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36423661rwd; Tue, 11 Jul 2023 00:21:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlFiKGavLiKAAloBepi+oeCscQBt8HZ+QimUiqhwyOGwRVPBZ6bF34xYQHBp3MBn+H6SoHVH X-Received: by 2002:a17:906:1de:b0:993:eed1:8f0 with SMTP id 30-20020a17090601de00b00993eed108f0mr8946286ejj.3.1689060085772; Tue, 11 Jul 2023 00:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689060085; cv=none; d=google.com; s=arc-20160816; b=ai/nwwNi0cfhB2NwzeCzXKjGbOfAzwvM5mjmu1RNSkc5XJyXnFRKg2k3XPGCrNXoYd fEheVJX+REuP0TIGWCx+xGcawR8bJkFAO0AopKbIWeLv+RX5IIv+2HavVpBKhzM5TLrn jzpKRcwpJCcteXUARjYrPEU0BZtVSG6HH5XWr2a9sBKy5bdYHwsVyQEJDAAK5dc/nukM RbfVdezJJLk5cfkjN+nkrxcMXxhQD5my4eLsnoc8VzvYRqvbzMQTx5FSuxMU2Fxz9V47 z4xNSdw64PVKKh5LgXjffu6AYJ+54JbBOZgisI+07uBapqpWkJP6f/MoGyf0TnrqV+O7 S+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=ADRu1k94Szm9V0evY8U5mOQEsmaGQsPDAea7XrGLJeI=; fh=WBxsPMOxx5Ln6i8qfZf6TFMKByuTTp83fwoWOfnwR0c=; b=CqeDlGJSQR3egLX2ihWm+G2PjhP1Pi0OlZUyw2t6BILJOn0AI3TTdJYO+vks3cfckY b61Z9UiT2tJzKk3KvTD8Zdw95p75LL/vydtJC5FCz+Ka9bgFPlZV4f3B2/qqqs3VSypn 1NhCJH3igu2OOjc5p616QFg1WMD1/dHfXs3nm+3KFQzjzbUCfCtL4ReUqRajTecqjeE/ OYuwz/RhygprVqD3Ep727EYHTLTHoJNCgNpN2AihV9CDmpipLoceYQH4cO+bZPG2GiYK z2KSJlZ+O6J6T4/uwQncBQst3XRa5heVc/Fj7gwEnrn3v3PV3bW6I08KAWY8soDL24cN p6SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metaspace-dk.20221208.gappssmtp.com header.s=20221208 header.b=FFxn8NDb; 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 d15-20020a170906174f00b0098882e012dasi1322597eje.443.2023.07.11.00.21.02; Tue, 11 Jul 2023 00:21:25 -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=FFxn8NDb; 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 S229637AbjGKGrc (ORCPT + 99 others); Tue, 11 Jul 2023 02:47:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjGKGra (ORCPT ); Tue, 11 Jul 2023 02:47:30 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7391B134 for ; Mon, 10 Jul 2023 23:47:28 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fbaef9871cso8127563e87.0 for ; Mon, 10 Jul 2023 23:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20221208.gappssmtp.com; s=20221208; t=1689058047; x=1691650047; h=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=ADRu1k94Szm9V0evY8U5mOQEsmaGQsPDAea7XrGLJeI=; b=FFxn8NDbk1lxoec1Wakuv80G8tu8rb2Dtr9C84hZPr9TRy5ITcpxR1IYx1jC3HaM+h Kkj9lZr6D35Wzxo8fKA1jlL45BCp2upcrX/sZx4eGjzI7Z4hFUtekH6k/lSc/YfU5SR0 RIHdrOZaW55YLsHy7XjpuUv+ce0tVhZUNf9l3hYhTk8qWjFxOP1vvWLpecllmXqa7WEB CZ52wuPGSRsWNH4GT+luUbWOHqQWN7sQNNiKNteyxY1po17tCWKtRm+pZ0hmV1ZZoH93 9h5+4J9oncrBEr7UeAiVeQ64cgONZYt8Wr2cVDqHTrSqgW44rsfdMvLQnysoryNzIwcZ Avrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689058047; x=1691650047; h=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=ADRu1k94Szm9V0evY8U5mOQEsmaGQsPDAea7XrGLJeI=; b=YyHcc0wf3461Ys9UFkOTSgdPNQIxxfx0kmKYDl8OlgUxAHRleyEinLeiFZS6J1d5sv BI3MhV5M+CHjDJUGYCBx2LmSjJKuUQC9Ou1gWJkPNCrtAEihWvBfcUh2AC8G+eB0nI7X 5wL4BAktRk9s0iRpAeedSYbS47Od7/A1k8psjy+ri2YedPCnqJ+1hqbvSnRR4VLu2C+R 1Qt7fXvldrJ4q6sVOziiDfB4wKNyxszCdVQAUaVShE8b7p0O8hDwzB+MX6BIDs4sKIzI 1kyfmoKeHjLSkG2WPBbK7rUFk0tt0V1p6aorTqK3YTSvNUiRJd/R79UCHjsIIZBwys/J sCrA== X-Gm-Message-State: ABy/qLY5rsdfWazc4B8BaxXoO5ss22RVxDUlokdVGymsDDpXzKEwpFD4 mGAy1KMloimkKHdmetVwN1niYsnQDKSMsvqea30= X-Received: by 2002:ac2:4f06:0:b0:4f6:2a02:fc1a with SMTP id k6-20020ac24f06000000b004f62a02fc1amr12549137lfr.17.1689058046058; Mon, 10 Jul 2023 23:47:26 -0700 (PDT) Received: from localhost ([185.108.254.55]) by smtp.gmail.com with ESMTPSA id u22-20020ac243d6000000b004fbbf9e58bbsm192834lfl.126.2023.07.10.23.47.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 23:47:25 -0700 (PDT) References: <20230706130930.64283-1-nmi@metaspace.dk> <20230706130930.64283-2-nmi@metaspace.dk> <51b660f3-8145-d35e-87b4-d9ac0623606d@kernel.org> User-agent: mu4e 1.10.4; emacs 28.2.50 From: "Andreas Hindborg (Samsung)" To: Christoph Hellwig Cc: Ming Lei , Damien Le Moal , open list , "open list:BLOCK LAYER" , Minwoo Im , Matias Bjorling , gost.dev@samsung.com, Jens Axboe , Aravind Ramesh , Johannes Thumshirn , Hans Holmberg Subject: Re: [PATCH v6 1/3] ublk: add opcode offsets for DRV_IN/DRV_OUT Date: Tue, 11 Jul 2023 08:23:40 +0200 In-reply-to: Message-ID: <87a5w3ymff.fsf@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain 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 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 Christoph Hellwig writes: > On Mon, Jul 10, 2023 at 05:27:23PM +0800, Ming Lei wrote: >> Yes, that is exactly what we are doing. >> >> The added macros of UBLK_IO_OP_DRV_IN_START[END] are just for supporting >> more ublk passthrough commands, and the motivation is for running >> check(such as buffer direction) in two sides easily. >> >> However, I think it is just fine to delay to add it until introducing >> the 2nd ublk pt command. > > The concept of a passthrough command just doesn't make sense for an > on the wire protocol. It is a linux concept that distinguished between > the Linux synthetic command like REQ_OP_READ/WRITE/DISCARD etc that are > well defined and can be used by file systems and other consumers, and > ways to pass through arbitrary blobs only known by the driver. Yet most on-the-wire protocols for actual hardware does support this some way or another. But I agree that for ublk it is probably not needed. It would probably be easier to talk to the ublk daemon through other means than passthrough in the block layer. > > Anything in a wire protocol needs to be very well defined in that > protocol completely indpendent of what Linux concept it maps to. > Especially as the Linux concepts can change, and fairly frequently do. I somewhat agree in the sense that for consistency, we should either move zone management commands to the DRV_OUT range OR move report_zones out of this special range and just next to the zone management operations. I like the latter option better, and I would love to see the block layer do the same at some point. It feels backwards that report_zones get special treatment all over the place. Best regards, Andreas