Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Adding breaktrace & disabling timer migration"
[kvmfornfv.git]
/
qemu
/
block
/
nbd-client.h
diff --git
a/qemu/block/nbd-client.h
b/qemu/block/nbd-client.h
index
e841340
..
bc7aec0
100644
(file)
--- a/
qemu/block/nbd-client.h
+++ b/
qemu/block/nbd-client.h
@@
-4,6
+4,7
@@
#include "qemu-common.h"
#include "block/nbd.h"
#include "block/block_int.h"
#include "qemu-common.h"
#include "block/nbd.h"
#include "block/block_int.h"
+#include "io/channel-socket.h"
/* #define DEBUG_NBD */
/* #define DEBUG_NBD */
@@
-17,7
+18,8
@@
#define MAX_NBD_REQUESTS 16
typedef struct NbdClientSession {
#define MAX_NBD_REQUESTS 16
typedef struct NbdClientSession {
- int sock;
+ QIOChannelSocket *sioc; /* The master data channel */
+ QIOChannel *ioc; /* The current I/O channel which may differ (eg TLS) */
uint32_t nbdflags;
off_t size;
uint32_t nbdflags;
off_t size;
@@
-34,7
+36,11
@@
typedef struct NbdClientSession {
NbdClientSession *nbd_get_client_session(BlockDriverState *bs);
NbdClientSession *nbd_get_client_session(BlockDriverState *bs);
-int nbd_client_init(BlockDriverState *bs, int sock, const char *export_name,
+int nbd_client_init(BlockDriverState *bs,
+ QIOChannelSocket *sock,
+ const char *export_name,
+ QCryptoTLSCreds *tlscreds,
+ const char *hostname,
Error **errp);
void nbd_client_close(BlockDriverState *bs);
Error **errp);
void nbd_client_close(BlockDriverState *bs);
@@
-42,7
+48,7
@@
int nbd_client_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors);
int nbd_client_co_flush(BlockDriverState *bs);
int nbd_client_co_writev(BlockDriverState *bs, int64_t sector_num,
int nb_sectors);
int nbd_client_co_flush(BlockDriverState *bs);
int nbd_client_co_writev(BlockDriverState *bs, int64_t sector_num,
- int nb_sectors, QEMUIOVector *qiov);
+ int nb_sectors, QEMUIOVector *qiov
, int *flags
);
int nbd_client_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov);
int nbd_client_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov);