summaryrefslogtreecommitdiffstats
path: root/fs/partitions/msdos.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-05-06 19:30:01 -0600
committerJens Axboe <jaxboe@fusionio.com>2011-05-06 19:30:01 -0600
commit8af1954d172a46a63e5e79dae523a6d74715e458 (patch)
tree6142f111bb600c4bbf194209155e857fd5f83ca8 /fs/partitions/msdos.c
parent5baebe5c86acd6100536a466905880529f79cf1a (diff)
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 'fs/partitions/msdos.c')
0 files changed, 0 insertions, 0 deletions