[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 17/17] block: use int64_t instead of int in driver discard
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [PATCH v3 17/17] block: use int64_t instead of int in driver discard handlers |
Date: |
Wed, 6 May 2020 09:40:36 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
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<address@hidden>
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;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v3 17/17] block: use int64_t instead of int in driver discard handlers,
Vladimir Sementsov-Ogievskiy <=