]> xenbits.xensource.com Git - libvirt.git/commit
storage: Move and rename disk backend label checking
authorJohn Ferlan <jferlan@redhat.com>
Wed, 14 Dec 2016 23:34:24 +0000 (18:34 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 10 Jan 2017 13:44:50 +0000 (08:44 -0500)
commita48c674fba3ac5bdfb862daafefe19217c78e105
treeabfbdeb7a1a40a7159c7303d93e1c161bd505a9f
parenta11fd69735e6951cda9bf256d8e423696a441aa4
storage: Move and rename disk backend label checking

Rather than have the Disk code having to use PARTED to determine if
there's something on the device, let's use the virStorageBackendDeviceProbe.
and only fallback to the PARTED probing if the BLKID code isn't built in.

This will also provide a mechanism for the other current caller (File
System Backend) to utilize a PARTED parsing algorithm in the event that
BLKID isn't built in to at least see if *something* exists on the disk
before blindly trying to use. The PARTED error checking will not find
file system types, but if there is a partition table set on the device,
it will at least cause a failure.

Move virStorageBackendDiskValidLabel and virStorageBackendDiskFindLabel
to storage_backend and rename/rework the code to fit the new model.

Update the virsh.pod description to provide a more generic description
of the process since we could now use either blkid or parted to find
data on the target device.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/storage/storage_backend.c
src/storage/storage_backend_disk.c
tools/virsh.pod