From: Darrick J. Wong Date: Wed, 22 Jun 2022 19:28:52 +0000 (-0500) Subject: xfs: report "max_resp" used for min log size computation X-Git-Tag: v5.19.0-rc0~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3deaaa1fcf80995899b38847e49d9056249f31c9;p=thirdparty%2Fxfsprogs-dev.git xfs: report "max_resp" used for min log size computation Source kernel commit: 918247ce541995dba05391cf14d6061cf0844866 Move the tracepoint that computes the size of the transaction used to compute the minimum log size into xfs_log_get_max_trans_res so that we only have to compute this stuff once. Leave xfs_log_get_max_trans_res as a non-static function so that xfs_db can call it to report the results of the userspace computation of the same value to diagnose mkfs/kernel misinteractions. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/include/xfs_trace.h b/include/xfs_trace.h index 951ded3d5..683f578fa 100644 --- a/include/xfs_trace.h +++ b/include/xfs_trace.h @@ -195,6 +195,7 @@ #define trace_xfs_trans_read_buf(a) ((void) 0) #define trace_xfs_trans_commit(a,b) ((void) 0) #define trace_xfs_trans_resv_calc_minlogsize(a,b,c) ((void) 0) +#define trace_xfs_log_get_max_trans_res(a,b) ((void) 0) #define trace_xfs_defer_cancel(a,b) ((void) 0) #define trace_xfs_defer_pending_commit(a,b) ((void) 0) diff --git a/libxfs/xfs_log_rlimit.c b/libxfs/xfs_log_rlimit.c index 44300abcd..1a55618fe 100644 --- a/libxfs/xfs_log_rlimit.c +++ b/libxfs/xfs_log_rlimit.c @@ -76,6 +76,7 @@ xfs_log_get_max_trans_res( *max_resp = resv.tr_attrsetm; /* struct copy */ max_resp->tr_logres = attr_space; } + trace_xfs_log_get_max_trans_res(mp, max_resp); } /*