aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-05-24 09:58:48 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-06-12 18:32:32 +0200
commit2ea8e96da2974512f27fab03758b301dff180b6d (patch)
tree3f6e5ce7ab5cfdaf534c172886985caf0afb56cd
parentabea00533fa48de89f211bf2e0cff334765ed58e (diff)
downloadqemu-2ea8e96da2974512f27fab03758b301dff180b6d.zip
qemu-2ea8e96da2974512f27fab03758b301dff180b6d.tar.gz
qemu-2ea8e96da2974512f27fab03758b301dff180b6d.tar.bz2
block/gluster: update .help of BLOCK_OPT_PREALLOC option
Add missing 'falloc' among the allowed values of 'preallocation' option; show it and 'full' only when they are supported. ('falloc' is supported if defined CONFIG_GLUSTERFS_FALLOCATE, 'full' is supported if defined CONFIG_GLUSTERFS_ZEROFILL) Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190524075848.23781-4-sgarzare@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--block/gluster.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/block/gluster.c b/block/gluster.c
index dc16f0c..62f8ff2 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -98,7 +98,14 @@ static QemuOptsList qemu_gluster_create_opts = {
{
.name = BLOCK_OPT_PREALLOC,
.type = QEMU_OPT_STRING,
- .help = "Preallocation mode (allowed values: off, full)"
+ .help = "Preallocation mode (allowed values: off"
+#ifdef CONFIG_GLUSTERFS_FALLOCATE
+ ", falloc"
+#endif
+#ifdef CONFIG_GLUSTERFS_ZEROFILL
+ ", full"
+#endif
+ ")"
},
{
.name = GLUSTER_OPT_DEBUG,