Commit cdad4bd8940c6fb1616733550663d006c611b2f4
1 parent
a457e7ee
Change default werror semantics from "report" to "enospc"
Practically speaking, "report" causes a lot of issues when encountering a host ENOSPC error. Switch to "enospc" as the default werror semantics. All host errors other than ENOSPC will be reported to the guest. ENOSPC will cause the VM to stop. Asynchronous notifications are needed to inform management tools that some action should be taken but stopping the VM is at least better than undefined behavior in the guest. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6655 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
vl.c
... | ... | @@ -2243,7 +2243,7 @@ BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv) |
2243 | 2243 | if (drives_table[index].bdrv == bdrv) |
2244 | 2244 | return drives_table[index].onerror; |
2245 | 2245 | |
2246 | - return BLOCK_ERR_REPORT; | |
2246 | + return BLOCK_ERR_STOP_ENOSPC; | |
2247 | 2247 | } |
2248 | 2248 | |
2249 | 2249 | static void bdrv_format_print(void *opaque, const char *name) |
... | ... | @@ -2479,7 +2479,7 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque) |
2479 | 2479 | if (!get_param_value(serial, sizeof(serial), "serial", str)) |
2480 | 2480 | memset(serial, 0, sizeof(serial)); |
2481 | 2481 | |
2482 | - onerror = BLOCK_ERR_REPORT; | |
2482 | + onerror = BLOCK_ERR_STOP_ENOSPC; | |
2483 | 2483 | if (get_param_value(buf, sizeof(serial), "werror", str)) { |
2484 | 2484 | if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO) { |
2485 | 2485 | fprintf(stderr, "werror is no supported by this format\n"); | ... | ... |