public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Damien Le Moal <dlemoal@kernel.org>,
	io-uring@vger.kernel.org
Subject: Re: [PATCH 3/5] liburing: add io_uring_prep_cmd_zone_reset
Date: Wed, 12 Aug 2026 17:50:07 +0200	[thread overview]
Message-ID: <20260812155007.GA10483@lst.de> (raw)
In-Reply-To: <CADUfDZoGWymYvu43voXCFuO_1_bZwte=wFhKVUKfzmM9M7Dr3w@mail.gmail.com>

On Wed, Aug 12, 2026 at 08:43:16AM -0700, Caleb Sander Mateos wrote:
> On Wed, Aug 12, 2026 at 6:17 AM Christoph Hellwig <hch@lst.de> wrote:
> >
> > Add a helper for io_uring zone_reset_all commands.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> > ---
> >  configure              | 31 +++++++++++++++++++++++++++++++
> >  src/include/liburing.h |  7 +++++++
> >  src/liburing-ffi.map   |  5 +++++
> >  3 files changed, 43 insertions(+)
> >
> > diff --git a/configure b/configure
> > index b953eddd6ddc..8c5ca801f487 100755
> > --- a/configure
> > +++ b/configure
> > @@ -469,6 +469,21 @@ if compile_prog "" "" "discard command"; then
> >  fi
> >  print_config "discard command support" "$discard_cmd"
> >
> > +##########################################
> > +# Check block zone_reset_all cmd support
> > +zone_reset_all_cmd="no"
> > +cat > $TMPC << EOF
> > +#include <linux/blkdev.h>
> > +int main(void)
> > +{
> > +  return BLOCK_URING_CMD_ZONE_RESET_ALL;
> > +}
> > +EOF
> > +if compile_prog "" "" "zone_reset_all command"; then
> > +  zone_reset_all_cmd="yes"
> > +fi
> > +print_config "zone_reset_all command support" "$zone_reset_all_cmd"
> > +
> >  ##########################################
> >  # Check idtype_t support
> >  has_idtype_t="no"
> > @@ -797,6 +812,22 @@ else cat >> $compat_h << EOF
> >  EOF
> >  fi
> >
> > +if test "$zone_reset_all_cmd" != "yes"; then
> > +cat >> $compat_h << EOF
> > +
> > +#include <linux/ioctl.h>
> > +
> > +#ifndef BLOCK_URING_CMD_ZONE_RESET_ALL
> > +#define BLOCK_URING_CMD_ZONE_RESET_ALL                 _IO(0x12, 1)
> > +#endif
> > +
> > +EOF
> > +else cat >> $compat_h << EOF
> > +#include <linux/blkdev.h>
> > +
> > +EOF
> > +fi
> > +
> >  cat >> $compat_h << EOF
> >  #endif
> >  EOF
> > diff --git a/src/include/liburing.h b/src/include/liburing.h
> > index 0188937b0de4..214c7778d6a7 100644
> > --- a/src/include/liburing.h
> > +++ b/src/include/liburing.h
> > @@ -1685,6 +1685,13 @@ IOURINGINLINE void io_uring_prep_cmd_discard(struct io_uring_sqe *sqe,
> >         sqe->addr3 = nbytes;
> >  }
> >
> > +IOURINGINLINE void io_uring_prep_cmd_zone_reset_all(struct io_uring_sqe *sqe,
> > +                                                   int fd)
> > +       LIBURING_NOEXCEPT
> > +{
> > +       io_uring_prep_uring_cmd(sqe, BLOCK_URING_CMD_ZONE_RESET_ALL, fd);
> > +}
> > +
> >  IOURINGINLINE void io_uring_prep_pipe(struct io_uring_sqe *sqe, int *fds,
> >                                       int pipe_flags)
> >  {
> > diff --git a/src/liburing-ffi.map b/src/liburing-ffi.map
> > index bd7bc64416d3..fc9701b63907 100644
> > --- a/src/liburing-ffi.map
> > +++ b/src/liburing-ffi.map
> > @@ -275,3 +275,8 @@ LIBURING_2.15 {
> >                 io_uring_register_zcrx_ctrl;
> >                 io_uring_register_query;
> >  } LIBURING_2.14;
> > +
> > +LIBURING_2.16 {
> > +       global:
> > +               io_uring_prep_cmd_zone_reset_all;
> > +} LIBURING_2.14;
> 
> Mentioned this on v1 too, but I think this should inherit from LIBURING_2.15.

And I do remember it now that you mention it again, not sure why it
splitted through sorry.

  reply	other threads:[~2026-08-12 15:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 13:12 support ZONE_RESET_ALL in liburing v2 Christoph Hellwig
2026-08-12 13:12 ` [PATCH 1/5] configure: shorten the message for the discard command Christoph Hellwig
2026-08-12 13:12 ` [PATCH 2/5] man: fixups for io_uring_prep_cmd_discard.3 Christoph Hellwig
2026-08-12 13:12 ` [PATCH 3/5] liburing: add io_uring_prep_cmd_zone_reset Christoph Hellwig
2026-08-12 15:43   ` Caleb Sander Mateos
2026-08-12 15:50     ` Christoph Hellwig [this message]
2026-08-12 13:12 ` [PATCH 4/5] man: add io_uring_prep_cmd_zone_reset_all.3 man page Christoph Hellwig
2026-08-12 13:12 ` [PATCH 5/5] test: add zone_reset_all command test Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2026-08-17  8:28 support ZONE_RESET_ALL in liburing v3 Christoph Hellwig
2026-08-17  8:28 ` [PATCH 3/5] liburing: add io_uring_prep_cmd_zone_reset Christoph Hellwig

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=20260812155007.GA10483@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=dlemoal@kernel.org \
    --cc=io-uring@vger.kernel.org \
    /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