From: "Darrick J. Wong" <djwong@kernel.org>
To: Andrey Albershteyn <aalbersh@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
Andrey Albershteyn <aalbersh@kernel.org>,
Damien Le Moal <dlemoal@kernel.org>,
Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 1/4] xfs: use blkdev_report_zones_cached()
Date: Tue, 20 Jan 2026 09:31:19 -0800 [thread overview]
Message-ID: <20260120173119.GS15551@frogsfrogsfrogs> (raw)
In-Reply-To: <yw6bc76kuh56avbb5nxlvdkrattk57s5z65defzbdoohp5wtvt@h346oio32jdk>
On Tue, Jan 20, 2026 at 03:28:29PM +0100, Andrey Albershteyn wrote:
> On 2026-01-09 17:22:52, Christoph Hellwig wrote:
> > From: Damien Le Moal <dlemoal@kernel.org>
> >
> > Source kernel commit: e04ccfc28252f181ea8d469d834b48e7dece65b2
> >
> > Modify xfs_mount_zones() to replace the call to blkdev_report_zones()
> > with blkdev_report_zones_cached() to speed-up mount operations.
> > Since this causes xfs_zone_validate_seq() to see zones with the
> > BLK_ZONE_COND_ACTIVE condition, this function is also modified to acept
> > this condition as valid.
> >
> > With this change, mounting a freshly formatted large capacity (30 TB)
> > SMR HDD completes under 2s compared to over 4.7s before.
> >
> > Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> > Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
> > Signed-off-by: Jens Axboe <axboe@kernel.dk>
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > ---
> > include/platform_defs.h | 4 ++++
> > libxfs/xfs_zones.c | 1 +
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/include/platform_defs.h b/include/platform_defs.h
> > index da966490b0f5..cfdaca642645 100644
> > --- a/include/platform_defs.h
> > +++ b/include/platform_defs.h
> > @@ -307,4 +307,8 @@ struct kvec {
> > size_t iov_len;
> > };
> >
> > +#ifndef BLK_ZONE_COND_ACTIVE /* added in Linux 6.19 */
> > +#define BLK_ZONE_COND_ACTIVE 0xff
>
> hmm I think #ifndef doesn't work for enum member. Compiling against
> linux 6.19-rc6:
>
> ../include/platform_defs.h:311:33: error: expected identifier before numeric constant
> 311 | #define BLK_ZONE_COND_ACTIVE 0xff
> | ^~~~
> /linux-headers-v6.19-rc6/include/linux/blkzoned.h:84:9: note: in expansion of macro ‘BLK_ZONE_COND_ACTIVE’
> 84 | BLK_ZONE_COND_ACTIVE = 0xFF,
> | ^~~~~~~~~~~~~~~~~~~~
I hacked around this very crudely:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git/commit/?h=djwong-wtf&id=d5d9b4bd2da95c7b9429112f1c1098a62f155270
Though I think one of hch's fix patches fixed that. I cannot post a
lore link because the #@!%)*&!%!!! anubis b@%#%!!! is completely broken
and will not let me in. But we did the review for the kernel-side fixes
within the last couple of weeks.
--D
>
> --
> - Andrey
>
>
next prev parent reply other threads:[~2026-01-20 17:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 16:22 enable cached zone report v4 Christoph Hellwig
2026-01-09 16:22 ` [PATCH 1/4] xfs: use blkdev_report_zones_cached() Christoph Hellwig
2026-01-20 14:28 ` Andrey Albershteyn
2026-01-20 17:31 ` Darrick J. Wong [this message]
2026-01-21 6:49 ` Christoph Hellwig
2026-01-27 16:39 ` [PATCH] libfrog: adjust header order for BLK_ZONE_COND_ACTIVE #ifndef check Andrey Albershteyn
2026-01-27 16:43 ` Christoph Hellwig
2026-01-27 16:55 ` Andrey Albershteyn
2026-01-27 16:59 ` Andrey Albershteyn
2026-01-27 17:01 ` Christoph Hellwig
2026-01-09 16:22 ` [PATCH 2/4] mkfs: remove unnecessary return value affectation Christoph Hellwig
2026-01-09 16:22 ` [PATCH 3/4] libfrog: lift common zone reporting code from mkfs and repair Christoph Hellwig
2026-01-09 16:31 ` Darrick J. Wong
2026-01-09 16:22 ` [PATCH 4/4] libfrog: enable cached report zones Christoph Hellwig
2026-01-09 16:32 ` Darrick J. Wong
2026-01-12 11:02 ` enable cached zone report v4 Damien Le Moal
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=20260120173119.GS15551@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@kernel.org \
--cc=aalbersh@redhat.com \
--cc=axboe@kernel.dk \
--cc=cem@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.