2017-03-13 11:46:18 +00:00
|
|
|
/*
|
|
|
|
* qemu_block.h: helper functions for QEMU block subsystem
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __QEMU_BLOCK_H__
|
|
|
|
# define __QEMU_BLOCK_H__
|
|
|
|
|
|
|
|
# include "internal.h"
|
|
|
|
|
|
|
|
# include "qemu_conf.h"
|
2017-04-07 11:06:24 +00:00
|
|
|
# include "qemu_domain.h"
|
2017-03-13 11:46:18 +00:00
|
|
|
|
|
|
|
# include "virhash.h"
|
|
|
|
# include "virjson.h"
|
2017-07-13 13:38:50 +00:00
|
|
|
# include "viruri.h"
|
2017-03-13 11:46:18 +00:00
|
|
|
|
|
|
|
typedef struct qemuBlockNodeNameBackingChainData qemuBlockNodeNameBackingChainData;
|
|
|
|
typedef qemuBlockNodeNameBackingChainData *qemuBlockNodeNameBackingChainDataPtr;
|
|
|
|
struct qemuBlockNodeNameBackingChainData {
|
|
|
|
char *qemufilename; /* name of the image from qemu */
|
|
|
|
char *nodeformat; /* node name of the format layer */
|
|
|
|
char *nodestorage; /* node name of the storage backing the format node */
|
|
|
|
|
2017-07-26 07:36:21 +00:00
|
|
|
qemuBlockNodeNameBackingChainDataPtr backing;
|
2017-07-25 17:10:27 +00:00
|
|
|
|
|
|
|
/* for testing purposes */
|
|
|
|
char *drvformat;
|
|
|
|
char *drvstorage;
|
2017-03-13 11:46:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
virHashTablePtr
|
2017-07-26 07:36:21 +00:00
|
|
|
qemuBlockNodeNameGetBackingChain(virJSONValuePtr namednodesdata,
|
|
|
|
virJSONValuePtr blockstats);
|
2017-03-13 11:46:18 +00:00
|
|
|
|
2017-03-15 12:03:21 +00:00
|
|
|
int
|
|
|
|
qemuBlockNodeNamesDetect(virQEMUDriverPtr driver,
|
2017-04-07 11:06:24 +00:00
|
|
|
virDomainObjPtr vm,
|
|
|
|
qemuDomainAsyncJob asyncJob);
|
2017-03-15 12:03:21 +00:00
|
|
|
|
2017-03-16 11:30:16 +00:00
|
|
|
virHashTablePtr
|
|
|
|
qemuBlockGetNodeData(virJSONValuePtr data);
|
|
|
|
|
2017-11-14 14:34:46 +00:00
|
|
|
bool
|
|
|
|
qemuBlockStorageSourceSupportsConcurrentAccess(virStorageSourcePtr src);
|
|
|
|
|
2017-07-07 15:37:42 +00:00
|
|
|
virJSONValuePtr
|
|
|
|
qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src);
|
2017-07-07 14:29:01 +00:00
|
|
|
|
2017-07-13 13:38:50 +00:00
|
|
|
virURIPtr
|
|
|
|
qemuBlockStorageSourceGetURI(virStorageSourcePtr src);
|
|
|
|
|
2017-03-13 11:46:18 +00:00
|
|
|
#endif /* __QEMU_BLOCK_H__ */
|