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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Dec 2018 12:40:14 +0000 (13:40 +0100)
commitf5cecc055048208051cfd2db1793f923668f29b6
tree1bd2d743af2e3d11172571a637e1c48df23fe264
parentbbfc30f29cb328111fec12975ded8223ecc8e1a5
block: break discard submissions into the user defined size

[ Upstream commit af097f5d199e2aa3ab3ef777f0716e487b8f7b08 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/blk-lib.c