Skip to content

Commit b2ae3a9

Browse files
Dave ChinnerDarrick J. Wong
authored andcommitted
xfs: need to see iclog flags in tracing
Because I cannot tell if the NEED_FLUSH flag is being set correctly by the log force and CIL push machinery without it. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent d8f4c2d commit b2ae3a9

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

fs/xfs/xfs_log_priv.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ enum xlog_iclog_state {
5959
{ XLOG_STATE_DIRTY, "XLOG_STATE_DIRTY" }, \
6060
{ XLOG_STATE_IOERROR, "XLOG_STATE_IOERROR" }
6161

62+
/*
63+
* In core log flags
64+
*/
65+
#define XLOG_ICL_NEED_FLUSH (1 << 0) /* iclog needs REQ_PREFLUSH */
66+
#define XLOG_ICL_NEED_FUA (1 << 1) /* iclog needs REQ_FUA */
67+
68+
#define XLOG_ICL_STRINGS \
69+
{ XLOG_ICL_NEED_FLUSH, "XLOG_ICL_NEED_FLUSH" }, \
70+
{ XLOG_ICL_NEED_FUA, "XLOG_ICL_NEED_FUA" }
71+
6272

6373
/*
6474
* Log ticket flags
@@ -143,9 +153,6 @@ enum xlog_iclog_state {
143153

144154
#define XLOG_COVER_OPS 5
145155

146-
#define XLOG_ICL_NEED_FLUSH (1 << 0) /* iclog needs REQ_PREFLUSH */
147-
#define XLOG_ICL_NEED_FUA (1 << 1) /* iclog needs REQ_FUA */
148-
149156
/* Ticket reservation region accounting */
150157
#define XLOG_TIC_LEN_MAX 15
151158

fs/xfs/xfs_trace.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3944,6 +3944,7 @@ DECLARE_EVENT_CLASS(xlog_iclog_class,
39443944
__field(uint32_t, state)
39453945
__field(int32_t, refcount)
39463946
__field(uint32_t, offset)
3947+
__field(uint32_t, flags)
39473948
__field(unsigned long long, lsn)
39483949
__field(unsigned long, caller_ip)
39493950
),
@@ -3952,15 +3953,17 @@ DECLARE_EVENT_CLASS(xlog_iclog_class,
39523953
__entry->state = iclog->ic_state;
39533954
__entry->refcount = atomic_read(&iclog->ic_refcnt);
39543955
__entry->offset = iclog->ic_offset;
3956+
__entry->flags = iclog->ic_flags;
39553957
__entry->lsn = be64_to_cpu(iclog->ic_header.h_lsn);
39563958
__entry->caller_ip = caller_ip;
39573959
),
3958-
TP_printk("dev %d:%d state %s refcnt %d offset %u lsn 0x%llx caller %pS",
3960+
TP_printk("dev %d:%d state %s refcnt %d offset %u lsn 0x%llx flags %s caller %pS",
39593961
MAJOR(__entry->dev), MINOR(__entry->dev),
39603962
__print_symbolic(__entry->state, XLOG_STATE_STRINGS),
39613963
__entry->refcount,
39623964
__entry->offset,
39633965
__entry->lsn,
3966+
__print_flags(__entry->flags, "|", XLOG_ICL_STRINGS),
39643967
(char *)__entry->caller_ip)
39653968

39663969
);

0 commit comments

Comments
 (0)