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