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:39:07 +0000 (13:39 +0100)
commit1e9290ca9d6fa96b69c4d6125f87dc77793179e1
tree599947ceea061f2621f9722938a14a29ef3a665a
parent592f5569e18471c07208f74540f4e0f646b226f7
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