summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_discard.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-07 14:07:58 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2017-02-09 11:36:40 -0800
commit4560e78f40cb55bd2ea8f1ef4001c5baa88531c7 (patch)
tree8dc0b7babd87706130fbc1f7acc86f53eb6754a7 /fs/xfs/xfs_discard.c
parent46694129816851cb323e4bcf2dc41482d8d6c19b (diff)
downloadlinux-4560e78f40cb55bd2ea8f1ef4001c5baa88531c7.tar.gz
linux-4560e78f40cb55bd2ea8f1ef4001c5baa88531c7.tar.bz2
linux-4560e78f40cb55bd2ea8f1ef4001c5baa88531c7.zip
xfs: don't block the log commit handler for discards
Instead we submit the discard requests and use another workqueue to release the extents from the extent busy list. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_discard.c')
-rw-r--r--fs/xfs/xfs_discard.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index 4ff499aa7338..d796ffac7296 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -208,32 +208,3 @@ xfs_ioc_trim(
return -EFAULT;
return 0;
}
-
-int
-xfs_discard_extents(
- struct xfs_mount *mp,
- struct list_head *list)
-{
- struct xfs_extent_busy *busyp;
- int error = 0;
-
- list_for_each_entry(busyp, list, list) {
- trace_xfs_discard_extent(mp, busyp->agno, busyp->bno,
- busyp->length);
-
- error = blkdev_issue_discard(mp->m_ddev_targp->bt_bdev,
- XFS_AGB_TO_DADDR(mp, busyp->agno, busyp->bno),
- XFS_FSB_TO_BB(mp, busyp->length),
- GFP_NOFS, 0);
- if (error && error != -EOPNOTSUPP) {
- xfs_info(mp,
- "discard failed for extent [0x%llx,%u], error %d",
- (unsigned long long)busyp->bno,
- busyp->length,
- error);
- return error;
- }
- }
-
- return 0;
-}