From ndevos at redhat.com Mon May 6 06:33:08 2019 From: ndevos at redhat.com (Niels de Vos) Date: Mon, 6 May 2019 08:33:08 +0200 Subject: [GEDI] [QEMU PATCH] MAINTAINERS: Downgrade status of block sections without "M:" to "Odd Fixes" In-Reply-To: <20190506061854.22207-1-thuth@redhat.com> References: <20190506061854.22207-1-thuth@redhat.com> Message-ID: <20190506063308.GA5209@ndevos-x270> On Mon, May 06, 2019 at 08:18:54AM +0200, Thomas Huth wrote: > Fixes might still get picked up via the qemu-block mailing list, > so the status is not "Orphan" yet. > Also add the gluster mailing list as suggested by Niels here: > > https://patchwork.kernel.org/patch/10613297/#22409943 > > Signed-off-by: Thomas Huth Thanks, this counts for the Gluster part: Reviewed-by: Niels de Vos > --- > MAINTAINERS | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 66ddbda9c9..899a4cd572 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2404,12 +2404,13 @@ F: block/ssh.c > > CURL > L: qemu-block at nongnu.org > -S: Supported > +S: Odd Fixes > F: block/curl.c > > GLUSTER > L: qemu-block at nongnu.org > -S: Supported > +L: integration at gluster.org > +S: Odd Fixes > F: block/gluster.c > > Null Block Driver > -- > 2.21.0 > From sgarzare at redhat.com Thu May 23 15:22:47 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Thu, 23 May 2019 17:22:47 +0200 Subject: [GEDI] [PATCH 0/3] Update documentation and help related to the preallocation parameter Message-ID: <20190523152250.106717-1-sgarzare@redhat.com> Following Markus' advice, I updated the documentation of preallocation parameter in qapi/block-core.json adding default and allowed values (patch 1). I also updated the help related to BLOCK_OPT_PREALLOC in the QemuOptsList of file-posix (patch 2) and gluster (patch 3). Stefano Garzarella (3): qapi/block-core: update documentation of preallocation parameter block/file-posix: update .help of BLOCK_OPT_PREALLOC option block/gluster: update .help of BLOCK_OPT_PREALLOC option qapi/block-core.json | 20 ++++++++++++++------ block/file-posix.c | 6 +++++- block/gluster.c | 9 ++++++++- 3 files changed, 27 insertions(+), 8 deletions(-) -- 2.20.1 From sgarzare at redhat.com Thu May 23 15:22:48 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Thu, 23 May 2019 17:22:48 +0200 Subject: [GEDI] [PATCH 1/3] qapi/block-core: update documentation of preallocation parameter In-Reply-To: <20190523152250.106717-1-sgarzare@redhat.com> References: <20190523152250.106717-1-sgarzare@redhat.com> Message-ID: <20190523152250.106717-2-sgarzare@redhat.com> Add default and available values in the documentation block of each block device or protocol that supports the 'preallocation' parameter during the image creation. Suggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella --- qapi/block-core.json | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 7ccbfff9d0..6aab0ebfe3 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -4103,7 +4103,10 @@ # # @filename Filename for the new image file # @size Size of the virtual disk in bytes -# @preallocation Preallocation mode for the new image (default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values for file-posix: off, +# falloc (if defined CONFIG_POSIX_FALLOCATE), full; +# allowed values for file-win32: off) # @nocow Turn off copy-on-write (valid only on btrfs; default: off) # # Since: 2.12 @@ -4121,7 +4124,10 @@ # # @location Where to store the new image file # @size Size of the virtual disk in bytes -# @preallocation Preallocation mode for the new image (default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, +# falloc (if defined CONFIG_GLUSTERFS_FALLOCATE), +# full (if defined CONFIG_GLUSTERFS_ZEROFILL)) # # Since: 2.12 ## @@ -4225,7 +4231,8 @@ # @backing-fmt Name of the block driver to use for the backing file # @encrypt Encryption options if the image should be encrypted # @cluster-size qcow2 cluster size in bytes (default: 65536) -# @preallocation Preallocation mode for the new image (default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, falloc, full, metadata) # @lazy-refcounts True if refcounts may be updated lazily (default: off) # @refcount-bits Width of reference counts in bits (default: 16) # @@ -4408,7 +4415,8 @@ # @location Where to store the new image file # @size Size of the virtual disk in bytes # @backing-file File name of a base image -# @preallocation Preallocation mode (allowed values: off, full) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, full) # @redundancy Redundancy of the image # @object-size Object size of the image # @@ -4443,8 +4451,8 @@ # # @file Node to create the image format on # @size Size of the virtual disk in bytes -# @preallocation Preallocation mode for the new image (allowed values: off, -# metadata; default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, metadata) # # Since: 2.12 ## -- 2.20.1 From sgarzare at redhat.com Thu May 23 15:22:49 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Thu, 23 May 2019 17:22:49 +0200 Subject: [GEDI] [PATCH 2/3] block/file-posix: update .help of BLOCK_OPT_PREALLOC option In-Reply-To: <20190523152250.106717-1-sgarzare@redhat.com> References: <20190523152250.106717-1-sgarzare@redhat.com> Message-ID: <20190523152250.106717-3-sgarzare@redhat.com> Show 'falloc' among the allowed values of 'preallocation' option, only when it is supported (if defined CONFIG_POSIX_FALLOCATE) Signed-off-by: Stefano Garzarella --- block/file-posix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index d018429672..9632e3a87b 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2751,7 +2751,11 @@ static QemuOptsList raw_create_opts = { { .name = BLOCK_OPT_PREALLOC, .type = QEMU_OPT_STRING, - .help = "Preallocation mode (allowed values: off, falloc, full)" + .help = "Preallocation mode (allowed values: off" +#ifdef CONFIG_POSIX_FALLOCATE + ", falloc" +#endif + ", full)" }, { /* end of list */ } } -- 2.20.1 From sgarzare at redhat.com Thu May 23 15:22:50 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Thu, 23 May 2019 17:22:50 +0200 Subject: [GEDI] [PATCH 3/3] block/gluster: update .help of BLOCK_OPT_PREALLOC option In-Reply-To: <20190523152250.106717-1-sgarzare@redhat.com> References: <20190523152250.106717-1-sgarzare@redhat.com> Message-ID: <20190523152250.106717-4-sgarzare@redhat.com> Show 'falloc' and 'full' among the allowed values of 'preallocation' option, only when they are supported ('falloc' is support if defined CONFIG_GLUSTERFS_FALLOCATE, 'full' is support if defined CONFIG_GLUSTERFS_ZEROFILL) Signed-off-by: Stefano Garzarella --- block/gluster.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/block/gluster.c b/block/gluster.c index e664ca4462..682fe49912 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -97,7 +97,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, -- 2.20.1 From armbru at redhat.com Thu May 23 16:33:06 2019 From: armbru at redhat.com (Markus Armbruster) Date: Thu, 23 May 2019 18:33:06 +0200 Subject: [GEDI] [Qemu-devel] [PATCH 1/3] qapi/block-core: update documentation of preallocation parameter In-Reply-To: <20190523152250.106717-2-sgarzare@redhat.com> (Stefano Garzarella's message of "Thu, 23 May 2019 17:22:48 +0200") References: <20190523152250.106717-1-sgarzare@redhat.com> <20190523152250.106717-2-sgarzare@redhat.com> Message-ID: <8736l5i119.fsf@dusky.pond.sub.org> Stefano Garzarella writes: > Add default and available values in the documentation block of > each block device or protocol that supports the 'preallocation' > parameter during the image creation. > > Suggested-by: Markus Armbruster > Signed-off-by: Stefano Garzarella > --- > qapi/block-core.json | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 7ccbfff9d0..6aab0ebfe3 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -4103,7 +4103,10 @@ > # > # @filename Filename for the new image file > # @size Size of the virtual disk in bytes > -# @preallocation Preallocation mode for the new image (default: off) > +# @preallocation Preallocation mode for the new image (default: off; > +# allowed values for file-posix: off, > +# falloc (if defined CONFIG_POSIX_FALLOCATE), full; > +# allowed values for file-win32: off) "file-win32" isn't a QAPI thing, it's the stem of the source file where the driver consuming this is defined. Not ideal Perhaps: off, falloc (if defined CONFIG_POSIX_FALLOCATE), full (if defined CONFIG_POSIX). > # @nocow Turn off copy-on-write (valid only on btrfs; default: off) > # > # Since: 2.12 > @@ -4121,7 +4124,10 @@ > # > # @location Where to store the new image file > # @size Size of the virtual disk in bytes > -# @preallocation Preallocation mode for the new image (default: off) > +# @preallocation Preallocation mode for the new image (default: off; > +# allowed values: off, > +# falloc (if defined CONFIG_GLUSTERFS_FALLOCATE), > +# full (if defined CONFIG_GLUSTERFS_ZEROFILL)) > # > # Since: 2.12 > ## > @@ -4225,7 +4231,8 @@ > # @backing-fmt Name of the block driver to use for the backing file > # @encrypt Encryption options if the image should be encrypted > # @cluster-size qcow2 cluster size in bytes (default: 65536) > -# @preallocation Preallocation mode for the new image (default: off) > +# @preallocation Preallocation mode for the new image (default: off; > +# allowed values: off, falloc, full, metadata) > # @lazy-refcounts True if refcounts may be updated lazily (default: off) > # @refcount-bits Width of reference counts in bits (default: 16) > # > @@ -4408,7 +4415,8 @@ > # @location Where to store the new image file > # @size Size of the virtual disk in bytes > # @backing-file File name of a base image > -# @preallocation Preallocation mode (allowed values: off, full) > +# @preallocation Preallocation mode for the new image (default: off; > +# allowed values: off, full) > # @redundancy Redundancy of the image > # @object-size Object size of the image > # > @@ -4443,8 +4451,8 @@ > # > # @file Node to create the image format on > # @size Size of the virtual disk in bytes > -# @preallocation Preallocation mode for the new image (allowed values: off, > -# metadata; default: off) > +# @preallocation Preallocation mode for the new image (default: off; > +# allowed values: off, metadata) > # > # Since: 2.12 > ## Preferably with file-win32 rephrased: Reviewed-by: Markus Armbruster From armbru at redhat.com Thu May 23 16:35:18 2019 From: armbru at redhat.com (Markus Armbruster) Date: Thu, 23 May 2019 18:35:18 +0200 Subject: [GEDI] [Qemu-devel] [PATCH 3/3] block/gluster: update .help of BLOCK_OPT_PREALLOC option In-Reply-To: <20190523152250.106717-4-sgarzare@redhat.com> (Stefano Garzarella's message of "Thu, 23 May 2019 17:22:50 +0200") References: <20190523152250.106717-1-sgarzare@redhat.com> <20190523152250.106717-4-sgarzare@redhat.com> Message-ID: <87y32xgmd5.fsf@dusky.pond.sub.org> Stefano Garzarella writes: > Show 'falloc' and 'full' among the allowed values of > 'preallocation' option, only when they are supported > ('falloc' is support if defined CONFIG_GLUSTERFS_FALLOCATE, > 'full' is support if defined CONFIG_GLUSTERFS_ZEROFILL) You could mention that 'falloc' is missing before the patch. > Signed-off-by: Stefano Garzarella > --- > block/gluster.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/block/gluster.c b/block/gluster.c > index e664ca4462..682fe49912 100644 > --- a/block/gluster.c > +++ b/block/gluster.c > @@ -97,7 +97,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, Reviewed-by: Markus Armbruster From armbru at redhat.com Thu May 23 16:36:10 2019 From: armbru at redhat.com (Markus Armbruster) Date: Thu, 23 May 2019 18:36:10 +0200 Subject: [GEDI] [Qemu-devel] [PATCH 2/3] block/file-posix: update .help of BLOCK_OPT_PREALLOC option In-Reply-To: <20190523152250.106717-3-sgarzare@redhat.com> (Stefano Garzarella's message of "Thu, 23 May 2019 17:22:49 +0200") References: <20190523152250.106717-1-sgarzare@redhat.com> <20190523152250.106717-3-sgarzare@redhat.com> Message-ID: <87tvdlgmbp.fsf@dusky.pond.sub.org> Stefano Garzarella writes: > Show 'falloc' among the allowed values of 'preallocation' > option, only when it is supported (if defined CONFIG_POSIX_FALLOCATE) > > Signed-off-by: Stefano Garzarella > --- > block/file-posix.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/block/file-posix.c b/block/file-posix.c > index d018429672..9632e3a87b 100644 > --- a/block/file-posix.c > +++ b/block/file-posix.c > @@ -2751,7 +2751,11 @@ static QemuOptsList raw_create_opts = { > { > .name = BLOCK_OPT_PREALLOC, > .type = QEMU_OPT_STRING, > - .help = "Preallocation mode (allowed values: off, falloc, full)" > + .help = "Preallocation mode (allowed values: off" > +#ifdef CONFIG_POSIX_FALLOCATE > + ", falloc" > +#endif > + ", full)" > }, > { /* end of list */ } > } Reviewed-by: Markus Armbruster From sgarzare at redhat.com Fri May 24 07:32:57 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Fri, 24 May 2019 09:32:57 +0200 Subject: [GEDI] [Qemu-devel] [PATCH 1/3] qapi/block-core: update documentation of preallocation parameter In-Reply-To: <8736l5i119.fsf@dusky.pond.sub.org> References: <20190523152250.106717-1-sgarzare@redhat.com> <20190523152250.106717-2-sgarzare@redhat.com> <8736l5i119.fsf@dusky.pond.sub.org> Message-ID: <20190524073257.jdylw3dohrpahsrh@steredhat> On Thu, May 23, 2019 at 06:33:06PM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > Add default and available values in the documentation block of > > each block device or protocol that supports the 'preallocation' > > parameter during the image creation. > > > > Suggested-by: Markus Armbruster > > Signed-off-by: Stefano Garzarella > > --- > > qapi/block-core.json | 20 ++++++++++++++------ > > 1 file changed, 14 insertions(+), 6 deletions(-) > > > > diff --git a/qapi/block-core.json b/qapi/block-core.json > > index 7ccbfff9d0..6aab0ebfe3 100644 > > --- a/qapi/block-core.json > > +++ b/qapi/block-core.json > > @@ -4103,7 +4103,10 @@ > > # > > # @filename Filename for the new image file > > # @size Size of the virtual disk in bytes > > -# @preallocation Preallocation mode for the new image (default: off) > > +# @preallocation Preallocation mode for the new image (default: off; > > +# allowed values for file-posix: off, > > +# falloc (if defined CONFIG_POSIX_FALLOCATE), full; > > +# allowed values for file-win32: off) > > "file-win32" isn't a QAPI thing, it's the stem of the source file where > the driver consuming this is defined. Not ideal > > Perhaps: off, falloc (if defined CONFIG_POSIX_FALLOCATE), full (if > defined CONFIG_POSIX). > Yes, it's better :) I'll fix it in the v2. > > # @nocow Turn off copy-on-write (valid only on btrfs; default: off) > > # > > # Since: 2.12 > > @@ -4121,7 +4124,10 @@ > > # > > # @location Where to store the new image file > > # @size Size of the virtual disk in bytes > > -# @preallocation Preallocation mode for the new image (default: off) > > +# @preallocation Preallocation mode for the new image (default: off; > > +# allowed values: off, > > +# falloc (if defined CONFIG_GLUSTERFS_FALLOCATE), > > +# full (if defined CONFIG_GLUSTERFS_ZEROFILL)) > > # > > # Since: 2.12 > > ## > > @@ -4225,7 +4231,8 @@ > > # @backing-fmt Name of the block driver to use for the backing file > > # @encrypt Encryption options if the image should be encrypted > > # @cluster-size qcow2 cluster size in bytes (default: 65536) > > -# @preallocation Preallocation mode for the new image (default: off) > > +# @preallocation Preallocation mode for the new image (default: off; > > +# allowed values: off, falloc, full, metadata) > > # @lazy-refcounts True if refcounts may be updated lazily (default: off) > > # @refcount-bits Width of reference counts in bits (default: 16) > > # > > @@ -4408,7 +4415,8 @@ > > # @location Where to store the new image file > > # @size Size of the virtual disk in bytes > > # @backing-file File name of a base image > > -# @preallocation Preallocation mode (allowed values: off, full) > > +# @preallocation Preallocation mode for the new image (default: off; > > +# allowed values: off, full) > > # @redundancy Redundancy of the image > > # @object-size Object size of the image > > # > > @@ -4443,8 +4451,8 @@ > > # > > # @file Node to create the image format on > > # @size Size of the virtual disk in bytes > > -# @preallocation Preallocation mode for the new image (allowed values: off, > > -# metadata; default: off) > > +# @preallocation Preallocation mode for the new image (default: off; > > +# allowed values: off, metadata) > > # > > # Since: 2.12 > > ## > > Preferably with file-win32 rephrased: > Reviewed-by: Markus Armbruster Thanks, Stefano From sgarzare at redhat.com Fri May 24 07:37:30 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Fri, 24 May 2019 09:37:30 +0200 Subject: [GEDI] [Qemu-devel] [PATCH 3/3] block/gluster: update .help of BLOCK_OPT_PREALLOC option In-Reply-To: <87y32xgmd5.fsf@dusky.pond.sub.org> References: <20190523152250.106717-1-sgarzare@redhat.com> <20190523152250.106717-4-sgarzare@redhat.com> <87y32xgmd5.fsf@dusky.pond.sub.org> Message-ID: <20190524073730.u2oimsx3ftxi3ozq@steredhat> On Thu, May 23, 2019 at 06:35:18PM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > Show 'falloc' and 'full' among the allowed values of > > 'preallocation' option, only when they are supported > > ('falloc' is support if defined CONFIG_GLUSTERFS_FALLOCATE, > > 'full' is support if defined CONFIG_GLUSTERFS_ZEROFILL) > > You could mention that 'falloc' is missing before the patch. > I'll fix the commit message. > > Signed-off-by: Stefano Garzarella > > --- > > block/gluster.c | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/block/gluster.c b/block/gluster.c > > index e664ca4462..682fe49912 100644 > > --- a/block/gluster.c > > +++ b/block/gluster.c > > @@ -97,7 +97,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, > > Reviewed-by: Markus Armbruster Thanks, Stefano From sgarzare at redhat.com Fri May 24 07:58:45 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Fri, 24 May 2019 09:58:45 +0200 Subject: [GEDI] [PATCH v2 0/3] Update documentation and help related to the preallocation parameter Message-ID: <20190524075848.23781-1-sgarzare@redhat.com> Following Markus' advice, I updated the documentation of preallocation parameter in qapi/block-core.json adding default and allowed values (patch 1). I also updated the help related to BLOCK_OPT_PREALLOC in the QemuOptsList of file-posix (patch 2) and gluster (patch 3). v2: - Patch 1: removed references to "file-win32" and "file-posix" in the block comment [Markus] - Patch 3: reworded commit message [Markus] Stefano Garzarella (3): qapi/block-core: update documentation of preallocation parameter block/file-posix: update .help of BLOCK_OPT_PREALLOC option block/gluster: update .help of BLOCK_OPT_PREALLOC option qapi/block-core.json | 20 ++++++++++++++------ block/file-posix.c | 6 +++++- block/gluster.c | 9 ++++++++- 3 files changed, 27 insertions(+), 8 deletions(-) -- 2.20.1 From sgarzare at redhat.com Fri May 24 07:58:47 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Fri, 24 May 2019 09:58:47 +0200 Subject: [GEDI] [PATCH v2 2/3] block/file-posix: update .help of BLOCK_OPT_PREALLOC option In-Reply-To: <20190524075848.23781-1-sgarzare@redhat.com> References: <20190524075848.23781-1-sgarzare@redhat.com> Message-ID: <20190524075848.23781-3-sgarzare@redhat.com> Show 'falloc' among the allowed values of 'preallocation' option, only when it is supported (if defined CONFIG_POSIX_FALLOCATE) Signed-off-by: Stefano Garzarella Reviewed-by: Markus Armbruster --- block/file-posix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index d018429672..9632e3a87b 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2751,7 +2751,11 @@ static QemuOptsList raw_create_opts = { { .name = BLOCK_OPT_PREALLOC, .type = QEMU_OPT_STRING, - .help = "Preallocation mode (allowed values: off, falloc, full)" + .help = "Preallocation mode (allowed values: off" +#ifdef CONFIG_POSIX_FALLOCATE + ", falloc" +#endif + ", full)" }, { /* end of list */ } } -- 2.20.1 From sgarzare at redhat.com Fri May 24 07:58:48 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Fri, 24 May 2019 09:58:48 +0200 Subject: [GEDI] [PATCH v2 3/3] block/gluster: update .help of BLOCK_OPT_PREALLOC option In-Reply-To: <20190524075848.23781-1-sgarzare@redhat.com> References: <20190524075848.23781-1-sgarzare@redhat.com> Message-ID: <20190524075848.23781-4-sgarzare@redhat.com> 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 Reviewed-by: Markus Armbruster --- block/gluster.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/block/gluster.c b/block/gluster.c index e664ca4462..682fe49912 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -97,7 +97,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, -- 2.20.1 From sgarzare at redhat.com Fri May 24 07:58:46 2019 From: sgarzare at redhat.com (Stefano Garzarella) Date: Fri, 24 May 2019 09:58:46 +0200 Subject: [GEDI] [PATCH v2 1/3] qapi/block-core: update documentation of preallocation parameter In-Reply-To: <20190524075848.23781-1-sgarzare@redhat.com> References: <20190524075848.23781-1-sgarzare@redhat.com> Message-ID: <20190524075848.23781-2-sgarzare@redhat.com> Add default and available values in the documentation block of each block device or protocol that supports the 'preallocation' parameter during the image creation. Suggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella Reviewed-by: Markus Armbruster --- qapi/block-core.json | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 7ccbfff9d0..e2f7e2b89f 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -4103,7 +4103,10 @@ # # @filename Filename for the new image file # @size Size of the virtual disk in bytes -# @preallocation Preallocation mode for the new image (default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, +# falloc (if defined CONFIG_POSIX_FALLOCATE), +# full (if defined CONFIG_POSIX)) # @nocow Turn off copy-on-write (valid only on btrfs; default: off) # # Since: 2.12 @@ -4121,7 +4124,10 @@ # # @location Where to store the new image file # @size Size of the virtual disk in bytes -# @preallocation Preallocation mode for the new image (default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, +# falloc (if defined CONFIG_GLUSTERFS_FALLOCATE), +# full (if defined CONFIG_GLUSTERFS_ZEROFILL)) # # Since: 2.12 ## @@ -4225,7 +4231,8 @@ # @backing-fmt Name of the block driver to use for the backing file # @encrypt Encryption options if the image should be encrypted # @cluster-size qcow2 cluster size in bytes (default: 65536) -# @preallocation Preallocation mode for the new image (default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, falloc, full, metadata) # @lazy-refcounts True if refcounts may be updated lazily (default: off) # @refcount-bits Width of reference counts in bits (default: 16) # @@ -4408,7 +4415,8 @@ # @location Where to store the new image file # @size Size of the virtual disk in bytes # @backing-file File name of a base image -# @preallocation Preallocation mode (allowed values: off, full) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, full) # @redundancy Redundancy of the image # @object-size Object size of the image # @@ -4443,8 +4451,8 @@ # # @file Node to create the image format on # @size Size of the virtual disk in bytes -# @preallocation Preallocation mode for the new image (allowed values: off, -# metadata; default: off) +# @preallocation Preallocation mode for the new image (default: off; +# allowed values: off, metadata) # # Since: 2.12 ## -- 2.20.1 From armbru at redhat.com Tue May 28 06:15:13 2019 From: armbru at redhat.com (Markus Armbruster) Date: Tue, 28 May 2019 08:15:13 +0200 Subject: [GEDI] [Qemu-devel] [PATCH v2 0/3] Update documentation and help related to the preallocation parameter In-Reply-To: <20190524075848.23781-1-sgarzare@redhat.com> (Stefano Garzarella's message of "Fri, 24 May 2019 09:58:45 +0200") References: <20190524075848.23781-1-sgarzare@redhat.com> Message-ID: <87ftozds0e.fsf@dusky.pond.sub.org> Kevin, Max, this series looks ready to me. Feel free to ask me to take it through my tree. From mreitz at redhat.com Wed May 29 12:49:38 2019 From: mreitz at redhat.com (Max Reitz) Date: Wed, 29 May 2019 14:49:38 +0200 Subject: [GEDI] [Qemu-devel] [PATCH v2 0/3] Update documentation and help related to the preallocation parameter In-Reply-To: <87ftozds0e.fsf@dusky.pond.sub.org> References: <20190524075848.23781-1-sgarzare@redhat.com> <87ftozds0e.fsf@dusky.pond.sub.org> Message-ID: On 28.05.19 08:15, Markus Armbruster wrote: > Kevin, Max, this series looks ready to me. Feel free to ask me to take > it through my tree. *ask* :-) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From armbru at redhat.com Wed May 29 14:14:06 2019 From: armbru at redhat.com (Markus Armbruster) Date: Wed, 29 May 2019 16:14:06 +0200 Subject: [GEDI] [Qemu-devel] [PATCH v2 0/3] Update documentation and help related to the preallocation parameter In-Reply-To: <20190524075848.23781-1-sgarzare@redhat.com> (Stefano Garzarella's message of "Fri, 24 May 2019 09:58:45 +0200") References: <20190524075848.23781-1-sgarzare@redhat.com> Message-ID: <87o93lpcup.fsf@dusky.pond.sub.org> Stefano Garzarella writes: > Following Markus' advice, I updated the documentation of preallocation > parameter in qapi/block-core.json adding default and allowed values (patch 1). > I also updated the help related to BLOCK_OPT_PREALLOC in the QemuOptsList of > file-posix (patch 2) and gluster (patch 3). Queued. Thanks!