Skip to content

Commit

Permalink
xfs: start documenting common units and tags used in tracepoints
Browse files Browse the repository at this point in the history
Because there are a lot of tracepoints that express numeric data with
an associated unit and tag, document what they are to help everyone else
keep these thigns straight.

Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
  • Loading branch information
Darrick J. Wong committed Aug 19, 2021
1 parent c03e4b9 commit e5f2e54
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/xfs/scrub/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
/*
* Copyright (C) 2017 Oracle. All Rights Reserved.
* Author: Darrick J. Wong <[email protected]>
*
* NOTE: none of these tracepoints shall be considered a stable kernel ABI
* as they can change at any time. See xfs_trace.h for documentation of
* specific units found in tracepoint output.
*/
#undef TRACE_SYSTEM
#define TRACE_SYSTEM xfs_scrub
Expand Down
35 changes: 35 additions & 0 deletions fs/xfs/xfs_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@
/*
* Copyright (c) 2009, Christoph Hellwig
* All Rights Reserved.
*
* NOTE: none of these tracepoints shall be considered a stable kernel ABI
* as they can change at any time.
*
* Current conventions for printing numbers measuring specific units:
*
* agno: allocation group number
*
* agino: per-AG inode number
* ino: filesystem inode number
*
* agbno: per-AG block number in fs blocks
* startblock: physical block number for file mappings. This is either a
* segmented fsblock for data device mappings, or a rfsblock
* for realtime device mappings
* fsbcount: number of blocks in an extent, in fs blocks
*
* daddr: physical block number in 512b blocks
* bbcount: number of blocks in a physical extent, in 512b blocks
*
* owner: reverse-mapping owner, usually inodes
*
* fileoff: file offset, in fs blocks
* pos: file offset, in bytes
* bytecount: number of bytes
*
* disize: ondisk file size, in bytes
* isize: incore file size, in bytes
*
* forkoff: inode fork offset, in bytes
*
* ireccount: number of inode records
*
* Numbers describing space allocations (blocks, extents, inodes) should be
* formatted in hexadecimal.
*/
#undef TRACE_SYSTEM
#define TRACE_SYSTEM xfs
Expand Down

0 comments on commit e5f2e54

Please sign in to comment.