mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
migration: Remove unused functions
migrate_rdma_pin_all() and qsb_clone() are completely unused and thus can be deleted. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Cc: Juan Quintela <quintela@redhat.com> Cc: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
f54a235f9b
commit
21cb4924f7
@ -139,7 +139,6 @@ void migrate_add_blocker(Error *reason);
|
||||
*/
|
||||
void migrate_del_blocker(Error *reason);
|
||||
|
||||
bool migrate_rdma_pin_all(void);
|
||||
bool migrate_zero_blocks(void);
|
||||
|
||||
bool migrate_auto_converge(void);
|
||||
|
@ -133,7 +133,6 @@ bool qemu_file_mode_is_not_valid(const char *mode);
|
||||
bool qemu_file_is_writable(QEMUFile *f);
|
||||
|
||||
QEMUSizedBuffer *qsb_create(const uint8_t *buffer, size_t len);
|
||||
QEMUSizedBuffer *qsb_clone(const QEMUSizedBuffer *);
|
||||
void qsb_free(QEMUSizedBuffer *);
|
||||
size_t qsb_set_length(QEMUSizedBuffer *qsb, size_t length);
|
||||
size_t qsb_get_length(const QEMUSizedBuffer *qsb);
|
||||
|
@ -579,15 +579,6 @@ void qmp_migrate_set_downtime(double value, Error **errp)
|
||||
max_downtime = (uint64_t)value;
|
||||
}
|
||||
|
||||
bool migrate_rdma_pin_all(void)
|
||||
{
|
||||
MigrationState *s;
|
||||
|
||||
s = migrate_get_current();
|
||||
|
||||
return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL];
|
||||
}
|
||||
|
||||
bool migrate_auto_converge(void)
|
||||
{
|
||||
MigrationState *s;
|
||||
|
@ -365,37 +365,6 @@ ssize_t qsb_write_at(QEMUSizedBuffer *qsb, const uint8_t *source,
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a deep copy of the given QEMUSizedBuffer.
|
||||
*
|
||||
* @qsb: A QEMUSizedBuffer
|
||||
*
|
||||
* Returns a clone of @qsb or NULL on allocation failure
|
||||
*/
|
||||
QEMUSizedBuffer *qsb_clone(const QEMUSizedBuffer *qsb)
|
||||
{
|
||||
QEMUSizedBuffer *out = qsb_create(NULL, qsb_get_length(qsb));
|
||||
size_t i;
|
||||
ssize_t res;
|
||||
off_t pos = 0;
|
||||
|
||||
if (!out) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < qsb->n_iov; i++) {
|
||||
res = qsb_write_at(out, qsb->iov[i].iov_base,
|
||||
pos, qsb->iov[i].iov_len);
|
||||
if (res < 0) {
|
||||
qsb_free(out);
|
||||
return NULL;
|
||||
}
|
||||
pos += res;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
typedef struct QEMUBuffer {
|
||||
QEMUSizedBuffer *qsb;
|
||||
QEMUFile *file;
|
||||
|
Loading…
Reference in New Issue
Block a user