From: Jeff Cody <jcody@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
bharata@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes
Date: Fri, 14 Feb 2014 09:41:46 -0500 [thread overview]
Message-ID: <20140214144146.GF10167@localhost.localdomain> (raw)
In-Reply-To: <20140214142128.GF17391@stefanha-thinkpad.redhat.com>
On Fri, Feb 14, 2014 at 03:21:28PM +0100, Stefan Hajnoczi wrote:
> On Tue, Feb 04, 2014 at 02:26:58PM -0500, Jeff Cody wrote:
> > @@ -291,23 +311,17 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict *options,
> >
> > filename = qemu_opt_get(opts, "filename");
> >
> > + s->filename = g_strdup(filename);
>
> It's not obvious to me that copying the filename is necessary.
> block/raw-posix.c does this:
>
> raw_s->fd = qemu_open(state->bs->filename, raw_s->open_flags);
>
> Why didn't you use bs->filename?
>
Back when the raw-posix reopen was implemented, the .bdrv_file_open
used the char * filename instead of options parameters. Now that the
filename is explicitly parsed via the options, I thought it made
logical sense to cache the filename into the protocol state variable,
for later use by reopen.
That way if the bs->filename was changed in some manner, the protocol
would have the variable as originally intended to be passed to the
.bdrv_file_open() method.
In reality, I should be able to just use bs->filename instead, as it
does not get modified; this just seemed to make a bit more sense.
next prev parent reply other threads:[~2014-02-14 14:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 19:26 [Qemu-devel] [PATCH 0/2] block: add support for gluster reopen Jeff Cody
2014-02-04 19:26 ` [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes Jeff Cody
2014-02-05 19:25 ` Benoît Canet
2014-02-07 3:44 ` Bharata B Rao
2014-02-07 14:22 ` Benoît Canet
2014-02-07 15:27 ` Bharata B Rao
2014-02-07 15:57 ` Jeff Cody
2014-02-10 17:49 ` Benoît Canet
2014-02-07 15:59 ` Benoît Canet
2014-02-14 14:12 ` Stefan Hajnoczi
2014-02-14 14:44 ` Jeff Cody
2014-02-14 14:21 ` Stefan Hajnoczi
2014-02-14 14:41 ` Jeff Cody [this message]
2014-02-14 15:38 ` Stefan Hajnoczi
2014-02-14 16:20 ` Jeff Cody
2014-02-14 16:28 ` Kevin Wolf
2014-02-04 19:26 ` [Qemu-devel] [PATCH 2/2] block: gluster - add reopen support Jeff Cody
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=20140214144146.GF10167@localhost.localdomain \
--to=jcody@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.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 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).