libvirt/src/storage
Eric Blake 348b4e254b storage: always probe type with buffer
This gets rid of another stat() per volume, as well as cutting
bytes read in half, when populating the volumes of a directory
pool during a pool refresh.  Not to mention that it provides an
interface that can let gluster pools also probe file types.

* src/util/virstoragefile.h (virStorageFileProbeFormatFromFD):
Delete.
(virStorageFileProbeFormatFromBuf): New prototype.
(VIR_STORAGE_MAX_HEADER): New constant, based on...
* src/util/virstoragefile.c (STORAGE_MAX_HEAD): ...old name.
(vmdk4GetBackingStore, virStorageFileGetMetadataInternal)
(virStorageFileProbeFormat): Adjust clients.
(virStorageFileProbeFormatFromFD): Delete.
(virStorageFileProbeFormatFromBuf): Export.
* src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
Adjust client.
* src/libvirt_private.syms (virstoragefile.h): Adjust exports.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-11-06 17:31:51 -07:00
..
parthelper.c util: move virFile* functions from virutil.c to virfile.c 2013-05-10 13:09:30 -04:00
storage_backend_disk.c Convert 'int i' to 'size_t i' in src/storage/ files 2013-07-10 17:40:13 +01:00
storage_backend_disk.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_fs.c storage: always probe type with buffer 2013-11-06 17:31:51 -07:00
storage_backend_fs.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_iscsi.c Convert uuid to a string before printing it 2013-10-15 12:30:21 +02:00
storage_backend_iscsi.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_logical.c Remove (nearly) all use of getuid()/getgid() 2013-10-21 14:03:52 +01:00
storage_backend_logical.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_mpath.c storage: reduce number of stat calls 2013-11-06 17:17:08 -07:00
storage_backend_mpath.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_rbd.c storage: use correct type for array count 2013-10-30 17:13:24 -06:00
storage_backend_rbd.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_scsi.c storage: reduce number of stat calls 2013-11-06 17:17:08 -07:00
storage_backend_scsi.h storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend 2013-04-08 18:41:06 +08:00
storage_backend_sheepdog.c Adapt to VIR_ALLOC and virAsprintf in src/storage/* 2013-07-10 11:07:32 +02:00
storage_backend_sheepdog.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend.c storage: reduce number of stat calls 2013-11-06 17:17:08 -07:00
storage_backend.h storage: reduce number of stat calls 2013-11-06 17:17:08 -07:00
storage_driver.c virerror: s/VIR_ERR_STORAGE_VOL_EXISTS/VIR_ERR_STORAGE_VOL_EXISTS/ 2013-10-07 19:21:47 +02:00
storage_driver.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00