From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Tomáš Golembiovský" <tgolembi@redhat.com>,
qemu-devel@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
qemu-block@nongnu.org,
"Daniel P . Berrange" <berrange@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4] raw_bsd: add offset and size options
Date: Wed, 19 Oct 2016 17:45:53 +0200 [thread overview]
Message-ID: <20161019154553.GG5336@noname.redhat.com> (raw)
In-Reply-To: <e298a2af-51e6-9c95-a624-69580d5ea9f7@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]
Am 19.10.2016 um 17:38 hat Eric Blake geschrieben:
> On 10/19/2016 07:27 AM, Tomáš Golembiovský wrote:
> > Added two new options 'offset' and 'size'. This makes it possible to use
> > only part of the file as a device. This can be used e.g. to limit the
> > access only to single partition in a disk image or use a disk inside a
> > tar archive (like OVA).
> >
> > When 'size' is specified we do our best to honour it.
> >
> > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
> > ---
> > block/raw_bsd.c | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++-
> > qapi/block-core.json | 16 ++++-
> > 2 files changed, 180 insertions(+), 4 deletions(-)
> >
> > diff --git a/block/raw_bsd.c b/block/raw_bsd.c
> > index 588d408..25b5ba8 100644
> > --- a/block/raw_bsd.c
> > +++ b/block/raw_bsd.c
> > @@ -31,6 +31,30 @@
> > #include "qapi/error.h"
> > #include "qemu/option.h"
> >
> > +typedef struct BDRVRawState {
> > + uint64_t offset;
> > + uint64_t size;
> > + bool has_size;
> > +} BDRVRawState;
>
> This seems like it is duplicating a struct that QAPI should be able to
> give us for free, if we would just use it.
Possibly it has the same fields as BlockdevOptionsRaw, but I would use
QAPI structs only for configuring a block device and not for its state
after opening it (i.e. bs->opaque).
So I agree with the explicit definition here.
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2016-10-19 15:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 12:27 [Qemu-devel] [PATCH v4] Add 'offset' and 'size' options Tomáš Golembiovský
2016-10-19 12:27 ` [Qemu-devel] [PATCH v4] raw_bsd: add offset and size options Tomáš Golembiovský
2016-10-19 15:38 ` Eric Blake
2016-10-19 15:45 ` Kevin Wolf [this message]
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=20161019154553.GG5336@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=tgolembi@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).