diff options
author | Brian Foster <bfoster@redhat.com> | 2012-11-07 12:21:12 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-08 16:27:49 -0500 |
commit | 8ca149de80478441352a8622ea15fae7de703ced (patch) | |
tree | d98cd5200aa1180b01925a400fe6e4155e0e5a0b /fs/xfs/xfs_icache.c | |
parent | 41176a68e3f710630feace536d0277a092e206b5 (diff) |
xfs: add XFS_IOC_FREE_EOFBLOCKS ioctl
The XFS_IOC_FREE_EOFBLOCKS ioctl allows users to invoke an EOFBLOCKS
scan. The xfs_eofblocks structure is defined to support the command
parameters (scan mode).
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_icache.c')
-rw-r--r-- | fs/xfs/xfs_icache.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index d115cb44b103..fbb74c715266 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c | |||
@@ -1206,11 +1206,15 @@ xfs_inode_free_eofblocks( | |||
1206 | int | 1206 | int |
1207 | xfs_icache_free_eofblocks( | 1207 | xfs_icache_free_eofblocks( |
1208 | struct xfs_mount *mp, | 1208 | struct xfs_mount *mp, |
1209 | int flags) | 1209 | struct xfs_eofblocks *eofb) |
1210 | { | 1210 | { |
1211 | ASSERT((flags & ~(SYNC_TRYLOCK|SYNC_WAIT)) == 0); | 1211 | int flags = SYNC_TRYLOCK; |
1212 | |||
1213 | if (eofb && (eofb->eof_flags & XFS_EOF_FLAGS_SYNC)) | ||
1214 | flags = SYNC_WAIT; | ||
1215 | |||
1212 | return xfs_inode_ag_iterator_tag(mp, xfs_inode_free_eofblocks, flags, | 1216 | return xfs_inode_ag_iterator_tag(mp, xfs_inode_free_eofblocks, flags, |
1213 | NULL, XFS_ICI_EOFBLOCKS_TAG); | 1217 | eofb, XFS_ICI_EOFBLOCKS_TAG); |
1214 | } | 1218 | } |
1215 | 1219 | ||
1216 | void | 1220 | void |