xfs: fix xfs_fsblock_t tracing
Using a static buffer in xfs_fmtfsblock means we can corrupt traces if multiple CPUs hit this code path at the same. Just remove xfs_fmtfsblock for now and print the block number purely numerical. If we want the NULLFSBLOCK and NULLSTARTBLOCK formatting back the best way would be a decoding plugin in the trace-cmd userspace command. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:

committed by
Alex Elder

parent
024910cbac
commit
f7008d0aeb
@@ -51,22 +51,6 @@
|
||||
#include "quota/xfs_dquot_item.h"
|
||||
#include "quota/xfs_dquot.h"
|
||||
|
||||
/*
|
||||
* Format fsblock number into a static buffer & return it.
|
||||
*/
|
||||
STATIC char *xfs_fmtfsblock(xfs_fsblock_t bno)
|
||||
{
|
||||
static char rval[50];
|
||||
|
||||
if (bno == NULLFSBLOCK)
|
||||
sprintf(rval, "NULLFSBLOCK");
|
||||
else if (isnullstartblock(bno))
|
||||
sprintf(rval, "NULLSTARTBLOCK(%lld)", startblockval(bno));
|
||||
else
|
||||
sprintf(rval, "%lld", (xfs_dfsbno_t)bno);
|
||||
return rval;
|
||||
}
|
||||
|
||||
/*
|
||||
* We include this last to have the helpers above available for the trace
|
||||
* event implementations.
|
||||
|
Reference in New Issue
Block a user