Re: [sheepdog] [PATCH v3 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes()

2020-06-23 Thread Eric Blake
On 6/23/20 5:20 AM, Vladimir Sementsov-Ogievskiy wrote: 11.05.2020 21:34, Eric Blake wrote: On 5/11/20 12:17 PM, Alberto Garcia wrote: On Thu 30 Apr 2020 01:10:21 PM CEST, Vladimir Sementsov-Ogievskiy wrote: compute 'int tail' via % 'int alignment' - safe tail = (offset + bytes) %

Re: [sheepdog] [PATCH v3 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes()

2020-06-23 Thread Vladimir Sementsov-Ogievskiy
11.05.2020 21:34, Eric Blake wrote: On 5/11/20 12:17 PM, Alberto Garcia wrote: On Thu 30 Apr 2020 01:10:21 PM CEST, Vladimir Sementsov-Ogievskiy wrote: compute 'int tail' via % 'int alignment' - safe tail = (offset + bytes) % alignment; both are int64_t, no chance of overflow

Re: [sheepdog] [PATCH v3 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes()

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:21 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > compute 'int tail' via % 'int alignment' - safe tail = (offset + bytes) % alignment; both are int64_t, no chance of overflow here? Berto -- sheepdog mailing list sheepdog@lists.wpkg.org

Re: [sheepdog] [PATCH v3 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes()

2020-05-08 Thread Eric Blake
On 4/30/20 6:10 AM, Vladimir Sementsov-Ogievskiy wrote: We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be