Re: [PATCH v6 1/3] ublk: add opcode offsets for DRV_IN/DRV_OUT
From: Christoph Hellwig
Date: Mon Jul 10 2023 - 02:52:48 EST
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.