All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liu Yuan <namei.unix@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	sheepdog@lists.wpkg.org, qemu-devel@nongnu.org,
	MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Subject: Re: [Qemu-devel] [PATCH v2 2/2] sheepdog: implement .bdrv_co_is_allocated()
Date: Mon, 22 Apr 2013 23:18:51 +0800	[thread overview]
Message-ID: <517554DB.6060204@gmail.com> (raw)
In-Reply-To: <20130422150348.GC28049@stefanha-thinkpad.redhat.com>

On 04/22/2013 11:03 PM, Stefan Hajnoczi wrote:
> Imagine sector_num = 0 and nb_sectors = SD_DATA_OBJ_SIZE / BDRV_SECTOR_SIZE.
> 
> start = 0
> end = 1
> 
> You don't want object 1, only object 0.

Hmm, math, ouch. So nb_sectors include sector_num? What I mean is

If [start, end] mean a range of sectors,so

1. nb_sectors = end - start + 1 (I assume this one)
2. nb_sectors = end - start (you meant this one?)

which one is correct for .co_is_allocated?

Thanks,
Yuan

  reply	other threads:[~2013-04-22 15:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22  6:59 [Qemu-devel] [PATCH v2 0/2] implement .bdrv_co_is_allocated Liu Yuan
2013-04-22  6:59 ` [Qemu-devel] [PATCH v2 1/2] sheepdog: use BDRV_SECTOR_SIZE Liu Yuan
2013-04-22  6:59 ` [Qemu-devel] [PATCH v2 2/2] sheepdog: implement .bdrv_co_is_allocated() Liu Yuan
2013-04-22 12:00   ` Stefan Hajnoczi
2013-04-22 12:10     ` Liu Yuan
2013-04-22 15:03       ` Stefan Hajnoczi
2013-04-22 15:18         ` Liu Yuan [this message]
2013-04-22 20:46           ` Stefan Hajnoczi
2013-04-23  5:55             ` Liu Yuan

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=517554DB.6060204@gmail.com \
    --to=namei.unix@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=morita.kazutaka@lab.ntt.co.jp \
    --cc=qemu-devel@nongnu.org \
    --cc=sheepdog@lists.wpkg.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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.