]> git.proxmox.com Git - mirror_qemu.git/commit
rbd: Don't limit length of parameter values
authorMarkus Armbruster <armbru@redhat.com>
Tue, 28 Mar 2017 08:56:01 +0000 (10:56 +0200)
committerJeff Cody <jcody@redhat.com>
Tue, 28 Mar 2017 13:53:16 +0000 (09:53 -0400)
commit730b00bbfdc15f914f47e03a703fa7647c10c4a9
tree09a4982d4809cf611aed006c261e4660736721e2
parentf51c363c2ba97af02fedaeb7eaad68f433007382
rbd: Don't limit length of parameter values

We laboriously enforce that parameter values are between one and some
arbitrary limit in length.  Only RBD_MAX_IMAGE_NAME_SIZE comes from
librbd.h, and I'm not sure it applies.  Where the other limits come
from is unclear.

Drop the length checking.  The limits librbd actually imposes must be
checked by librbd anyway.

There's one minor complication: BDRVRBDState member name is a
fixed-size array.  Depends on the length limit.  Make it a pointer to
a dynamically allocated string.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Message-id: 1490691368-32099-4-git-send-email-armbru@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/rbd.c