From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Damien Le Moal <dlemoal@kernel.org>,
Andreas Hindborg <a.hindborg@samsung.com>
Subject: Re: [PATCH V2] ublk: zoned: support REQ_OP_ZONE_RESET_ALL
Date: Thu, 10 Aug 2023 14:22:50 +0000 [thread overview]
Message-ID: <ZNTytlego591Zmin@x1-carbon> (raw)
In-Reply-To: <ZNTtbpNCiXPvRlvI@fedora>
On Thu, Aug 10, 2023 at 10:00:14PM +0800, Ming Lei wrote:
> On Thu, Aug 10, 2023 at 01:10:30PM +0000, Niklas Cassel wrote:
> > On Thu, Aug 10, 2023 at 08:43:26PM +0800, Ming Lei wrote:
(snip)
> UBLK_IO_OP_ZONE_* is part of ublk UAPI, but REQ_OP_ZONE_* is just kernel
> internal definition which may be changed time by time, so we can't use
> REQ_OP_ZONE_* directly.
>
> Here you can think of UBLK_IO_OP_ZONE_* as interface between driver and
> hardware, so UBLK_IO_OP_ZONE_* has to be defined independently.
>
> > but if you want to keep this pattern, then perhaps you want
> > to define UBLK_IO_OP_ZONE_RESET_ALL to 17.
>
> Why do you think that 17 is better than 14?
I never said that it was better :)
I even said: "I don't see any obvious advantage of keeping them the same" :)
Just that it would follow the existing pattern of keeping
UBLK_IO_OP_ZONE_* in sync with REQ_OP_ZONE_*.
>
> I'd rather use 14 to fill the hole, meantime the two ZONE_RESET OPs
> can be kept together.
Ok, but then, considering that UBLK_IO_OP_ZONE_* is not part of any official
kernel release, and that the highest UBLK_IO_OP is currently defined as 5:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ublk_cmd.h?h=v6.5-rc5#n237
why not define:
+#define UBLK_IO_OP_ZONE_OPEN 6
+#define UBLK_IO_OP_ZONE_CLOSE 7
+#define UBLK_IO_OP_ZONE_FINISH 8
+#define UBLK_IO_OP_ZONE_APPEND 9
+#define UBLK_IO_OP_ZONE_RESET 10
+#define UBLK_IO_OP_ZONE_RESET_ALL 11
instead of, like it currently is in linux-block/for-next (this patch included):
+#define UBLK_IO_OP_ZONE_OPEN 10
+#define UBLK_IO_OP_ZONE_CLOSE 11
+#define UBLK_IO_OP_ZONE_FINISH 12
+#define UBLK_IO_OP_ZONE_APPEND 13
+#define UBLK_IO_OP_ZONE_RESET_ALL 14
+#define UBLK_IO_OP_ZONE_RESET 15
Because, even after this patch, you would still have a hole between
UBLK_IO_OP_ value 5 and 10.
Kind regards,
Niklas
next prev parent reply other threads:[~2023-08-10 14:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 12:43 [PATCH V2] ublk: zoned: support REQ_OP_ZONE_RESET_ALL Ming Lei
2023-08-10 13:10 ` Niklas Cassel
2023-08-10 14:00 ` Ming Lei
2023-08-10 14:22 ` Niklas Cassel [this message]
2023-08-10 14:47 ` Ming Lei
2023-08-10 15:09 ` Niklas Cassel
2023-08-14 2:01 ` Ming Lei
2023-08-21 2:16 ` Ming Lei
2023-08-21 2:25 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZNTytlego591Zmin@x1-carbon \
--to=niklas.cassel@wdc.com \
--cc=a.hindborg@samsung.com \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox