[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMGffEm4AOZu+3=HxfNQVvvMuLkWWEDrTDrpqbSe3wX0u_=5cg@mail.gmail.com>
Date: Mon, 18 Apr 2016 10:34:19 +0200
From: Jinpu Wang <jinpu.wang@...fitbricks.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Jens Axboe <axboe@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2]brd: set max_discard_sectors properly
On Sat, Apr 16, 2016 at 3:50 AM, Christoph Hellwig <hch@...radead.org> wrote:
>> - 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.
Thanks Christoph, make sense to me, will rework it to this way.
Regards,
Jack
Powered by blists - more mailing lists