[libvirt] [PATCH 2/3] Format FS pools

Daniel Veillard veillard at redhat.com
Mon Feb 22 16:51:47 UTC 2010


On Sun, Feb 21, 2010 at 03:40:35PM -0700, Jim Fehlig wrote:
> Daniel Veillard wrote:
> > On Thu, Feb 18, 2010 at 05:58:06PM -0500, David Allan wrote:
> >   
> >> * If the user supplies the appropriate flag, create the filesystem on the partition used by the pool.
> >> ---
> >>  configure.ac                     |    5 +++++
> >>  include/libvirt/libvirt.h.in     |    3 ++-
> >>  src/storage/storage_backend_fs.c |   25 ++++++++++++++++++++++++-
> >>  3 files changed, 31 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/configure.ac b/configure.ac
> >> index 743a357..616bd03 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -1252,12 +1252,15 @@ AM_CONDITIONAL([WITH_STORAGE_DIR], [test "$with_storage_dir" = "yes"])
> >>  if test "$with_storage_fs" = "yes" -o "$with_storage_fs" = "check"; then
> >>    AC_PATH_PROG([MOUNT], [mount], [], [$PATH:/sbin:/usr/sbin])
> >>    AC_PATH_PROG([UMOUNT], [umount], [], [$PATH:/sbin:/usr/sbin])
> >> +  AC_PATH_PROG([MKE2FS], [mke2fs], [], [$PATH:/sbin:/usr/sbin])
> >>    if test "$with_storage_fs" = "yes" ; then
> >>      if test -z "$MOUNT" ; then AC_MSG_ERROR([We need mount for FS storage driver]) ; fi
> >>      if test -z "$UMOUNT" ; then AC_MSG_ERROR([We need umount for FS storage driver]) ; fi
> >> +    if test -z "$MKE2FS" ; then AC_MSG_ERROR([We need mke2fs for FS storage driver]) ; fi
> >>    else
> >>      if test -z "$MOUNT" ; then with_storage_fs=no ; fi
> >>      if test -z "$UMOUNT" ; then with_storage_fs=no ; fi
> >> +    if test -z "$MKE2FS" ; then with_storage_fs=no ; fi
> >>     
> >
> >   That's where things starts to be nasty, why ext2, and not say ext3,
> > then someone surely will want ext4 or xfs :-)
> > I'm afraid we probably need to implement those 4 and give them different
> > enums (below).
> >   
> 
> How about all file systems defined in virStoragePoolFormatFileSystem
> that support formatting.

  Well, first we can use mkfs to build support for the ext* familly,
so that reduces the set of binaries to check. Otherwise XFS (and maybe
vfat) makes some sense to check, but I don't see the point for the
others which are either legacy unix/mac or formats with very specific
use cases, so yeah I would add an fsck.xfs check in configure.in too

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list