public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/6] xfs: move XFS_INODE_FORMAT_STR mappings to libxfs
Date: Tue, 18 Dec 2018 10:30:30 -0800	[thread overview]
Message-ID: <20181218183030.GB27208@magnolia> (raw)
In-Reply-To: <6bc5bc8d-e795-aaa0-2f00-f9878160333f@sandeen.net>

On Tue, Dec 18, 2018 at 11:24:45AM -0600, Eric Sandeen wrote:
> On 11/28/18 5:29 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Move XFS_INODE_FORMAT_STR to libxfs so that we don't forget to keep it
> > updated, and add necessary TRACE_DEFINE_ENUM.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Now that I think of it, just adding a /* for ftrace */ above the #define
> might be nice here and for the others, if you think it's appropriate, but:

Will do, and hopefully nobody else will trip over this silly ftrace bomb.

--D

> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> 
> > ---
> >  fs/xfs/libxfs/xfs_format.h |    7 +++++++
> >  fs/xfs/xfs_trace.h         |   10 +++++-----
> >  2 files changed, 12 insertions(+), 5 deletions(-)
> > 
> > 
> > diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> > index b15412e4c535..d8902114786d 100644
> > --- a/fs/xfs/libxfs/xfs_format.h
> > +++ b/fs/xfs/libxfs/xfs_format.h
> > @@ -925,6 +925,13 @@ typedef enum xfs_dinode_fmt {
> >  	XFS_DINODE_FMT_UUID		/* added long ago, but never used */
> >  } xfs_dinode_fmt_t;
> >  
> > +#define XFS_INODE_FORMAT_STR \
> > +	{ XFS_DINODE_FMT_DEV,		"dev" }, \
> > +	{ XFS_DINODE_FMT_LOCAL,		"local" }, \
> > +	{ XFS_DINODE_FMT_EXTENTS,	"extent" }, \
> > +	{ XFS_DINODE_FMT_BTREE,		"btree" }, \
> > +	{ XFS_DINODE_FMT_UUID,		"uuid" }
> > +
> >  /*
> >   * Inode minimum and maximum sizes.
> >   */
> > diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> > index 3f57002ca660..94e289aca220 100644
> > --- a/fs/xfs/xfs_trace.h
> > +++ b/fs/xfs/xfs_trace.h
> > @@ -1901,11 +1901,11 @@ TRACE_EVENT(xfs_dir2_leafn_moveents,
> >  	{ 0,	"target" }, \
> >  	{ 1,	"temp" }
> >  
> > -#define XFS_INODE_FORMAT_STR \
> > -	{ 0,	"invalid" }, \
> > -	{ 1,	"local" }, \
> > -	{ 2,	"extent" }, \
> > -	{ 3,	"btree" }
> > +TRACE_DEFINE_ENUM(XFS_DINODE_FMT_DEV);
> > +TRACE_DEFINE_ENUM(XFS_DINODE_FMT_LOCAL);
> > +TRACE_DEFINE_ENUM(XFS_DINODE_FMT_EXTENTS);
> > +TRACE_DEFINE_ENUM(XFS_DINODE_FMT_BTREE);
> > +TRACE_DEFINE_ENUM(XFS_DINODE_FMT_UUID);
> >  
> >  DECLARE_EVENT_CLASS(xfs_swap_extent_class,
> >  	TP_PROTO(struct xfs_inode *ip, int which),
> > 

  reply	other threads:[~2018-12-18 18:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 23:28 [PATCH 0/6] xfs-5.0: ftrace cleanups Darrick J. Wong
2018-11-28 23:28 ` [PATCH 1/6] xfs: fix symbolic enum printing in ftrace output Darrick J. Wong
2018-12-18 17:14   ` Eric Sandeen
2018-11-28 23:29 ` [PATCH 2/6] xfs: fix function pointer type in ftrace format Darrick J. Wong
2018-12-18 17:16   ` Eric Sandeen
2018-11-28 23:29 ` [PATCH 3/6] xfs: move XFS_AG_BTREE_CMP_FORMAT_STR mappings to libxfs Darrick J. Wong
2018-12-18 17:23   ` Eric Sandeen
2018-11-28 23:29 ` [PATCH 4/6] xfs: move XFS_INODE_FORMAT_STR " Darrick J. Wong
2018-12-18 17:24   ` Eric Sandeen
2018-12-18 18:30     ` Darrick J. Wong [this message]
2018-12-18 17:25   ` Eric Sandeen
2018-12-18 18:35     ` Darrick J. Wong
2018-11-28 23:29 ` [PATCH 5/6] xfs: stringify btree cursor types in ftrace output Darrick J. Wong
2018-12-18 17:21   ` Eric Sandeen
2018-12-18 17:27   ` Eric Sandeen
2018-12-18 18:35     ` Darrick J. Wong
2018-11-28 23:29 ` [PATCH 6/6] xfs: stringify scrub " Darrick J. Wong
2018-12-18 17:30   ` Eric Sandeen
2018-12-18 18:41     ` Darrick J. Wong
2018-12-18 20:31       ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2018-12-18 20:39 [PATCH v2 0/6] xfs: ftrace cleanups Darrick J. Wong
2018-12-18 20:39 ` [PATCH 4/6] xfs: move XFS_INODE_FORMAT_STR mappings to libxfs 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=20181218183030.GB27208@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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