Re: [PATCH 4/5] block, migration: add bdrv_flush_vmstate helper

2020-06-18 Thread Vladimir Sementsov-Ogievskiy
17.06.2020 00:29, Denis V. Lunev wrote:   if (ret < 0) {   return ret;   } ...attempting it here, at which point it looks like the only reason you need ret2 is to preserve ret long enough... no, I would like to be sure that intermediate state is always cleared at the end. In

Re: [PATCH 4/5] block, migration: add bdrv_flush_vmstate helper

2020-06-18 Thread Vladimir Sementsov-Ogievskiy
16.06.2020 19:20, Denis V. Lunev wrote: Right now bdrv_fclose() is just calling bdrv_flush(). The problem is that migration code is working inefficently from black layer terms and are frequently called for very small pieces of not properly aligned data. Block layer is capable to work this way,

Re: [PATCH 4/5] block, migration: add bdrv_flush_vmstate helper

2020-06-16 Thread Denis V. Lunev
On 6/17/20 12:11 AM, Eric Blake wrote: > On 6/16/20 11:20 AM, Denis V. Lunev wrote: >> Right now bdrv_fclose() is just calling bdrv_flush(). >> >> The problem is that migration code is working inefficently from black > > inefficiently, block > >> layer terms and are frequently called for very

Re: [PATCH 4/5] block, migration: add bdrv_flush_vmstate helper

2020-06-16 Thread Eric Blake
On 6/16/20 11:20 AM, Denis V. Lunev wrote: Right now bdrv_fclose() is just calling bdrv_flush(). The problem is that migration code is working inefficently from black inefficiently, block layer terms and are frequently called for very small pieces of not properly aligned data. Block layer

[PATCH 4/5] block, migration: add bdrv_flush_vmstate helper

2020-06-16 Thread Denis V. Lunev
Right now bdrv_fclose() is just calling bdrv_flush(). The problem is that migration code is working inefficently from black layer terms and are frequently called for very small pieces of not properly aligned data. Block layer is capable to work this way, but this is very slow. This patch is a