Re: [Nbd] [PATCH v2 0/9] fix max discard sectors limit
- To: Kent Overstreet <koverstreet@...79...>
- Cc: axboe@...161..., nbd-general@lists.sourceforge.net, linux-raid@...25..., npiggin@...161..., linux-scsi@...25..., neilb@...122..., dwmw2@...1270..., Namjae Jeon <namjae.jeon@...1329...>, Paul.Clements@...124..., adrian.hunter@...1303..., JBottomley@...1298..., linux-kernel@...25..., James.Bottomley@...1338..., jcmvbkbc@...17..., linux-mtd@...1331..., linux-mmc@...25..., cjb@...1330..., shli@...1285...
- Subject: Re: [Nbd] [PATCH v2 0/9] fix max discard sectors limit
- From: Namjae Jeon <linkinjeon@...17...>
- Date: Tue, 23 Apr 2013 14:16:28 +0900
- Message-id: <CAKYAXd-PUJ2YXr7QMMw9HWzSXzOO=Yb_CCo7AyfrT-_MP5Sa6Q@...18...>
- In-reply-to: <20130422212324.GB4704@...162...>
- References: <1366389602-19313-1-git-send-email-linkinjeon@...17...> <20130422212324.GB4704@...162...>
2013/4/23, Kent Overstreet <koverstreet@...79...>:
> On Sat, Apr 20, 2013 at 01:40:02AM +0900, Namjae Jeon wrote:
>> From: Namjae Jeon <namjae.jeon@...1329...>
>>
>> linux-v3.8-rc1 and later support for plug for blkdev_issue_discard with
>> commit 0cfbcafcae8b7364b5fa96c2b26ccde7a3a296a9
>> (block: add plug for blkdev_issue_discard )
>>
>> For example,
>> 1) DISCARD rq-1 with size size 4GB
>> 2) DISCARD rq-2 with size size 1GB
>>
>> If these 2 discard requests get merged, final request size will be 5GB.
>>
>> In this case, request's __data_len field may overflow as it can store
>> max 4GB(unsigned int).
>
> Complete NACK - like James said, this fix is nonsensical. This should be
> fixed by just checking for overflow before merging requests, not with
> weird hacks in the drivers.
that agree to your opinion, and will change at only appropriate
place(James'change) and will send the updated patch soon.
Thanks.
>
Reply to: