summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_ag.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2012-11-06 18:50:38 +0400
committerBen Myers <bpm@sgi.com>2012-11-09 00:20:44 +0400
commit27b52867925e3aaed090063c1c58a7537e6373f3 (patch)
tree901719517ac8dc751053f6bf9d86cbe2b73bf538 /fs/xfs/xfs_ag.h
parent69a58a43f74eb2cb23d9bce2524dae33c289a40f (diff)
downloadlinux-27b52867925e3aaed090063c1c58a7537e6373f3.tar.xz
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_ag.h')
-rw-r--r--fs/xfs/xfs_ag.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h
index 44d65c1533c0..22bd4db011c8 100644
--- a/fs/xfs/xfs_ag.h
+++ b/fs/xfs/xfs_ag.h
@@ -233,6 +233,7 @@ typedef struct xfs_perag {
#define XFS_ICI_NO_TAG (-1) /* special flag for an untagged lookup
in xfs_inode_ag_iterator */
#define XFS_ICI_RECLAIM_TAG 0 /* inode is to be reclaimed */
+#define XFS_ICI_EOFBLOCKS_TAG 1 /* inode has blocks beyond EOF */
#define XFS_AG_MAXLEVELS(mp) ((mp)->m_ag_maxlevels)
#define XFS_MIN_FREELIST_RAW(bl,cl,mp) \