John Ferlan
c5f6151390
util: Introduce virStorageSourceUpdatePhysicalSize
...
Commit id '8dc27259' introduced virStorageSourceUpdateBlockPhysicalSize
in order to retrieve the physical size for a block backed source device
for an active domain since commit id '15fa84ac' changed to use the
qemuMonitorGetAllBlockStatsInfo and qemuMonitorBlockStatsUpdateCapacity
API's to (essentially) retrieve the "actual-size" from a 'query-block'
operation for the source device.
However, the code only was made functional for a BLOCK backing type
and it neglected to use qemuOpenFile, instead using just open. After
the open the block lseek would find the end of the block and set the
physical value, close the fd and return.
Since the code would return 0 immediately if the source device wasn't
a BLOCK backed device, the physical would be displayed incorrectly,
such as follows in domblkinfo for a file backed source device:
Capacity: 1073741824
Allocation: 0
Physical: 0
This patch will modify the algorithm to get the physical size for other
backing types and it will make use of the qemuDomainStorageOpenStat
helper in order to open/stat the source file depending on its type.
The qemuDomainGetStatsOneBlock will no longer inhibit printing errors,
but it will still ignore them leaving the physical value set to 0.
Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-12-12 16:04:17 -05:00
..
2016-05-19 15:17:03 -04:00
2016-05-16 12:58:48 +02:00
2016-05-19 16:30:04 -04:00
2015-09-14 11:32:44 +02:00
2014-10-29 09:55:09 -06:00
2014-10-29 09:55:09 -06:00
2014-11-14 17:13:35 +01:00
2016-06-16 06:17:58 -04:00
2016-10-12 17:29:07 +02:00
2016-10-12 17:29:07 +02:00
2016-04-11 12:09:11 +02:00
2015-03-25 15:42:52 +01:00
2016-12-06 16:25:20 +01:00
2016-08-24 15:44:47 -04:00
2015-03-18 09:53:24 +01:00
2016-09-07 12:35:59 +03:00
2015-11-30 13:55:10 +01:00
2016-11-25 13:54:05 +01:00
2016-09-06 13:08:30 +01:00
2016-11-25 13:54:05 +01:00
2016-07-18 15:49:57 +02:00
2016-11-23 12:08:15 -05:00
2016-05-20 11:09:05 -04:00
2016-11-23 12:08:15 -05:00
2016-02-11 11:35:02 +01:00
2014-11-20 08:48:19 -07:00
2016-07-13 13:49:03 +03:00
2016-07-13 13:49:03 +03:00
2016-06-24 13:23:02 -04:00
2016-11-15 15:50:51 +01:00
2015-07-10 11:47:13 +02:00
2015-10-15 19:50:58 -04:00
2016-06-16 13:09:19 -04:00
2016-12-06 13:33:18 +01:00
2016-12-06 13:33:18 +01:00
2016-11-25 13:54:05 +01:00
2014-12-22 16:57:21 -05:00
2016-11-25 13:54:05 +01:00
2016-06-13 14:13:16 -06:00
2016-04-14 13:22:40 -04:00
2016-04-14 13:22:40 -04:00
2016-02-16 14:58:58 +01:00
2016-04-20 12:46:48 +02:00
2016-02-17 12:46:34 +01:00
2016-02-17 12:46:34 +01:00
2016-05-11 09:06:32 +02:00
2016-08-02 14:20:31 +02:00
2016-08-02 14:20:31 +02:00
2016-11-23 12:08:15 -05:00
2016-09-15 15:28:22 +02:00
2016-06-09 18:31:11 +01:00
2016-11-24 12:15:26 -05:00
2016-11-24 12:15:26 -05:00
2016-06-09 18:43:18 +01:00
2016-06-09 18:43:18 +01:00
2016-10-13 17:58:56 +08:00
2014-09-24 15:29:22 +01:00
2014-10-22 13:09:49 +01:00
2016-03-18 09:43:45 +01:00
2016-07-28 08:27:13 -04:00
2016-07-28 08:27:13 -04:00
2016-11-09 16:47:08 +01:00
2016-11-09 16:47:08 +01:00
2015-04-02 16:05:32 +02:00
2016-10-05 08:33:59 +02:00
2016-03-18 17:29:53 +01:00
2015-10-09 15:25:08 +02:00
2016-11-25 13:54:05 +01:00
2016-10-10 08:27:25 +02:00
2014-10-28 14:14:25 -04:00
2014-10-28 14:14:25 -04:00
2016-12-06 13:33:18 +01:00
2016-12-06 13:33:18 +01:00
2016-06-26 19:33:09 -04:00
2016-06-27 12:42:48 +02:00
2016-02-05 16:43:19 +01:00
2015-08-11 16:10:32 +02:00
2016-06-02 11:35:29 +02:00
2014-12-08 14:39:12 -05:00
2016-07-01 21:13:31 -04:00
2016-07-01 21:13:30 -04:00
2016-08-10 16:56:45 +02:00
2016-05-10 14:04:19 -04:00
2015-03-17 12:56:37 -04:00
2015-03-17 12:56:37 -04:00
2016-12-09 10:23:09 +01:00
2016-12-09 10:23:09 +01:00
2016-12-09 10:28:07 +01:00
2016-12-09 10:28:07 +01:00
2015-04-15 16:43:28 +02:00
2016-06-26 19:33:07 -04:00
2015-03-17 12:56:37 -04:00
2016-06-26 19:33:07 -04:00
2016-06-26 19:33:07 -04:00
2016-09-14 08:41:41 +02:00
2016-09-14 08:41:41 +02:00
2015-05-11 08:28:53 +02:00
2015-05-11 08:28:53 +02:00
2016-11-30 15:24:35 -05:00
2016-11-30 15:24:35 -05:00
2016-12-07 07:03:57 -05:00
2016-12-07 07:03:57 -05:00
2015-06-09 13:56:00 -04:00
2014-11-03 16:43:23 +01:00
2016-11-25 13:54:05 +01:00
2016-03-01 06:50:16 -05:00
2015-03-13 15:31:33 +01:00
2014-09-11 15:40:14 -06:00
2015-01-15 11:07:13 +00:00
2016-11-25 13:54:05 +01:00
2016-09-06 13:08:30 +01:00
2016-10-10 16:08:39 -04:00
2016-07-27 13:33:10 +02:00
2016-06-07 10:18:36 -04:00
2016-04-06 20:27:09 -04:00
2016-11-23 12:08:15 -05:00
2015-11-30 15:32:47 +01:00
2016-06-24 14:20:57 +02:00
2015-06-22 16:03:33 -04:00
2016-11-24 12:15:26 -05:00
2016-11-24 12:15:26 -05:00
2014-07-14 05:44:20 -04:00
2014-07-11 10:36:02 +02:00
2016-06-23 12:30:28 -04:00
2016-06-23 12:30:28 -04:00
2014-11-14 17:13:35 +01:00
2016-06-26 19:33:08 -04:00
2016-06-26 19:33:08 -04:00
2016-07-11 14:21:01 +02:00
2016-07-01 15:46:57 -04:00
2016-12-12 16:04:17 -05:00
2016-12-12 16:04:17 -05:00
2016-12-06 13:33:18 +01:00
2016-12-06 13:33:18 +01:00
2016-04-11 12:09:11 +02:00
2015-06-18 10:10:26 +02:00
2016-11-23 11:13:53 +03:00
2016-02-05 16:11:50 +01:00
2015-04-16 15:39:22 +02:00
2015-03-25 10:00:53 +01:00
2015-03-25 10:00:53 +01:00
2015-03-25 10:00:53 +01:00
2016-04-18 17:07:46 +02:00
2016-04-18 17:07:46 +02:00
2016-04-15 16:54:28 +01:00
2016-04-15 16:54:28 +01:00
2015-11-17 20:52:13 -05:00
2016-11-23 12:08:15 -05:00
2016-05-28 13:49:14 +02:00
2016-11-25 13:54:05 +01:00
2015-11-30 09:44:28 +01:00
2016-06-24 14:20:57 +02:00
2016-11-23 12:33:38 -05:00
2016-10-14 06:47:36 -04:00
2016-05-03 08:58:30 -04:00
2016-01-11 19:56:06 +03:00
2016-12-06 13:33:18 +01:00
2016-10-20 18:49:22 +08:00