block: break discard submissions into the user defined size
authorJens Axboe <axboe@kernel.dk>
Tue, 8 May 2018 21:09:41 +0000 (15:09 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 May 2018 21:10:44 +0000 (15:10 -0600)
commitaf097f5d199e2aa3ab3ef777f0716e487b8f7b08
treec93cd4dcadcadf206d7889a3d071450900137b0f
parentd3349b6b3c373ac1fbfb040b810fcee5e2adc7e0
block: break discard submissions into the user defined size

Don't build discards bigger than what the user asked for, if the
user decided to limit the size by writing to 'discard_max_bytes'.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-lib.c