Change off_t extent_length to unsigned long long wipe_len, as well as the
'remain' variable.
---
src/storage/storage_backend.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index d1276dd..530177f 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -1989,17 +1989,16 @@ virStorageBackendVolZeroSparseFileLocal(virStorageVolDefPtr vol,
static int
virStorageBackendWipeLocal(virStorageVolDefPtr vol,
int fd,
- off_t extent_length,
+ unsigned long long wipe_len,
size_t writebuf_length,
size_t *bytes_wiped)
{
int ret = -1, written = 0;
- off_t remaining = 0;
+ unsigned long long remaining = 0;
size_t write_size = 0;
char *writebuf = NULL;
- VIR_DEBUG("extent logical start: 0 len: %ju",
- (uintmax_t)extent_length);
+ VIR_DEBUG("wiping start: 0 len: %llu", wipe_len);
if (VIR_ALLOC_N(writebuf, writebuf_length) < 0)
goto cleanup;
@@ -2012,7 +2011,7 @@ virStorageBackendWipeLocal(virStorageVolDefPtr vol,
goto cleanup;
}
- remaining = extent_length;
+ remaining = wipe_len;
while (remaining > 0) {
write_size = (writebuf_length < remaining) ? writebuf_length : remaining;
--
2.4.6