[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH 1/7] block: fix comment for bdrv_get_allocated_file_

From: Vladimir Sementsov-Ogievskiy
Subject: [Qemu-block] [PATCH 1/7] block: fix comment for bdrv_get_allocated_file_size()
Date: Thu, 25 May 2017 18:26:22 +0300

Current comment is not clear enough: which sparseness is meant, coming
from sparse image format or from sparse file system?

For example, if we have qcow2 above raw file on non-sparse file system,
this function will say nothing about unallocated (by qcow2 layer)

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
 block.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block.c b/block.c
index 50ba264143..ba22fc0dfb 100644
--- a/block.c
+++ b/block.c
@@ -3388,8 +3388,8 @@ int bdrv_truncate(BdrvChild *child, int64_t offset, Error 
- * Length of a allocated file in bytes. Sparse files are counted by actual
- * allocated space. Return < 0 if error or unknown.
+ * Size of allocated in underlying file system area. Sparseness is taken into
+ * account for sparse file systems. Return < 0 if error or unknown.
 int64_t bdrv_get_allocated_file_size(BlockDriverState *bs)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]