Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-07-01 Thread Paolo Bonzini
Il 19/06/2012 13:05, Stefan Hajnoczi ha scritto: >> > I picked up this logic from block/raw-posix.c:raw_open_common(). Don't see >> > anything related to bs->enable_write_cache there. Will find out more about >> > bs->enable_write_cache. > If you fetch the latest qemu.git and check bdrv_open_common

Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-07-01 Thread Paolo Bonzini
Il 18/06/2012 19:35, Stefan Hajnoczi ha scritto: >> > +/* Use O_DSYNC for write-through caching, no flags for write-back >> > caching, >> > + * and O_DIRECT for no caching. */ >> > +if ((bdrv_flags & BDRV_O_NOCACHE)) >> > +s->open_flags |= O_DIRECT; >> > +if (!(bdrv_flags &

Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-06-19 Thread Stefan Hajnoczi
On Tue, Jun 19, 2012 at 10:30 AM, Bharata B Rao wrote: > On Mon, Jun 18, 2012 at 06:35:28PM +0100, Stefan Hajnoczi wrote: >> On Mon, Jun 11, 2012 at 3:21 PM, Bharata B Rao >> wrote: >> > + á á/* Use O_DSYNC for write-through caching, no flags for write-back >> > caching, >> > + á á * and O_DIREC

Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-06-19 Thread Bharata B Rao
On Mon, Jun 18, 2012 at 06:35:28PM +0100, Stefan Hajnoczi wrote: > On Mon, Jun 11, 2012 at 3:21 PM, Bharata B Rao > wrote: > > +#include "block_int.h" > > +#include "gluster-helpers.h" > > + > > +typedef void *gluster_file_t; > > This typedef is already in gluster-helpers.h. Yes, will fix that.

Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-06-19 Thread Avi Kivity
On 06/18/2012 08:35 PM, Stefan Hajnoczi wrote: > On Mon, Jun 11, 2012 at 3:21 PM, Bharata B Rao > wrote: >> +#include "block_int.h" >> +#include "gluster-helpers.h" >> + >> +typedef void *gluster_file_t; > > This typedef is already in gluster-helpers.h. It's ugly BTW, "typedef > struct gluster_f

Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 11, 2012 at 3:21 PM, Bharata B Rao wrote: > +#include "block_int.h" > +#include "gluster-helpers.h" > + > +typedef void *gluster_file_t; This typedef is already in gluster-helpers.h. It's ugly BTW, "typedef struct gluster_file gluster_file_t" is nicer since it won't cast to other poi

[Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-06-11 Thread Bharata B Rao
block: gluster as block backend From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Signed-off-by: Bharata B Rao --- Makefile.objs |2 block/gluster.c | 435 +