]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: report "max_resp" used for min log size computation
authorDarrick J. Wong <djwong@kernel.org>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
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 <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_trace.h
libxfs/xfs_log_rlimit.c

index 951ded3d5bf439922fa7028fc54d6c7efe02759a..683f578fae9eace5041ca32f132c1b4012b19071 100644 (file)
 #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)
index 44300abcd4a36c3f062c159b8d531a9868ae5b73..1a55618fe9b88783bcd86c7c693fd8f4a96938b1 100644 (file)
@@ -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);
 }
 
 /*