diff options
author | Brian Foster <bfoster@redhat.com> | 2012-11-06 09:50:38 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-08 15:20:44 -0500 |
commit | 27b52867925e3aaed090063c1c58a7537e6373f3 (patch) | |
tree | 901719517ac8dc751053f6bf9d86cbe2b73bf538 /fs/xfs/xfs_trace.h | |
parent | 69a58a43f74eb2cb23d9bce2524dae33c289a40f (diff) |
xfs: add EOFBLOCKS inode tagging/untagging
Add the XFS_ICI_EOFBLOCKS_TAG inode tag to identify inodes with
speculatively preallocated blocks beyond EOF. An inode is tagged
when speculative preallocation occurs and untagged either via
truncate down or when post-EOF blocks are freed via release or
reclaim.
The tag management is intentionally not aggressive to prefer
simplicity over the complexity of handling all the corner cases
under which post-EOF blocks could be freed (i.e., forward
truncation, fallocate, write error conditions, etc.). This means
that a tagged inode may or may not have post-EOF blocks after a
period of time. The tag is eventually cleared when the inode is
released or reclaimed.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trace.h')
-rw-r--r-- | fs/xfs/xfs_trace.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 7d36ccf57f93..6f46e034b766 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
@@ -130,6 +130,8 @@ DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag); | |||
130 | DEFINE_PERAG_REF_EVENT(xfs_perag_put); | 130 | DEFINE_PERAG_REF_EVENT(xfs_perag_put); |
131 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim); | 131 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim); |
132 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim); | 132 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim); |
133 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_eofblocks); | ||
134 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_eofblocks); | ||
133 | 135 | ||
134 | TRACE_EVENT(xfs_attr_list_node_descend, | 136 | TRACE_EVENT(xfs_attr_list_node_descend, |
135 | TP_PROTO(struct xfs_attr_list_context *ctx, | 137 | TP_PROTO(struct xfs_attr_list_context *ctx, |
@@ -585,6 +587,9 @@ DEFINE_INODE_EVENT(xfs_update_time); | |||
585 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); | 587 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); |
586 | DEFINE_INODE_EVENT(xfs_dquot_dqdetach); | 588 | DEFINE_INODE_EVENT(xfs_dquot_dqdetach); |
587 | 589 | ||
590 | DEFINE_INODE_EVENT(xfs_inode_set_eofblocks_tag); | ||
591 | DEFINE_INODE_EVENT(xfs_inode_clear_eofblocks_tag); | ||
592 | |||
588 | DECLARE_EVENT_CLASS(xfs_iref_class, | 593 | DECLARE_EVENT_CLASS(xfs_iref_class, |
589 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), | 594 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), |
590 | TP_ARGS(ip, caller_ip), | 595 | TP_ARGS(ip, caller_ip), |