concierge over-reports disk usage for files with holes |
||
Issue description
The concierge ListVmDisks method (as used in `vmc list` and the Storage Management settings page) seems to report the logical size of the file (same as 'ls -l') rather than the actual disk usage ('du'). This starts to matter once discard support is added - qcow files will now have holes, and the length of the file will no longer be the same as the used space.
At first glance, it looks like ListVmDisks is calling base::GetFileSize() to get this information.
,
Sep 8
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/805f6db2aa0f954ec4f93c78cb35d76a08a3ea61 commit 805f6db2aa0f954ec4f93c78cb35d76a08a3ea61 Author: Daniel Verkamp <dverkamp@chromium.org> Date: Sat Sep 08 05:27:45 2018 vm_tools: concierge: report disk usage using stat Once support for discard using hole punching with fallocate() has been added to crosvm, it becomes important to report the space used by VM disks rather than their logical length. BUG= chromium:881636 TEST=Verify that 'vmc list' reports the same size as 'du' for a qcow2 image with discarded clusters Change-Id: Ied87ed480d87448f6bda3ee77db788baf2b30a02 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1212324 Reviewed-by: Stephen Barber <smbarber@chromium.org> [modify] https://crrev.com/805f6db2aa0f954ec4f93c78cb35d76a08a3ea61/vm_tools/concierge/service.cc
,
Sep 10
|
||
►
Sign in to add a comment |
||
Comment 1 by dverkamp@chromium.org
, Sep 7Status: Started (was: Untriaged)