summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-02-15 18:07:36 +0100
committerAlex Elder <aelder@sgi.com>2011-02-22 03:39:00 +0100
commit5d15765594eeb5d82c5630b3428ea0ac4f7d3c31 (patch)
tree9897dec4f6487acc63e76575910655df5a959e82 /fs/xfs/xfs_rtalloc.c
parentxfs: prevent leaking uninitialized stack memory in FSGEOMETRY_V1 (diff)
downloadlinux-5d15765594eeb5d82c5630b3428ea0ac4f7d3c31.tar.xz
linux-5d15765594eeb5d82c5630b3428ea0ac4f7d3c31.zip
xfs: check if device support discard in xfs_ioc_trim()
Right now we, are relying on the fact that when we attempt to actually do the discard, blkdev_issue_discar() returns -EOPNOTSUPP and the user is informed that the device does not support discard. However, in the case where the we do not hit any suitable free extent to trim in FITRIM code, it will finish without any error. This is very confusing, because it seems that FITRIM was successful even though the device does not actually supports discard. Solution: Check for the discard support before attempt to search for free extents. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
0 files changed, 0 insertions, 0 deletions