Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished

2022-09-10 Thread Vladimir Sementsov-Ogievskiy
On 9/10/22 09:35, liuhaiwei wrote: From: liuhaiwei bug description as https://gitlab.com/qemu-project/qemu/-/issues/1203 Usually,we use the precopy or postcopy mode to migrate block dirty bitmap. but if block-dirty-bitmap size more than threshold size,we cannot entry the migration_completion

Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished

2022-09-10 Thread Vladimir Sementsov-Ogievskiy
Hi! On 9/10/22 13:47, Seaway Liu(刘海伟) wrote: hi,i have a question if failed in migration using post-copy mode,is there some way to restore the memory data back to soucre VM? As far as I understand, no, there is not. Postcopy started actually means: target has started. So, RAM is touched by

Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished

2022-09-10 Thread 刘海伟
hi,i have a question if failed in migration using post-copy mode,is there some way to restore the memory data back to soucre VM? 发自我的小米 在 Vladimir Sementsov-Ogievskiy ,2022年9月10日 下午6:18写道: On 9/10/22 09:35, liuhaiwei wrote: > From: liuhaiwei > > bug description as https://gitlab.com/qemu-pr

Re:Re: [PATCH] bugfix:migrate with block-dirty-bitmap (disk size is big enough) can't be finished

2022-09-10 Thread liuhaiwei9699
sometimes ,post-copy mode is not the best choice. For instance, Supposing migrate process will take ten minutes,but network may be interruptted In this process . If it does happenthe , memory data of VM will be splitted into two parts, and will not be rollback.This is a bad situation so mi

Re: [PATCH v9 2/7] file-posix: introduce helper functions for sysfs attributes

2022-09-10 Thread Damien Le Moal
On 2022/09/10 14:27, Sam Li wrote: > Use get_sysfs_str_val() to get the string value of device > zoned model. Then get_sysfs_zoned_model() can convert it to > BlockZoneModel type of QEMU. > > Use get_sysfs_long_val() to get the long value of zoned device > information. > > Signed-off-by: Sam Li

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-10 Thread Damien Le Moal
On 2022/09/10 14:27, Sam Li wrote: [...] > +/* > + * Send a zone_report command. > + * offset is a byte offset from the start of the device. No alignment > + * required for offset. > + * nr_zones represents IN maximum and OUT actual. > + */ > +int coroutine_fn blk_co_zone_report(BlockBackend *blk,

Re: [PATCH v9 5/7] config: add check to block layer

2022-09-10 Thread Damien Le Moal
On 2022/09/10 14:27, Sam Li wrote: > Putting zoned/non-zoned BlockDrivers on top of each other is not > allowed. > > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi > --- > block.c | 14 ++ > block/file-posix.c | 14 ++ > block

Re: [PATCH v9 4/7] raw-format: add zone operations to pass through requests

2022-09-10 Thread Damien Le Moal
On 2022/09/10 14:27, Sam Li wrote: > raw-format driver usually sits on top of file-posix driver. It needs to > pass through requests of zone commands. > > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal > --- > block/raw-format.c | 13 + > 1 file

Re: [PATCH v9 7/7] docs/zoned-storage: add zoned device documentation

2022-09-10 Thread Damien Le Moal
On 2022/09/10 14:27, Sam Li wrote: > Add the documentation about the zoned device support to virtio-blk > emulation. > > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi > --- > docs/devel/zoned-storage.rst | 41 ++ > docs/system/qemu-block-drivers.rst.inc

Re: [PATCH] block: introduce zone append write for zoned devices

2022-09-10 Thread Damien Le Moal
On 2022/09/10 15:38, Sam Li wrote: > A zone append command is a write operation that specifies the first > logical block of a zone as the write position. When writing to a zoned > block device using zone append, the byte offset of the write is pointing > to the write pointer of that zone. Upon comp

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-10 Thread Sam Li
Damien Le Moal 于2022年9月11日周日 13:31写道: > > On 2022/09/10 14:27, Sam Li wrote: > [...] > > +/* > > + * Send a zone_report command. > > + * offset is a byte offset from the start of the device. No alignment > > + * required for offset. > > + * nr_zones represents IN maximum and OUT actual. > > + */ >

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-10 Thread Damien Le Moal
On 2022/09/11 15:33, Sam Li wrote: > Damien Le Moal 于2022年9月11日周日 13:31写道: [...] >>> +/* >>> + * zone management operations - Execute an operation on a zone >>> + */ >>> +static int coroutine_fn raw_co_zone_mgmt(BlockDriverState *bs, BlockZoneOp >>> op, >>> +int64_t offset, int64_t len) {

Re: [PATCH] block: introduce zone append write for zoned devices

2022-09-10 Thread Damien Le Moal
On 2022/09/11 15:06, Damien Le Moal wrote: > On 2022/09/10 15:38, Sam Li wrote: >> A zone append command is a write operation that specifies the first >> logical block of a zone as the write position. When writing to a zoned >> block device using zone append, the byte offset of the write is pointin

Re: [PATCH v9 5/7] config: add check to block layer

2022-09-10 Thread Sam Li
Damien Le Moal 于2022年9月11日周日 13:34写道: > > On 2022/09/10 14:27, Sam Li wrote: > > Putting zoned/non-zoned BlockDrivers on top of each other is not > > allowed. > > > > Signed-off-by: Sam Li > > Reviewed-by: Stefan Hajnoczi > > --- > > block.c | 14 ++ > > blo