From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: use offsetof() in place of offset macros for __xfsstats
Date: Thu, 11 Oct 2018 08:28:56 +1100 [thread overview]
Message-ID: <20181010212856.GL6311@dastard> (raw)
In-Reply-To: <20181010150210.GQ28243@magnolia>
On Wed, Oct 10, 2018 at 08:02:10AM -0700, Darrick J. Wong wrote:
> On Wed, Oct 10, 2018 at 04:58:53PM +0200, Carlos Maiolino wrote:
> > > > uint32_t xs_rmap_2[__XBTS_MAX];
> > > > -#define XFSSTAT_END_REFCOUNT (XFSSTAT_END_RMAP_V2 + __XBTS_MAX)
> > > > uint32_t xs_refcbt_2[__XBTS_MAX];
> > > > -#define XFSSTAT_END_XQMSTAT (XFSSTAT_END_REFCOUNT + 6)
> > > > uint32_t xs_qm_dqreclaims;
> > > > uint32_t xs_qm_dqreclaim_misses;
> > > > uint32_t xs_qm_dquot_dups;
> > > > uint32_t xs_qm_dqcachemisses;
> > > > uint32_t xs_qm_dqcachehits;
> > > > uint32_t xs_qm_dqwants;
> > > > -#define XFSSTAT_END_QM (XFSSTAT_END_XQMSTAT+2)
> > > > uint32_t xs_qm_dquot;
> > > > uint32_t xs_qm_dquot_unused;
> > > > /* Extra precision counters */
> > > > @@ -163,10 +139,12 @@ struct __xfsstats {
> > > > uint64_t xs_read_bytes;
> > > > };
> > > >
> > > > +#define xfsstats_offset(f) (offsetof(struct __xfsstats, f)/sizeof(uint32_t))
> > >
> > > Goes past 80 columns, but otherwise looks ok,
> > >
> > > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Ops, sorry, I traded readability+tabs X 80 columns, I think changing the tabs
> > for spaces is enough to fix it.
> >
> > Do you want me to send it again?
>
> <shrug> If Dave elects to fix it on the way in that's fine with me.
>
> Though I guess so long as I'm being pedantic about things that 'f' ought
> to be parentheses-wrapped too, e.g.
>
> #define xfsstats_offset(f) (offsetof(struct __xfsstats, (f)) / sizeof(uint32_t))
I'll clean it up on merge.
Thanks,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-10-11 4:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 12:37 [PATCH 0/2] xfs stats fixes - V2 Carlos Maiolino
2018-10-10 12:37 ` [PATCH 1/2] xfs: Fix xqmstats offsets in /proc/fs/xfs/xqmstat Carlos Maiolino
2018-10-10 12:37 ` [PATCH 2/2] xfs: use offsetof() in place of offset macros for __xfsstats Carlos Maiolino
2018-10-10 14:49 ` Darrick J. Wong
2018-10-10 14:58 ` Carlos Maiolino
2018-10-10 15:02 ` Darrick J. Wong
2018-10-10 21:28 ` Dave Chinner [this message]
2018-10-11 5:29 ` Dave Chinner
2018-10-11 14:04 ` Eric Sandeen
2018-10-12 7:01 ` Dave Chinner
2018-10-12 15:00 ` Eric Sandeen
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=20181010212856.GL6311@dastard \
--to=david@fromorbit.com \
--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 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).