All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for 2.5 1/1] parallels: dirty BAT properly for continuous allocations
@ 2015-11-17 17:02 Denis V. Lunev
  2015-11-23  8:31 ` Denis V. Lunev
  2015-11-23 10:24 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Denis V. Lunev @ 2015-11-17 17:02 UTC (permalink / raw)
  Cc: Denis V. Lunev, Vladimir Sementsov-Ogievskiy, qemu-devel,
	Stefan Hajnoczi

From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

This patch marks part of the BAT dirty properly. There is a possibility that
multy-block allocation could have one block allocated on one BAT page and
next block on the next page. The code without the patch could not save
updated position to the file.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Stefan Hajnoczi <stefanha@redhat.com>
---
 block/parallels.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/parallels.c b/block/parallels.c
index 4f79293..f689fde 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -220,7 +220,7 @@ static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num,
         s->bat_bitmap[idx + i] = cpu_to_le32(s->data_end / s->off_multiplier);
         s->data_end += s->tracks;
         bitmap_set(s->bat_dirty_bmap,
-                   bat_entry_off(idx) / s->bat_dirty_block, 1);
+                   bat_entry_off(idx + i) / s->bat_dirty_block, 1);
     }
 
     return bat2sect(s, idx) + sector_num % s->tracks;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for 2.5 1/1] parallels: dirty BAT properly for continuous allocations
  2015-11-17 17:02 [Qemu-devel] [PATCH for 2.5 1/1] parallels: dirty BAT properly for continuous allocations Denis V. Lunev
@ 2015-11-23  8:31 ` Denis V. Lunev
  2015-11-23 10:24 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Denis V. Lunev @ 2015-11-23  8:31 UTC (permalink / raw)
  Cc: Vladimir Sementsov-Ogievskiy, qemu-devel, Stefan Hajnoczi

On 11/17/2015 08:02 PM, Denis V. Lunev wrote:
> From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>
> This patch marks part of the BAT dirty properly. There is a possibility that
> multy-block allocation could have one block allocated on one BAT page and
> next block on the next page. The code without the patch could not save
> updated position to the file.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>   block/parallels.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/parallels.c b/block/parallels.c
> index 4f79293..f689fde 100644
> --- a/block/parallels.c
> +++ b/block/parallels.c
> @@ -220,7 +220,7 @@ static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num,
>           s->bat_bitmap[idx + i] = cpu_to_le32(s->data_end / s->off_multiplier);
>           s->data_end += s->tracks;
>           bitmap_set(s->bat_dirty_bmap,
> -                   bat_entry_off(idx) / s->bat_dirty_block, 1);
> +                   bat_entry_off(idx + i) / s->bat_dirty_block, 1);
>       }
>   
>       return bat2sect(s, idx) + sector_num % s->tracks;
Stefan,

how should we proceed with this? Should I send this as
a pull request or you could take this yourself?

Den

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for 2.5 1/1] parallels: dirty BAT properly for continuous allocations
  2015-11-17 17:02 [Qemu-devel] [PATCH for 2.5 1/1] parallels: dirty BAT properly for continuous allocations Denis V. Lunev
  2015-11-23  8:31 ` Denis V. Lunev
@ 2015-11-23 10:24 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2015-11-23 10:24 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: Vladimir Sementsov-Ogievskiy, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

On Tue, Nov 17, 2015 at 08:02:58PM +0300, Denis V. Lunev wrote:
> From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> 
> This patch marks part of the BAT dirty properly. There is a possibility that
> multy-block allocation could have one block allocated on one BAT page and
> next block on the next page. The code without the patch could not save
> updated position to the file.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  block/parallels.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-23 10:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 17:02 [Qemu-devel] [PATCH for 2.5 1/1] parallels: dirty BAT properly for continuous allocations Denis V. Lunev
2015-11-23  8:31 ` Denis V. Lunev
2015-11-23 10:24 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.