diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index db4973960a..04184733f1 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -455,7 +455,7 @@ createRawFile(int fd, virStorageVolDefPtr vol,
         pos = inputvol->target.capacity - remain;
     }
 
-    if (need_alloc) {
+    if (need_alloc && (vol->target.allocation - pos > 0)) {
         if (safezero(fd, pos, vol->target.allocation - pos) < 0) {
             ret = -errno;
             virReportSystemError(errno, _("cannot fill file '%s'"),