diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-01-07 08:02:04 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-01-11 21:28:29 -0500 |
commit | a46db60834883c1c8c665d7fcc7b4ab66f5966fc (patch) | |
tree | 962f134a2c7f771cdafdae4ff6caa9e36693dce5 /fs/xfs/linux-2.6/xfs_ioctl.c | |
parent | c58efdb442bb49dea1d148f207560c41918c1bf4 (diff) |
xfs: add FITRIM support
Allow manual discards from userspace using the FITRIM ioctl. This is not
intended to be run during normal workloads, as the freepsace btree walks
can cause large performance degradation.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index ad442d9e392e..b06ede1d0bed 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "xfs_dfrag.h" | 39 | #include "xfs_dfrag.h" |
40 | #include "xfs_fsops.h" | 40 | #include "xfs_fsops.h" |
41 | #include "xfs_vnodeops.h" | 41 | #include "xfs_vnodeops.h" |
42 | #include "xfs_discard.h" | ||
42 | #include "xfs_quota.h" | 43 | #include "xfs_quota.h" |
43 | #include "xfs_inode_item.h" | 44 | #include "xfs_inode_item.h" |
44 | #include "xfs_export.h" | 45 | #include "xfs_export.h" |
@@ -1294,6 +1295,8 @@ xfs_file_ioctl( | |||
1294 | trace_xfs_file_ioctl(ip); | 1295 | trace_xfs_file_ioctl(ip); |
1295 | 1296 | ||
1296 | switch (cmd) { | 1297 | switch (cmd) { |
1298 | case FITRIM: | ||
1299 | return xfs_ioc_trim(mp, arg); | ||
1297 | case XFS_IOC_ALLOCSP: | 1300 | case XFS_IOC_ALLOCSP: |
1298 | case XFS_IOC_FREESP: | 1301 | case XFS_IOC_FREESP: |
1299 | case XFS_IOC_RESVSP: | 1302 | case XFS_IOC_RESVSP: |