Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 04:37:57AM +, Daniel P. Berrange wrote: > This patch implements 3 storage pools in one go. This provides > the base level 'directory' storage pool, where an existing directory > contains files as volumes. This is guarenteed to be available on > any OS since it just uses

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-16 Thread Daniel P. Berrange
On Fri, Feb 15, 2008 at 10:03:30PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > ... > > +if (virRun(conn, (char**)mntargv, NULL) < 0) { > > +free(src); > > +virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR, "cannot mount > > %s on %s: %d", >

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-16 Thread Daniel P. Berrange
On Fri, Feb 15, 2008 at 09:37:53PM +0100, Jim Meyering wrote: > It'd be good to pull the duplicate capacity update out of the > if- and else- blocks. > > def->capacity *= ... > > Also, just in case the file data is bogus enough to make the resulting > product overflow, you can detect that wit

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-15 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > diff -r 739490b4a2f6 src/storage_backend_fs.c > --- /dev/null Thu Jan 01 00:00:00 1970 + > +++ b/src/storage_backend_fs.cThu Feb 07 13:44:25 2008 -0500 ... > +/* Short-circuit is already mounted */ Barely worth mentioning, but it th

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-15 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: ... > +if (virRun(conn, (char**)mntargv, NULL) < 0) { > +free(src); > +virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR, "cannot mount %s > on %s: %d", > + src, pool->def->target.path, strerror(errno

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-15 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > diff -r 739490b4a2f6 src/storage_backend_fs.c > --- /dev/null Thu Jan 01 00:00:00 1970 + > +++ b/src/storage_backend_fs.cThu Feb 07 13:44:25 2008 -0500 ... > +/* Optionally extract capacity from file */ > +if (fileTypeInf

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-15 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > virStorageReportError(NULL, VIR_ERR_INTERNAL_ERROR, "missing backend for > pool type %d", type); Not specific to this patch, but any new error-reporting functions like virStorageReportError need to be added to the err_func_re in Makefile.main

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-11 Thread Daniel P. Berrange
This patch implements 3 storage pools in one go. This provides the base level 'directory' storage pool, where an existing directory contains files as volumes. This is guarenteed to be available on any OS since it just uses plain POSIX apis for creation/deletion. If qemu-img or qcow2-create command