Re: [Qemu-devel] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer

2016-06-22 Thread Eric Blake
On 06/15/2016 07:38 AM, Paolo Bonzini wrote: > > > On 14/06/2016 23:30, Eric Blake wrote: >> We were basing the advertisement of maximum discard and transfer >> length off of UINT32_MAX, but since the rest of the block layer >> has signed int limits on a transaction, nothing could ever reach >> t

Re: [Qemu-devel] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer

2016-06-15 Thread Fam Zheng
On Tue, 06/14 15:30, Eric Blake wrote: > We were basing the advertisement of maximum discard and transfer > length off of UINT32_MAX, but since the rest of the block layer > has signed int limits on a transaction, nothing could ever reach > that maximum, and we risk overflowing an int once things a

Re: [Qemu-devel] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer

2016-06-15 Thread Paolo Bonzini
On 14/06/2016 23:30, Eric Blake wrote: > We were basing the advertisement of maximum discard and transfer > length off of UINT32_MAX, but since the rest of the block layer > has signed int limits on a transaction, nothing could ever reach > that maximum, and we risk overflowing an int once things

[Qemu-devel] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer

2016-06-14 Thread Eric Blake
We were basing the advertisement of maximum discard and transfer length off of UINT32_MAX, but since the rest of the block layer has signed int limits on a transaction, nothing could ever reach that maximum, and we risk overflowing an int once things are converted to byte-based rather than sector-b