From: Kevin Wolf <kwolf@redhat.com>
To: "Tomáš Golembiovský" <tgolembi@redhat.com>
Cc: qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Eric Blake <eblake@redhat.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v8 1/2] raw_bsd: add offset and size options
Date: Mon, 31 Oct 2016 12:11:37 +0100 [thread overview]
Message-ID: <20161031111137.GA5522@noname.redhat.com> (raw)
In-Reply-To: <99db1b09f35af003a9f624d30a39fc6befc2fe54.1477909279.git.tgolembi@redhat.com>
Am 31.10.2016 um 11:27 hat Tomáš Golembiovský geschrieben:
> 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>
> @@ -181,6 +356,10 @@ static BlockAIOCB *raw_aio_ioctl(BlockDriverState *bs,
> BlockCompletionFunc *cb,
> void *opaque)
> {
> + BDRVRawState *s = bs->opaque;
> + if (s->offset || s->has_size) {
> + return NULL;
> + }
> return bdrv_aio_ioctl(bs->file->bs, req, buf, cb, opaque);
> }
>
This hunk had a real merge conflict (aio -> co), so I'm posting my
conflict resolution below.
Kevin
@@ -178,6 +353,10 @@ static void raw_lock_medium(BlockDriverState *bs, bool locked)
static int raw_co_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
{
+ BDRVRawState *s = bs->opaque;
+ if (s->offset || s->has_size) {
+ return -ENOTSUP;
+ }
return bdrv_co_ioctl(bs->file->bs, req, buf);
}
next prev parent reply other threads:[~2016-10-31 11:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 10:27 [Qemu-devel] [PATCH v8 0/2] Add 'offset' and 'size' options Tomáš Golembiovský
2016-10-31 10:27 ` [Qemu-devel] [PATCH v8 1/2] raw_bsd: add offset and size options Tomáš Golembiovský
2016-10-31 11:11 ` Kevin Wolf [this message]
2016-10-31 10:27 ` [Qemu-devel] [PATCH v8 2/2] qemu-iotests: test 'offset' and 'size' options in raw driver Tomáš Golembiovský
2016-10-31 11:12 ` [Qemu-devel] [PATCH v8 0/2] Add 'offset' and 'size' options Kevin Wolf
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=20161031111137.GA5522@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 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.