From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com, david@fromorbit.com, hch@infradead.org
Cc: Christoph Hellwig <hch@lst.de>,
Allison Collins <allison.henderson@oracle.com>,
linux-xfs@vger.kernel.org, amir73il@gmail.com,
sandeen@sandeen.net
Subject: [PATCH 10/11] xfs: trace timestamp limits
Date: Sun, 30 Aug 2020 23:07:52 -0700 [thread overview]
Message-ID: <159885407279.3608006.14001785784663274058.stgit@magnolia> (raw)
In-Reply-To: <159885400575.3608006.17716724192510967135.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
Add a couple of tracepoints so that we can check the timestamp limits
being set on inodes and quotas.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
---
fs/xfs/xfs_qm.c | 2 ++
fs/xfs/xfs_super.c | 1 +
fs/xfs/xfs_trace.h | 26 ++++++++++++++++++++++++++
3 files changed, 29 insertions(+)
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 259588a4227d..3f82e0c92c2d 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -670,6 +670,8 @@ xfs_qm_init_quotainfo(
qinf->qi_expiry_min = XFS_DQ_LEGACY_EXPIRY_MIN;
qinf->qi_expiry_max = XFS_DQ_LEGACY_EXPIRY_MAX;
}
+ trace_xfs_quota_expiry_range(mp, qinf->qi_expiry_min,
+ qinf->qi_expiry_max);
mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD);
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 58be2220ae05..8230c902a813 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1491,6 +1491,7 @@ xfs_fc_fill_super(
sb->s_time_min = XFS_LEGACY_TIME_MIN;
sb->s_time_max = XFS_LEGACY_TIME_MAX;
}
+ trace_xfs_inode_timestamp_range(mp, sb->s_time_min, sb->s_time_max);
sb->s_iflags |= SB_I_CGROUPWB;
set_posix_acl_flag(sb);
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index abb1d859f226..a3a35a2d8ed9 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -3844,6 +3844,32 @@ TRACE_EVENT(xfs_btree_bload_block,
__entry->nr_records)
)
+DECLARE_EVENT_CLASS(xfs_timestamp_range_class,
+ TP_PROTO(struct xfs_mount *mp, time64_t min, time64_t max),
+ TP_ARGS(mp, min, max),
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(long long, min)
+ __field(long long, max)
+ ),
+ TP_fast_assign(
+ __entry->dev = mp->m_super->s_dev;
+ __entry->min = min;
+ __entry->max = max;
+ ),
+ TP_printk("dev %d:%d min %lld max %lld",
+ MAJOR(__entry->dev), MINOR(__entry->dev),
+ __entry->min,
+ __entry->max)
+)
+
+#define DEFINE_TIMESTAMP_RANGE_EVENT(name) \
+DEFINE_EVENT(xfs_timestamp_range_class, name, \
+ TP_PROTO(struct xfs_mount *mp, long long min, long long max), \
+ TP_ARGS(mp, min, max))
+DEFINE_TIMESTAMP_RANGE_EVENT(xfs_inode_timestamp_range);
+DEFINE_TIMESTAMP_RANGE_EVENT(xfs_quota_expiry_range);
+
#endif /* _TRACE_XFS_H */
#undef TRACE_INCLUDE_PATH
next prev parent reply other threads:[~2020-08-31 6:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 6:06 [PATCH v5 00/11] xfs: widen timestamps to deal with y2038 Darrick J. Wong
2020-08-31 6:06 ` [PATCH 01/11] xfs: explicitly define inode timestamp range Darrick J. Wong
2020-09-01 8:18 ` Gao Xiang
2020-08-31 6:06 ` [PATCH 02/11] xfs: refactor quota expiration timer modification Darrick J. Wong
2020-08-31 6:07 ` [PATCH 03/11] xfs: refactor default quota grace period setting code Darrick J. Wong
2020-08-31 6:07 ` [PATCH 04/11] xfs: refactor quota timestamp coding Darrick J. Wong
2020-08-31 6:07 ` [PATCH 05/11] xfs: move xfs_log_dinode_to_disk to the log recovery code Darrick J. Wong
2020-09-01 8:19 ` Gao Xiang
2020-08-31 6:07 ` [PATCH 06/11] xfs: redefine xfs_timestamp_t Darrick J. Wong
2020-08-31 16:03 ` Christoph Hellwig
2020-09-01 8:40 ` Gao Xiang
2020-08-31 6:07 ` [PATCH 07/11] xfs: redefine xfs_ictimestamp_t Darrick J. Wong
2020-08-31 16:04 ` Christoph Hellwig
2020-09-01 9:04 ` Gao Xiang
2020-08-31 6:07 ` [PATCH 08/11] xfs: widen ondisk inode timestamps to deal with y2038+ Darrick J. Wong
2020-08-31 16:08 ` Christoph Hellwig
2020-08-31 19:44 ` Darrick J. Wong
2020-09-01 11:44 ` Gao Xiang
2020-09-01 17:53 ` Darrick J. Wong
2020-08-31 6:07 ` [PATCH 09/11] xfs: widen ondisk quota expiration timestamps to handle y2038+ Darrick J. Wong
2020-08-31 6:07 ` Darrick J. Wong [this message]
2020-09-01 11:46 ` [PATCH 10/11] xfs: trace timestamp limits Gao Xiang
2020-08-31 6:07 ` [PATCH 11/11] xfs: enable big timestamps Darrick J. Wong
2020-08-31 16:10 ` Christoph Hellwig
2020-09-01 11:47 ` Gao Xiang
2020-08-31 8:07 ` [PATCH v5 00/11] xfs: widen timestamps to deal with y2038 Amir Goldstein
2020-08-31 15:58 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2020-09-02 2:56 [PATCH v6 " Darrick J. Wong
2020-09-02 2:57 ` [PATCH 10/11] xfs: trace timestamp limits Darrick J. Wong
2020-08-26 22:04 [PATCH v4 00/11] xfs: widen timestamps to deal with y2038 Darrick J. Wong
2020-08-26 22:06 ` [PATCH 10/11] xfs: trace timestamp limits Darrick J. Wong
2020-08-27 7:01 ` Christoph Hellwig
2020-08-28 6:08 ` Allison Collins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=159885407279.3608006.14001785784663274058.stgit@magnolia \
--to=darrick.wong@oracle.com \
--cc=allison.henderson@oracle.com \
--cc=amir73il@gmail.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).