Re: [PATCHv2]brd: set max_discard_sectors properly

From: Christoph Hellwig
Date: Fri Apr 15 2016 - 21:50:35 EST


> - blk_queue_max_discard_sectors(brd->brd_queue, UINT_MAX);
> + blk_queue_max_discard_sectors(brd->brd_queue, UINT_MAX >> 9);

Shouldn't we fix the issue by capping to UINT_MAX >> 9 inside
blk_queue_max_discard_sectors? That way we'll prevent against having
issues like this in any other driver as well.