From: Naohiro Aota <naohiro.aota@wdc.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
Damien Le Moal <damien.lemoal@wdc.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH v2 1/3] blkid: implement zone-aware probing
Date: Thu, 15 Apr 2021 00:03:50 +0900 [thread overview]
Message-ID: <20210414150350.srqsmzyoscec6phy@naota-xeon> (raw)
In-Reply-To: <20210414133101.p5amev6tkfroiyw5@ws.net.home>
On Wed, Apr 14, 2021 at 03:31:01PM +0200, Karel Zak wrote:
> On Wed, Apr 14, 2021 at 10:33:37AM +0900, Naohiro Aota wrote:
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -302,6 +302,7 @@ AC_CHECK_HEADERS([ \
> > lastlog.h \
> > libutil.h \
> > linux/btrfs.h \
> > + linux/blkzoned.h \
>
> unnecessary, there is already AC_CHECK_HEADERS([linux/blkzoned.h]) on
> another place.
Ah, I missed that. I will drop it.
> > linux/capability.h \
> > linux/cdrom.h \
> > linux/falloc.h \
> > diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h
> > index a3fe6748a969..e3a160aa97c0 100644
> > --- a/libblkid/src/blkidP.h
> > +++ b/libblkid/src/blkidP.h
> > @@ -150,6 +150,10 @@ struct blkid_idmag
> > const char *hoff; /* hint which contains byte offset to kboff */
> > long kboff; /* kilobyte offset of superblock */
> > unsigned int sboff; /* byte offset within superblock */
> > +
> > + int is_zoned; /* indicate magic location is calcluated based on zone position */
> > + long zonenum; /* zone number which has superblock */
> > + long kboff_inzone; /* kilobyte offset of superblock in a zone */
>
> It would be better to use 'flags' struct field and
>
> #define BLKID_FL_ZONED_DEV (1 << 6)
>
> like we use for another stuff.
BLKID_FL_* flags looks like to indicate a device's property. Instead,
this one indicates a magic is placed relative to a zone. I do not see
blkid_idmag is currently using "flags" filed. Should we really add it
and follow the flag style? I thought, we can do it later when other
use case exists.
> > diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
> > index a47a8720d4ac..9d180aab5242 100644
> > --- a/libblkid/src/probe.c
> > +++ b/libblkid/src/probe.c
> > @@ -94,6 +94,9 @@
> > #ifdef HAVE_LINUX_CDROM_H
> > #include <linux/cdrom.h>
> > #endif
> > +#ifdef HAVE_LINUX_BLKZONED_H
> > +#include <linux/blkzoned.h>
> > +#endif
> > #ifdef HAVE_SYS_STAT_H
> > #include <sys/stat.h>
> > #endif
> > @@ -897,6 +900,7 @@ int blkid_probe_set_device(blkid_probe pr, int fd,
> > pr->wipe_off = 0;
> > pr->wipe_size = 0;
> > pr->wipe_chain = NULL;
> > + pr->zone_size = 0;
>
> you also need to update blkid_clone_probe() function
Will do. I completely missed that. Thanks.
> Karel
>
> --
> Karel Zak <kzak@redhat.com>
> http://karelzak.blogspot.com
>
next prev parent reply other threads:[~2021-04-14 15:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 1:33 [PATCH v2 0/3] implement zone-aware probing/wiping for zoned btrfs Naohiro Aota
2021-04-14 1:33 ` [PATCH v2 1/3] blkid: implement zone-aware probing Naohiro Aota
2021-04-14 9:14 ` Damien Le Moal
2021-04-14 9:17 ` Johannes Thumshirn
2021-04-14 13:31 ` Karel Zak
2021-04-14 15:03 ` Naohiro Aota [this message]
2021-04-14 1:33 ` [PATCH v2 2/3] blkid: add magic and probing for zoned btrfs Naohiro Aota
2021-04-14 9:49 ` Johannes Thumshirn
2021-04-14 13:47 ` Karel Zak
2021-04-14 15:08 ` Naohiro Aota
2021-04-16 15:52 ` David Sterba
2021-04-26 1:38 ` Naohiro Aota
2021-04-14 1:33 ` [PATCH v2 3/3] blkid: support zone reset for wipefs Naohiro Aota
2021-04-14 9:13 ` Damien Le Moal
2021-04-14 9:50 ` Johannes Thumshirn
2021-04-14 13:57 ` Karel Zak
2021-04-16 16:04 ` David Sterba
2021-04-14 14:09 ` [PATCH v2 0/3] implement zone-aware probing/wiping for zoned btrfs Karel Zak
2021-04-14 22:04 ` 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=20210414150350.srqsmzyoscec6phy@naota-xeon \
--to=naohiro.aota@wdc.com \
--cc=damien.lemoal@wdc.com \
--cc=johannes.thumshirn@wdc.com \
--cc=kzak@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=util-linux@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;
as well as URLs for NNTP newsgroup(s).