block: remove split code in blkdev_issue_{discard,write_same}
authorMing Lin <ming.l@ssi.samsung.com>
Fri, 22 May 2015 07:46:56 +0000 (00:46 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 13 Aug 2015 18:31:47 +0000 (12:31 -0600)
commitb49a0871be31a745b2ef7912653683a1876ff701
tree6fd3b77faea6f585e9ad9a781c0c348d49242f10
parent0e28997ec476bad4c7dbe0a08775290051325f53
block: remove split code in blkdev_issue_{discard,write_same}

The split code in blkdev_issue_{discard,write_same} can go away
now that any driver that cares does the split. We have to make
sure bio size doesn't overflow.

For discard, we set max discard sectors to (1<<31)>>9 to ensure
it doesn't overflow bi_size and hopefully it is of the proper
granularity as long as the granularity is a power of two.

Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-lib.c