[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 02/36] block: replace "discard" literal with BDRV_OPT
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 02/36] block: replace "discard" literal with BDRV_OPT_DISCARD macro |
Date: |
Mon, 5 Nov 2018 17:37:10 +0100 |
From: Alberto Garcia <address@hidden>
Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
index 95d8635aa1..9d2adf7962 100644
--- a/block.c
+++ b/block.c
@@ -1327,7 +1327,7 @@ QemuOptsList bdrv_runtime_opts = {
.help = "try to optimize zero writes (off, on, unmap)",
},
{
- .name = "discard",
+ .name = BDRV_OPT_DISCARD,
.type = QEMU_OPT_STRING,
.help = "discard operation (ignore/off, unmap/on)",
},
@@ -1432,7 +1432,7 @@ static int bdrv_open_common(BlockDriverState *bs,
BlockBackend *file,
}
}
- discard = qemu_opt_get(opts, "discard");
+ discard = qemu_opt_get(opts, BDRV_OPT_DISCARD);
if (discard != NULL) {
if (bdrv_parse_discard_flags(discard, &bs->open_flags) != 0) {
error_setg(errp, "Invalid discard option");
@@ -3186,7 +3186,7 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state,
BlockReopenQueue *queue,
update_flags_from_options(&reopen_state->flags, opts);
- discard = qemu_opt_get_del(opts, "discard");
+ discard = qemu_opt_get_del(opts, BDRV_OPT_DISCARD);
if (discard != NULL) {
if (bdrv_parse_discard_flags(discard, &reopen_state->flags) != 0) {
error_setg(errp, "Invalid discard option");
--
2.19.1
- [Qemu-block] [PULL 00/36] Block layer patches, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 02/36] block: replace "discard" literal with BDRV_OPT_DISCARD macro,
Kevin Wolf <=
- [Qemu-block] [PULL 03/36] qemu-io-cmds: Fix two format strings, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 01/36] block/vvfat: Fix crash when reporting error about too many files in directory, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 05/36] block/qcow: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 07/36] crypto: initialize sector size even when opening with no IO flag, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 06/36] block/qcow2-bitmap: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 04/36] block/qcow2: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 08/36] qcow2: Get the request alignment for encrypted images from QCryptoBlock, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 09/36] block: change some function return type to bool, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 12/36] block/vhdx: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 10/36] iotests: make 083 specific to raw, Kevin Wolf, 2018/11/05