diff options
author | Brian Foster <bfoster@redhat.com> | 2012-11-06 15:50:38 +0100 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-08 21:20:44 +0100 |
commit | 27b52867925e3aaed090063c1c58a7537e6373f3 (patch) | |
tree | 901719517ac8dc751053f6bf9d86cbe2b73bf538 /fs/xfs/xfs_icache.h | |
parent | xfs: report projid32bit feature in geometry call (diff) | |
download | linux-27b52867925e3aaed090063c1c58a7537e6373f3.tar.xz linux-27b52867925e3aaed090063c1c58a7537e6373f3.zip |
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_icache.h')
-rw-r--r-- | fs/xfs/xfs_icache.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h index 222e22f16b4a..db3613075dc6 100644 --- a/fs/xfs/xfs_icache.h +++ b/fs/xfs/xfs_icache.h @@ -35,6 +35,9 @@ void xfs_reclaim_inodes_nr(struct xfs_mount *mp, int nr_to_scan); void xfs_inode_set_reclaim_tag(struct xfs_inode *ip); +void xfs_inode_set_eofblocks_tag(struct xfs_inode *ip); +void xfs_inode_clear_eofblocks_tag(struct xfs_inode *ip); + int xfs_sync_inode_grab(struct xfs_inode *ip); int xfs_inode_ag_iterator(struct xfs_mount *mp, int (*execute)(struct xfs_inode *ip, struct xfs_perag *pag, int flags), |