[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state stor
From: |
Jeff Cody |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes |
Date: |
Fri, 14 Feb 2014 09:41:46 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, (continued)
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Benoît Canet, 2014/02/05
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Bharata B Rao, 2014/02/06
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Benoît Canet, 2014/02/07
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Bharata B Rao, 2014/02/07
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Jeff Cody, 2014/02/07
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Benoît Canet, 2014/02/10
- Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Benoît Canet, 2014/02/07
Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Stefan Hajnoczi, 2014/02/14
Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Stefan Hajnoczi, 2014/02/14
Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes, Kevin Wolf, 2014/02/14