linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: clean up IRELE/iput callsites
Date: Wed, 25 Jul 2018 12:12:21 -0700	[thread overview]
Message-ID: <20180725191221.GT4813@magnolia> (raw)
In-Reply-To: <20180725045823.GB31006@infradead.org>

On Tue, Jul 24, 2018 at 09:58:23PM -0700, Christoph Hellwig wrote:
> On Tue, Jul 24, 2018 at 06:14:58PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Replace the IRELE macro with a proper function so that we can do proper
> > typechecking and so that we can stop open-coding iput in scrub, which
> > means that we'll be able to ftrace inode lifetimes going through scrub
> > correctly.
> 
> Why do we need a function to be able to use IRELE in scrub?

In short, the tracepoint in IRELE.

Early on in scrub's development I decided to give xfs_scrub its own
tracepoints.  I didn't want the scrub C files to have to include all the
xfs headers needed to support xfs_trace.h and I also didn't want to
shove even more tracepoint into that file because it's already a
horrible macro mess.  I also didn't want to have to include all the
scrub definitions treewide since you can leave scrub off in Kconfig.

Unfortunately, the ftrace macros also didn't like having multiple trace
headers for a single TRACE_SUBSYSTEM (and the gcc traceback when I tried
it was 50+ screens long and totally undebuggable) so it was easier to
give scrub its own tracepoint subsystem separate from regular XFS.  A
downside of that is that xfs and xfs_scrub cannot link to each other's
tracepoints, so until now scrub just open-coded calls to iput, which
made it hard to debug iget/iput leaks in scrub.

That wasn't a big deal, but since I was cleaning up the inode macros I
figured I might as well switch everyone to xfs_irele().

--D

> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-07-25 20:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  1:14 [PATCH 0/2] xfs-4.19: inode cleanups Darrick J. Wong
2018-07-25  1:14 ` [PATCH 1/2] xfs: kill IHOLD Darrick J. Wong
2018-07-25  3:06   ` Carlos Maiolino
2018-07-25  4:56   ` Christoph Hellwig
2018-07-25 16:24     ` Darrick J. Wong
2018-07-25  1:14 ` [PATCH 2/2] xfs: clean up IRELE/iput callsites Darrick J. Wong
2018-07-25  4:00   ` Carlos Maiolino
2018-07-25 16:25     ` Darrick J. Wong
2018-07-25  4:58   ` Christoph Hellwig
2018-07-25 19:12     ` Darrick J. Wong [this message]
2018-07-25 11:26   ` Brian Foster
2018-07-25 19:45     ` 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=20180725191221.GT4813@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --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).