diff options
author | Lukas Czerner <lczerner@redhat.com> | 2011-05-07 03:30:01 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-05-07 03:30:01 +0200 |
commit | 8af1954d172a46a63e5e79dae523a6d74715e458 (patch) | |
tree | 6142f111bb600c4bbf194209155e857fd5f83ca8 /drivers/hid/hid-zpff.c | |
parent | blkdev: Simple cleanup in blkdev_issue_zeroout() (diff) | |
download | linux-8af1954d172a46a63e5e79dae523a6d74715e458.tar.xz linux-8af1954d172a46a63e5e79dae523a6d74715e458.zip |
blkdev: Do not return -EOPNOTSUPP if discard is supported
Currently we return -EOPNOTSUPP in blkdev_issue_discard() if any of the
bio fails due to underlying device not supporting discard request.
However, if the device is for example dm device composed of devices
which some of them support discard and some of them does not, it is ok
for some bios to fail with EOPNOTSUPP, but it does not mean that discard
is not supported at all.
This commit removes the check for bios failed with EOPNOTSUPP and change
blkdev_issue_discard() to return operation not supported if and only if
the device does not actually supports it, not just part of the device as
some bios might indicate.
This change also fixes problem with BLKDISCARD ioctl() which now works
correctly on such dm devices.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
CC: Jens Axboe <jaxboe@fusionio.com>
CC: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/hid/hid-zpff.c')
0 files changed, 0 insertions, 0 deletions