summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-05-07 03:30:01 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-05-07 03:30:01 +0200
commit8af1954d172a46a63e5e79dae523a6d74715e458 (patch)
tree6142f111bb600c4bbf194209155e857fd5f83ca8 /drivers/power
parentblkdev: Simple cleanup in blkdev_issue_zeroout() (diff)
downloadlinux-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/power')
0 files changed, 0 insertions, 0 deletions