From: David Sterba <dsterba@suse.cz>
To: Gu Jinxiang <gujx@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: mkfs: Replace number with enum
Date: Tue, 22 Aug 2017 16:04:04 +0200 [thread overview]
Message-ID: <20170822140404.GV2866@twin.jikos.cz> (raw)
In-Reply-To: <20170821173948.GU2866@twin.jikos.cz>
On Mon, Aug 21, 2017 at 07:39:49PM +0200, David Sterba wrote:
> > +/* roots: root tree, extent tree, chunk tree, dev tree, fs tree, csum tree */
> > +enum btrfs_mkfs_block {
> > + SUPER_BLOCK = 0,
> > + ROOT_TREE,
> > + EXTENT_TREE,
> > + CHUNK_TREE,
> > + DEV_TREE,
> > + FS_TREE,
> > + CSUM_TREE,
> > + BLOCK_COUNT
BLOCK_COUNT is 7
> > +};
> > +
> > struct btrfs_mkfs_config {
> > /* Label of the new filesystem */
> > const char *label;
> > @@ -43,7 +55,7 @@ struct btrfs_mkfs_config {
> > /* Output fields, set during creation */
> >
> > /* Logical addresses of superblock [0] and other tree roots */
> > - u64 blocks[8];
> > + u64 blocks[BLOCK_COUNT];
This replaces 8 with 7 then, so the fs_uuid gets overwritten, can be
also caught by simply running 'make test-mkfs'.
> > char fs_uuid[BTRFS_UUID_UNPARSED_SIZE];
> > char chunk_uuid[BTRFS_UUID_UNPARSED_SIZE];
> >
> > --
> > 2.9.4
> >
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-08-22 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 9:59 [PATCH] btrfs-progs: mkfs: Replace number with enum Gu Jinxiang
2017-08-21 17:39 ` David Sterba
2017-08-22 14:04 ` David Sterba [this message]
2017-08-23 2:32 ` Gu, Jinxiang
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=20170822140404.GV2866@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=gujx@cn.fujitsu.com \
--cc=linux-btrfs@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 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.