[pve-devel] pve-qemu-kvm 2.7 : memory state snasphot not working
Alexandre DERUMIER
aderumier at odiso.com
Mon Nov 7 09:15:34 CET 2016
ok,
i can confirm that
snap_state.bs_pos = 0
in pve-qemu-kvm 2.7, I'm seeing a new patch
debian/patches/pve/0041-savevm-async-updates.patch
which remove
-static ssize_t block_state_put_buffer(void *opaque, const uint8_t *buf,
64 - int64_t pos, size_t size)
static const QEMUFileOps block_file_ops = {
126 - .put_buffer = block_state_put_buffer,
127 + .writev_buffer = block_state_writev_buffer,
128 .close = block_state_close,
129 };
the snap_state.bs_pos was compute in block_state_put_buffer.
591 +static int block_state_put_buffer(void *opaque, const uint8_t *buf,
592 + int64_t pos, int size)
593 +{
594 + int ret;
595 +
596 + assert(pos == snap_state.bs_pos);
597 +
598 + if ((ret = bdrv_pwrite(snap_state.bs, snap_state.bs_pos, buf, size)) > 0) {
599 + snap_state.bs_pos += ret;
600 + }
601 +
602 + return ret;
603 +}
679 +static const QEMUFileOps block_file_ops = {
680 + .put_buffer = block_state_put_buffer,
681 + .close = block_state_close,
682 +};
So, maybe we need to readd code in new block_state_writev_buffer ?
----- Mail original -----
De: "Alexandre Derumier" <aderumier at odiso.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Lundi 7 Novembre 2016 08:53:34
Objet: Re: [pve-devel] pve-qemu-kvm 2.7 : memory state snasphot not working
I'm not sure, but in cleanup:
size_t size = (snap_state.bs_pos + BDRV_SECTOR_SIZE) & BDRV_SECTOR_MASK;
blk_truncate(snap_state.target, size);
I think that BDRV_SECTOR_SIZE=512 , so maybe snap_state.bs_pos=0 (bug) , which result of wrong trim size.
I'll do tests.
----- Mail original -----
De: "Alexandre Derumier" <aderumier at odiso.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Lundi 7 Novembre 2016 08:44:31
Objet: Re: [pve-devel] pve-qemu-kvm 2.7 : memory state snasphot not working
the coroutine seem to works good:
maybe it's a bug in save_snapshot_cleanup, which is trimming to 512bytes the file
savevm-async: savevm inerate pending size 9136054272 ret 9665
savevm-async: savevm inerate pending size 9096466432 ret 36161
savevm-async: savevm inerate pending size 8948350976 ret 36353
savevm-async: savevm inerate pending size 8799449088 ret 36353
savevm-async: savevm inerate pending size 8650547200 ret 36545
savevm-async: savevm inerate pending size 8500858880 ret 36609
savevm-async: savevm inerate pending size 8350908416 ret 29633
savevm-async: savevm inerate pending size 8229531648 ret 9985
savevm-async: savevm inerate pending size 8188633088 ret 34689
savevm-async: savevm inerate pending size 8046546944 ret 36609
savevm-async: savevm inerate pending size 7896596480 ret 36545
savevm-async: savevm inerate pending size 7746908160 ret 36609
savevm-async: savevm inerate pending size 7596957696 ret 36481
savevm-async: savevm inerate pending size 7447531520 ret 36481
savevm-async: savevm inerate pending size 7298105344 ret 36545
savevm-async: savevm inerate pending size 7148417024 ret 34113
savevm-async: savevm inerate pending size 7008690176 ret 36289
savevm-async: savevm inerate pending size 6860050432 ret 35649
savevm-async: savevm inerate pending size 6714032128 ret 35393
savevm-async: savevm inerate pending size 6569062400 ret 36481
savevm-async: savevm inerate pending size 6419636224 ret 36545
savevm-async: savevm inerate pending size 6269947904 ret 36481
savevm-async: savevm inerate pending size 6120521728 ret 33921
savevm-async: savevm inerate pending size 5981581312 ret 34945
savevm-async: savevm inerate pending size 5838446592 ret 36481
savevm-async: savevm inerate pending size 5689020416 ret 36545
savevm-async: savevm inerate pending size 5539332096 ret 36417
savevm-async: savevm inerate pending size 5390168064 ret 36417
savevm-async: savevm inerate pending size 5241004032 ret 36609
savevm-async: savevm inerate pending size 5091053568 ret 36609
savevm-async: savevm inerate pending size 4941103104 ret 36545
savevm-async: savevm inerate pending size 4791414784 ret 36609
savevm-async: savevm inerate pending size 4641464320 ret 36481
savevm-async: savevm inerate pending size 4492038144 ret 36545
savevm-async: savevm inerate pending size 4342349824 ret 36609
savevm-async: savevm inerate pending size 4192399360 ret 36609
savevm-async: savevm inerate pending size 4042448896 ret 36161
savevm-async: savevm inerate pending size 3894333440 ret 36673
savevm-async: savevm inerate pending size 3744120832 ret 36865
savevm-async: savevm inerate pending size 3593121792 ret 36737
savevm-async: savevm inerate pending size 3442647040 ret 36801
savevm-async: savevm inerate pending size 3291910144 ret 36865
savevm-async: savevm inerate pending size 3140911104 ret 36801
savevm-async: savevm inerate pending size 2990174208 ret 36673
savevm-async: savevm inerate pending size 2839961600 ret 36609
savevm-async: savevm inerate pending size 2690011136 ret 36609
savevm-async: savevm inerate pending size 2540060672 ret 36481
savevm-async: savevm inerate pending size 2390634496 ret 36481
savevm-async: savevm inerate pending size 2241208320 ret 36481
savevm-async: savevm inerate pending size 2091782144 ret 36545
savevm-async: savevm inerate pending size 1942093824 ret 36545
savevm-async: savevm inerate pending size 1792405504 ret 36481
savevm-async: savevm inerate pending size 1642979328 ret 36417
savevm-async: savevm inerate pending size 1493815296 ret 14657
savevm-async: savevm inerate pending size 1433780224 ret 22337
savevm-async: savevm inerate pending size 1342287872 ret 36545
savevm-async: savevm inerate pending size 1192599552 ret 36353
savevm-async: savevm inerate pending size 1043697664 ret 36673
savevm-async: savevm inerate pending size 893485056 ret 36673
savevm-async: savevm inerate pending size 743272448 ret 35137
savevm-async: savevm inerate pending size 599351296 ret 35905
savevm-async: savevm inerate pending size 452284416 ret 13313
savevm-async: savevm inerate pending size 397754368 ret 7361
savevm-async: savevm inerate pending size 367603712 ret 4929
savevm-async: savevm inerate pending size 347414528 ret 4545
savevm-async: savevm inerate pending size 328798208 ret 5761
savevm-async: savevm inerate pending size 305201152 ret 4801
savevm-async: savevm inerate pending size 285536256 ret 4737
savevm-async: savevm inerate pending size 266133504 ret 4609
savevm-async: savevm inerate pending size 247255040 ret 4673
savevm-async: savevm inerate pending size 228114432 ret 3905
savevm-async: savevm inerate pending size 212119552 ret 4673
savevm-async: savevm inerate pending size 192978944 ret 4737
savevm-async: savevm inerate pending size 173576192 ret 4481
savevm-async: savevm inerate pending size 155222016 ret 4033
savevm-async: savevm inerate pending size 138702848 ret 4161
savevm-async: savevm inerate pending size 121659392 ret 4161
savevm-async: savevm inerate pending size 104615936 ret 4033
savevm-async: savevm inerate pending size 88096768 ret 2881
savevm-async: savevm inerate pending size 76296192 ret 4033
savevm-async: savevm inerate pending size 59777024 ret 4225
savevm-async: savevm inerate pending size 42471424 ret 2305
savevm-async: savevm inerate pending size 33030144 ret 3649
savevm-async: savevm inerate pending size 18083840 ret 4415
savevm-async: done iterating
savevm-async: savevm inerate finished
savevm-async: save complete
savevm-async: save_snapshot_completed
savevm-async: save_snapshot_cleanup
----- Mail original -----
De: "Alexandre Derumier" <aderumier at odiso.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Lundi 7 Novembre 2016 07:11:55
Objet: Re: [pve-devel] pve-qemu-kvm 2.7 : memory state snasphot not working
I'll try to have a look at it this week.
I think something don't work correcly in savevm-async.c, process_savevm_co().
Need to add debug log to find the problem.
----- Mail original -----
De: "Lindsay Mathieson" <lindsay.mathieson at gmail.com>
À: "datanom.net" <mir at datanom.net>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Dimanche 6 Novembre 2016 23:39:43
Objet: Re: [pve-devel] pve-qemu-kvm 2.7 : memory state snasphot not working
Is there any priority on this? Live snapshots are broken in the latest
version
On 2/11/2016 8:30 PM, Michael Rasmussen wrote:
> I see it here on ZFS too.
>
> On November 2, 2016 10:43:31 AM GMT+01:00, Lindsay Mathieson
> <lindsay.mathieson at gmail.com> wrote:
>
> On 2/11/2016 5:28 PM, Alexandre DERUMIER wrote:
>
> I checked and the VM state .raw file is only 512 bytes
> (should be 1+
>
> GB), so that is probably the problem. An issue
> with saving the snapshot.
>
> Yes, same here, 512 bytes.
>
>
> For comparison I migrated the VM to a NFS share and tested that - exact
> same issues.
>
>
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
Lindsay Mathieson
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list