diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-01-07 14:02:04 +0100 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-01-12 03:28:29 +0100 |
commit | a46db60834883c1c8c665d7fcc7b4ab66f5966fc (patch) | |
tree | 962f134a2c7f771cdafdae4ff6caa9e36693dce5 /fs/xfs/linux-2.6/xfs_ioctl.c | |
parent | xfs: ensure log covering transactions are synchronous (diff) | |
download | linux-a46db60834883c1c8c665d7fcc7b4ab66f5966fc.tar.xz linux-a46db60834883c1c8c665d7fcc7b4ab66f5966fc.zip |
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 @@ #include "xfs_dfrag.h" #include "xfs_fsops.h" #include "xfs_vnodeops.h" +#include "xfs_discard.h" #include "xfs_quota.h" #include "xfs_inode_item.h" #include "xfs_export.h" @@ -1294,6 +1295,8 @@ xfs_file_ioctl( trace_xfs_file_ioctl(ip); switch (cmd) { + case FITRIM: + return xfs_ioc_trim(mp, arg); case XFS_IOC_ALLOCSP: case XFS_IOC_FREESP: case XFS_IOC_RESVSP: |