block: fix problem with sending down discard that isn't of correct granularity
authorJens Axboe <jaxboe@fusionio.com>
Thu, 15 Jul 2010 16:49:31 +0000 (10:49 -0600)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 7 Aug 2010 16:26:33 +0000 (18:26 +0200)
If the queue doesn't have a limit set, or it just set UINT_MAX like
we default to, we coud be sending down a discard request that isn't
of the correct granularity if the block size is > 512b.

Fix this by adjusting max_discard_sectors down to the proper
alignment.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>

No differences found