From: Adam Borowski <kilobyte@angband.pl>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: move the define for superblock magic to uapi
Date: Fri, 5 Oct 2018 20:10:32 +0200 [thread overview]
Message-ID: <20181005181032.pal6fwt7ebijvqu4@angband.pl> (raw)
In-Reply-To: <20181005160600.GR19324@magnolia>
On Fri, Oct 05, 2018 at 09:06:00AM -0700, Darrick J. Wong wrote:
> On Fri, Oct 05, 2018 at 02:27:41PM +0200, Adam Borowski wrote:
> > Needed by users of fstatfs().
>
> NAK.
>
> The XFS superblock magic number is part of the on-disk format definition
> of XFS. It belongs with all the other on-disk format definitions in this
> file.
>
> I don't think it's a good idea for userspace to associate s_magic with
> userspace API feature sets, though the cat's long escaped the bag on
> that one.
>
> With that being reality, "the XFS superblock magic number" has a
> different semantic meaning than "the agreed upon statfs.f_type value for
> XFS", which means the latter should have a different symbol name to
> reflect that difference.
Ie, you'd be ok with the same value to be defined in two places -- do I
understand this right?
> > --- a/fs/xfs/libxfs/xfs_format.h
> > -#define XFS_SB_MAGIC 0x58465342 /* 'XFSB' */
> > +#define XFS_SB_MAGIC XFS_SUPER_MAGIC /* 0x58465342 = 'XFSB' */
> > --- a/include/uapi/linux/magic.h
> > #define JFFS2_SUPER_MAGIC 0x72b6
> > +#define XFS_SUPER_MAGIC 0x58465342 /* "XFSB" */
> > #define PSTOREFS_MAGIC 0x6165676C
Meow!
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢰⠒⠀⣿⡁ 10 people enter a bar: 1 who understands binary,
⢿⡄⠘⠷⠚⠋⠀ 1 who doesn't, D who prefer to write it as hex,
⠈⠳⣄⠀⠀⠀⠀ and 1 who narrowly avoided an off-by-one error.
next prev parent reply other threads:[~2018-10-06 1:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 12:27 [PATCH] xfs: move the define for superblock magic to uapi Adam Borowski
2018-10-05 16:06 ` Darrick J. Wong
2018-10-05 18:10 ` Adam Borowski [this message]
2018-10-05 18:17 ` Darrick J. Wong
2018-10-05 18:23 ` Darrick J. Wong
2018-10-05 23:40 ` Dave Chinner
2018-10-06 22:08 ` [PATCH v2] xfs: add a define for statfs " Adam Borowski
2018-10-08 22:31 ` Darrick J. Wong
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=20181005181032.pal6fwt7ebijvqu4@angband.pl \
--to=kilobyte@angband.pl \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@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.