Re: [Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-07-06 Thread Kevin Wolf
Am 05.07.2011 20:21, schrieb MORITA Kazutaka: >>> + >>> +max_idx = (vdi_size + SD_DATA_OBJ_SIZE - 1) / SD_DATA_OBJ_SIZE; >>> + >>> +for (idx = 0; idx < max_idx; idx++) { >>> +uint64_t oid; >>> +oid = vid_to_data_oid(vid, idx); >>> + >>> +if (inode->data_vdi_id[idx])

Re: [Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-07-05 Thread MORITA Kazutaka
At Fri, 01 Jul 2011 10:29:09 +0200, Kevin Wolf wrote: > > Am 21.05.2011 14:35, schrieb MORITA Kazutaka: > > This introduces a qemu-img create option for sheepdog which allows the > > data to be preallocated (note that sheepdog always preallocates > > metadata). This is necessary to use Sheepdog v

Re: [Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-07-01 Thread Kevin Wolf
Am 21.05.2011 14:35, schrieb MORITA Kazutaka: > This introduces a qemu-img create option for sheepdog which allows the > data to be preallocated (note that sheepdog always preallocates > metadata). This is necessary to use Sheepdog volumes as a backend > storage for iSCSI target. More information

Re: [Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-05-23 Thread Stefan Hajnoczi
On Mon, May 23, 2011 at 12:13 PM, MORITA Kazutaka wrote: > At Mon, 23 May 2011 10:19:13 +0100, > Stefan Hajnoczi wrote: >> >> On Sat, May 21, 2011 at 1:35 PM, MORITA Kazutaka >> wrote: >> > +static int sd_prealloc(uint32_t vid, int64_t vdi_size) >> > +{ >> > +    int fd, ret; >> > +    SheepdogIn

Re: [Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-05-23 Thread MORITA Kazutaka
At Mon, 23 May 2011 10:19:13 +0100, Stefan Hajnoczi wrote: > > On Sat, May 21, 2011 at 1:35 PM, MORITA Kazutaka > wrote: > > +static int sd_prealloc(uint32_t vid, int64_t vdi_size) > > +{ > > +    int fd, ret; > > +    SheepdogInode *inode; > > +    char *buf; > > +    unsigned long idx, max_idx;

Re: [Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-05-23 Thread Stefan Hajnoczi
On Sat, May 21, 2011 at 1:35 PM, MORITA Kazutaka wrote: > +static int sd_prealloc(uint32_t vid, int64_t vdi_size) > +{ > +    int fd, ret; > +    SheepdogInode *inode; > +    char *buf; > +    unsigned long idx, max_idx; [...] > +    max_idx = (vdi_size + SD_DATA_OBJ_SIZE - 1) / SD_DATA_OBJ_SIZE;

[Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-05-21 Thread MORITA Kazutaka
This introduces a qemu-img create option for sheepdog which allows the data to be preallocated (note that sheepdog always preallocates metadata). This is necessary to use Sheepdog volumes as a backend storage for iSCSI target. More information is available at https://sourceforge.net/apps/trac/she