All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Subject: Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()
Date: Tue, 15 Sep 2020 09:21:03 +0200	[thread overview]
Message-ID: <04c2c90e-fbd7-f505-8379-29ad1be6a402@redhat.com> (raw)
In-Reply-To: <w51363ks41j.fsf@maestria.local.igalia.com>


[-- Attachment #1.1: Type: text/plain, Size: 916 bytes --]

On 14.09.20 18:42, Alberto Garcia wrote:
> On Mon 14 Sep 2020 02:14:36 PM CEST, Max Reitz wrote:
> 
>> However, I wonder what you think about “cluster_offset” in
>> qcow2_alloc_host_offset.  It isn’t a cluster offset anymore.
>> Can/should we rename it?
> 
> That variable was not a cluster offset before this patch either (at
> least not during the first iteration of the loop).

Hm, yes.  Doesn’t make it less wrong, but you’re right, there is no
argument why this should be addressed in this patch (or series).

> The difference is that *host_offset is always the offset of the
> beginning of the requested region, and cluster_offset increases with
> every iteration of the loop. Maybe current_offset / current_host_offset?
> I don't know, but I'm fine with changing it if you have a good name.

current_host_offset sounds nice.  But let’s just leave it how it is for now.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-09-15  7:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 14:09 [PATCH 0/2] Make preallocate_co() resize the image to the correct size Alberto Garcia
2020-09-11 14:09 ` [PATCH 1/2] qcow2: " Alberto Garcia
2020-09-14 12:14   ` Max Reitz
2020-09-15  9:29   ` Max Reitz
2020-09-15  9:37     ` Alberto Garcia
2020-09-11 14:09 ` [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset() Alberto Garcia
2020-09-14 12:14   ` Max Reitz
2020-09-14 16:42     ` Alberto Garcia
2020-09-15  7:21       ` Max Reitz [this message]
2020-09-15  7:22 ` [PATCH 0/2] Make preallocate_co() resize the image to the correct size Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04c2c90e-fbd7-f505-8379-29ad1be6a402@redhat.com \
    --to=mreitz@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.