diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-17 21:37:33 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-26 15:38:23 -0700 |
commit | 52c732eee78b47ac2eb828b1c7fa611cd37b0090 (patch) | |
tree | b84f6d406680b3bb5a9b6de2d70ab7c1dfe04993 /fs/xfs/xfs_linux.h | |
parent | f135761a73b18877bdfb44018fe993172c7be203 (diff) | |
download | linux-52c732eee78b47ac2eb828b1c7fa611cd37b0090.tar.gz linux-52c732eee78b47ac2eb828b1c7fa611cd37b0090.tar.bz2 linux-52c732eee78b47ac2eb828b1c7fa611cd37b0090.zip |
xfs: refactor btree block header checking functions
Refactor the btree block header checks to have an internal function that
returns the address of the failing check without logging errors. The
scrubber will call the internal function, while the external version
will maintain the current logging behavior.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_linux.h')
-rw-r--r-- | fs/xfs/xfs_linux.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h index dcd1292664b3..00a5efeec496 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h @@ -142,6 +142,13 @@ typedef __u32 xfs_nlink_t; #define SYNCHRONIZE() barrier() #define __return_address __builtin_return_address(0) +/* + * Return the address of a label. Use barrier() so that the optimizer + * won't reorder code to refactor the error jumpouts into a single + * return, which throws off the reported address. + */ +#define __this_address ({ __label__ __here; __here: barrier(); &&__here; }) + #define XFS_PROJID_DEFAULT 0 #define MIN(a,b) (min(a,b)) |