]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-io-cmds.c
block/nvme: Define INDEX macros to ease code review
[mirror_qemu.git] / qemu-io-cmds.c
index 349256a5fe1228a889c79cca0c29cf7fcab75eae..baeae86d8c858370fdf44c1f462ead11665bc1a6 100644 (file)
@@ -1710,7 +1710,12 @@ static int truncate_f(BlockBackend *blk, int argc, char **argv)
         return offset;
     }
 
-    ret = blk_truncate(blk, offset, PREALLOC_MODE_OFF, &local_err);
+    /*
+     * qemu-io is a debugging tool, so let us be strict here and pass
+     * exact=true.  It is better to err on the "emit more errors" side
+     * than to be overly permissive.
+     */
+    ret = blk_truncate(blk, offset, false, PREALLOC_MODE_OFF, 0, &local_err);
     if (ret < 0) {
         error_report_err(local_err);
         return ret;