[GEDI] [PATCH v3 17/17] block: use int64_t instead of int in driver discard handlers

Vladimir Sementsov-Ogievskiy vsementsov at virtuozzo.com
Wed May 6 06:40:36 UTC 2020


30.04.2020 14:10, 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 consistent with off_t (which is signed) and
> with possibility for signed return type (where negative value means
> error).
> 
> So, convert driver discard handlers bytes parameter to int64_t.
> 
> This patch just converts handlers where it is obvious that bytes
> parameter is passed further to 64bit interfaces, and add simple
> wrappers where it is not obvious.
> 
> Series: 64bit-block-status
> Signed-off-by: Vladimir Sementsov-Ogievskiy<vsementsov at virtuozzo.com>


squash in:

--- a/tests/test-block-iothread.c
+++ b/tests/test-block-iothread.c
@@ -48,7 +48,7 @@ static int coroutine_fn bdrv_test_co_pwritev(BlockDriverState *bs,
  }
  
  static int coroutine_fn bdrv_test_co_pdiscard(BlockDriverState *bs,
-                                              int64_t offset, int bytes)
+                                              int64_t offset, int64_t bytes)
  {
      return 0;
  }


More information about the integration mailing list