The following patches add support for building a filesystem on the
source device when building a filesystem pool.

The first patch adds mkfs and libblkid to the build system.  

The second patch adds two flags to virStorageBackendFileSystemBuild.
The first flag causes the build operation to probe for an existing
filesystem of the type specified in the pool XML.  If an existing
filesystem of the specified type is present, mkfs is not executed and
the build call returns an error.  Any other data present on the source
device will be overwritten.  The second flag causes the build to
execute mkfs unconditionally overwriting whatever is currently on the
source device.

Calling virStorageBackendFileSystemBuild without any flags preserves
the current behavior, which is to make the directory on which the
filesystem will be mounted, but to leave the source device untouched.

David Allan (2):
  Add mkfs and libblkid to build system
  Add fs pool formatting

 configure.ac                              |   25 ++++++++
 include/libvirt/libvirt.h.in              |    6 +-
 include/libvirt/virterror.h               |    2 +
 libvirt.spec.in                           |    5 ++
 po/POTFILES.in                            |    1 +
 src/Makefile.am                           |    5 ++
 src/libvirt_private.syms                  |    4 +
 src/storage/storage_backend_fs.c          |   88 +++++++++++++++++++++++++-
 src/storage/storage_backend_fs.h          |   19 ++++++
 src/storage/storage_backend_fs_libblkid.c |   97 +++++++++++++++++++++++++++++
 src/util/virterror.c                      |   12 ++++
 tools/virsh.c                             |   15 ++++-
 12 files changed, 273 insertions(+), 6 deletions(-)
 create mode 100644 src/storage/storage_backend_fs_libblkid.c

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to