From: Liu Yuan <namei.unix@gmail.com>
To: Teruaki Ishizaki <ishizaki.teruaki@lab.ntt.co.jp>
Cc: kwolf@redhat.com, mitake.hitoshi@lab.ntt.co.jp,
sheepdog@lists.wpkg.org, qemu-devel@nongnu.org,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4] sheepdog: selectable object size support
Date: Mon, 9 Feb 2015 11:08:52 +0800 [thread overview]
Message-ID: <20150209030852.GA3859@ubuntu-trusty> (raw)
In-Reply-To: <54D47403.5070507@lab.ntt.co.jp>
On Fri, Feb 06, 2015 at 04:57:55PM +0900, Teruaki Ishizaki wrote:
> (2015/02/06 11:18), Liu Yuan wrote:
> >On Wed, Feb 04, 2015 at 01:54:19PM +0900, Teruaki Ishizaki wrote:
> >>(2015/02/02 15:52), Liu Yuan wrote:
> >>>On Tue, Jan 27, 2015 at 05:35:27PM +0900, Teruaki Ishizaki wrote:
> >>>>Previously, qemu block driver of sheepdog used hard-coded VDI object size.
> >>>>This patch enables users to handle "block_size_shift" value for
> >>>>calculating VDI object size.
> >>>>
> >>>>When you start qemu, you don't need to specify additional command option.
> >>>>
> >>>>But when you create the VDI which doesn't have default object size
> >>>>with qemu-img command, you specify block_size_shift option.
> >>>>
> >>>>If you want to create a VDI of 8MB(1 << 23) object size,
> >>>>you need to specify following command option.
> >>>>
> >>>> # qemu-img create -o block_size_shift=23 sheepdog:test1 100M
> >>>
> >>>Is it possible to make this option more user friendly? such as
> >>>
> >>> $ qemu-img create -o object_size=8M sheepdog:test 1G
> >>
> >>At first, I thought that the object_size was user friendly.
> >>But, Sheepdog has already the value of block_size_shift
> >>in the inode layout that means like object_size.
> >>
> >>'object_size' doesn't always fit right in 'block_size_shift'.
> >>On the other hands, 'block_size_shift' always fit right in
> >>'object_size'.
> >>
> >>I think that existing layout shouldn't be changed easily and
> >>it seems that it is difficult for users to specify
> >>the object_size value that fit right in 'block_size_shift'.
> >
> >I don't think we need to change the layout. block_size_shift is what QEMU talks
> >to sheep, and QEMU options is what users talks to QEMU. We can convert the user
> >friendly object size into block_size_shift internally in the driver before
> >sending it tosheep daemon, no?
> >
> For example, users specify 12MB for object size, block_size_shift
> doesn't fit exactly to an integer.
In this case, we should abort and print the error message and notify the users
the acceptable range like erasure coding option.
>
> I suppose that normally an administrator do format sheepdog cluster
> with specifying block_size_shift and users usually do qemu-img command
> without a block_size_shift option.
block_size_shift is too developer centered and has a direct relation to the
underlying algorithm. If in the future, e.g, we change the underlying algorithm
about how we represent block size, block_size_shift might not even exsit. So
use object_size would be more generic and won't have this kind of problem.
Secondly, it is not hard to parse the object_size into block_size_shift, so I'd
suggest we'd better try our best to make it user friendly.
Thanks
Yuan
next prev parent reply other threads:[~2015-02-09 3:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 8:35 [Qemu-devel] [PATCH v4] sheepdog: selectable object size support Teruaki Ishizaki
2015-02-02 6:52 ` Liu Yuan
2015-02-04 4:54 ` Teruaki Ishizaki
2015-02-06 2:18 ` Liu Yuan
2015-02-06 7:57 ` Teruaki Ishizaki
2015-02-09 3:08 ` Liu Yuan [this message]
2015-02-10 3:10 ` Liu Yuan
2015-02-10 3:18 ` Liu Yuan
2015-02-10 8:22 ` Teruaki Ishizaki
2015-02-10 8:58 ` Liu Yuan
2015-02-10 9:56 ` Teruaki Ishizaki
2015-02-10 10:35 ` Liu Yuan
2015-02-12 6:19 ` [Qemu-devel] [sheepdog] " Hitoshi Mitake
2015-02-12 7:00 ` Liu Yuan
2015-02-12 7:28 ` Hitoshi Mitake
2015-02-12 7:42 ` Liu Yuan
2015-02-12 8:01 ` Teruaki Ishizaki
2015-02-12 8:11 ` Liu Yuan
2015-02-12 8:13 ` Hitoshi Mitake
2015-02-12 8:16 ` Liu Yuan
2015-02-10 11:12 ` [Qemu-devel] " Liu Yuan
2015-02-12 1:51 ` Teruaki Ishizaki
2015-02-12 2:19 ` Liu Yuan
2015-02-12 2:33 ` Teruaki Ishizaki
2015-02-12 2:55 ` Liu Yuan
2015-02-13 1:33 ` Teruaki Ishizaki
2015-02-13 2:01 ` Liu Yuan
2015-02-13 4:28 ` Teruaki Ishizaki
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=20150209030852.GA3859@ubuntu-trusty \
--to=namei.unix@gmail.com \
--cc=ishizaki.teruaki@lab.ntt.co.jp \
--cc=kwolf@redhat.com \
--cc=mitake.hitoshi@lab.ntt.co.jp \
--cc=qemu-devel@nongnu.org \
--cc=sheepdog@lists.wpkg.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).