Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-02-04 Thread Eric Blake
On 1/7/21 6:20 AM, Richard W.M. Jones wrote: >> Actually that's not the only problem. It appears that we're unable to >> read or write the last sector of this disk: >> >> $ nbdkit memory $(( 2**63 - 2**30 )) --run 'build/qemu-io -r -f raw "$uri" >> -c "r -v $(( 2**63 - 2**30 - 512 )) 512" ' >>

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Daniel P . Berrangé
On Fri, Jan 08, 2021 at 02:14:30PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 07.01.2021 15:20, Richard W.M. Jones wrote: > > On Thu, Jan 07, 2021 at 10:56:12AM +, Richard W.M. Jones wrote: > > > On Thu, Jan 07, 2021 at 09:58:17AM +, Richard W.M. Jones wrote: > > > > On Fri, Dec 04, 2020

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Vladimir Sementsov-Ogievskiy
07.01.2021 15:20, Richard W.M. Jones wrote: On Thu, Jan 07, 2021 at 10:56:12AM +, Richard W.M. Jones wrote: On Thu, Jan 07, 2021 at 09:58:17AM +, Richard W.M. Jones wrote: On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: Finally to be safe with calculations

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Richard W.M. Jones
On Fri, Jan 08, 2021 at 01:51:35PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 07.01.2021 12:58, Richard W.M. Jones wrote: > >On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: > >>Finally to be safe with calculations, to not calculate different > >>maximums for differen

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Vladimir Sementsov-Ogievskiy
07.01.2021 12:58, Richard W.M. Jones wrote: On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: Finally to be safe with calculations, to not calculate different maximums for different nodes (depending on cluster size and request_alignment), let's simply set QEMU_ALIGN_D

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-07 Thread Richard W.M. Jones
On Thu, Jan 07, 2021 at 10:56:12AM +, Richard W.M. Jones wrote: > On Thu, Jan 07, 2021 at 09:58:17AM +, Richard W.M. Jones wrote: > > On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > Finally to be safe with calculations, to not calculate different > >

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-07 Thread Richard W.M. Jones
On Thu, Jan 07, 2021 at 09:58:17AM +, Richard W.M. Jones wrote: > On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: > > Finally to be safe with calculations, to not calculate different > > maximums for different nodes (depending on cluster size and > > request_alignm

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-07 Thread Richard W.M. Jones
On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: > Finally to be safe with calculations, to not calculate different > maximums for different nodes (depending on cluster size and > request_alignment), let's simply set QEMU_ALIGN_DOWN(INT64_MAX, 2^30) > as absolute maximu

[PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2020-12-03 Thread Vladimir Sementsov-Ogievskiy
We are going to modify block layer to work with 64bit requests. And first step is moving to int64_t type for both offset and bytes arguments in all block request related functions. It's mostly safe (when widening signed or unsigned int to int64_t), but switching from uint64_t is questionable. So,