]> git.proxmox.com Git - mirror_qemu.git/commit
gluster: stop using .bdrv_needs_filename
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 11 Aug 2022 16:49:05 +0000 (12:49 -0400)
committerKevin Wolf <kwolf@redhat.com>
Fri, 30 Sep 2022 16:43:44 +0000 (18:43 +0200)
commit9a891a91a19a9b999fec00ce6e27bc71c93273ec
tree19b222f799402b0905b9632d987828fb6264818f
parent131498f775ea18852992dc56441eba33de3fcde5
gluster: stop using .bdrv_needs_filename

The gluster protocol driver used to parse URIs (filenames) but was
extended with a richer JSON syntax in commit 6c7189bb29de
("block/gluster: add support for multiple gluster servers"). The gluster
drivers that have JSON parsing set .bdrv_needs_filename to false.

The gluster+unix and gluster+rdma drivers still to require a filename
even though the JSON parser is equipped to parse the same
volume/path/sockaddr details as the URI parser. Let's allow JSON parsing
for these drivers too.

Note that the gluster+rdma driver actually uses TCP because RDMA support
is not available, so the JSON server.type field must be "inet".

Drop .bdrv_needs_filename since both the filename and the JSON parsers
can handle gluster+unix and gluster+rdma. This change is in preparation
for eventually removing .bdrv_needs_filename across the entire codebase.

Cc: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220811164905.430834-1-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/gluster.c