diff options
author | Lukas Czerner <lczerner@redhat.com> | 2011-02-15 17:07:36 +0000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-02-22 15:08:44 -0600 |
commit | be715140b5c3baf8ab6708060cfab80bef279d18 (patch) | |
tree | f16e9241cd872adab59485e66523f9fb7eb7ab3b /fs/xfs/xfs_fsops.h | |
parent | 3a3675b7f23f83ca8c67c9c2b6edf707fd28d1ba (diff) | |
download | op-kernel-dev-be715140b5c3baf8ab6708060cfab80bef279d18.zip op-kernel-dev-be715140b5c3baf8ab6708060cfab80bef279d18.tar.gz |
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_fsops.h')
0 files changed, 0 insertions, 0 deletions