]> git.baikalelectronics.ru Git - kernel.git/commit
block: don't try to discard from __blkdev_issue_zeroout
authorChristoph Hellwig <hch@lst.de>
Fri, 13 Jan 2017 22:18:16 +0000 (15:18 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 13 Jan 2017 22:18:16 +0000 (15:18 -0700)
commit0c7280eef2ac47b2865e6ce9a2f7df2812e98dfb
tree25101dd0c76363c670fd08f947ef46df48285e28
parentbbe16545daeb757c99aec6217b7ac187c0b1be00
block: don't try to discard from __blkdev_issue_zeroout

Discard can return -EIO asynchronously if the alignment for the request
isn't suitable for the driver, which makes a proper fallback to other
methods in __blkdev_issue_zeroout impossible.  Thus only issue a sync
discard from blkdev_issue_zeroout an don't try discard at all from
__blkdev_issue_zeroout as a non-invasive workaround.

One more reason why abusing discard for zeroing must die..

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Eryu Guan <eguan@redhat.com>
Fixes: 5233f8ca ("block: add async variant of blkdev_issue_zeroout")
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-lib.c