libvirt/src/storage
Eric Blake 9cac863965 storage: reduce number of stat calls
We are calling fstat() at least twice per storage volume in
a directory storage pool; this is rather wasteful.  Refactoring
this is also a step towards making code reusable for gluster,
where gluster can provide struct stat but cannot use fstat().

* src/storage/storage_backend.h
(virStorageBackendVolOpenCheckMode)
(virStorageBackendUpdateVolTargetInfoFD): Update signature.
* src/storage/storage_backend.c
(virStorageBackendVolOpenCheckMode): Pass stat results back.
(virStorageBackendUpdateVolTargetInfoFD): Use existing stats.
(virStorageBackendVolOpen, virStorageBackendUpdateVolTargetInfo):
Update callers.
* src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
Likewise.
* src/storage/storage_backend_scsi.c
(virStorageBackendSCSIUpdateVolTargetInfo): Likewise.
* src/storage/storage_backend_mpath.c
(virStorageBackendMpathUpdateVolTargetInfo): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-11-06 17:17:08 -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: reduce number of stat calls 2013-11-06 17:17:08 -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