Skip to contentSkip to conversation

qcow2: CHECK_OFLAG_COPIED is obsolete

PATCH Applied Max Reitz 3 participants 3 messages Sep 30, 2013 – Oct 2, 2013 Block layer

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 qcow2: CHECK_OFLAG_COPIED is obsolete

CHECK_OFLAG_COPIED as a parameter to check_refcounts_l1 and check_refcounts_l2 is obselete now, since the OFLAG_COPIED consistency check is actually no longer performed by these functions (but by check_oflag_copied).

---
 block/qcow2-refcount.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
block/qcow2-refcount.c +1 -3
index d2b7064..c0b4184 100644
@@ -1034,7 +1034,6 @@ static void inc_refcounts(BlockDriverState *bs,
 
 /* Flags for check_refcounts_l1() and check_refcounts_l2() */
 enum {
-    CHECK_OFLAG_COPIED = 0x1,   /* check QCOW_OFLAG_COPIED matches refcount */
     CHECK_FRAG_INFO = 0x2,      /* update BlockFragInfo counters */
 };
 
@@ -1481,8 +1480,7 @@ int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res,
 
     /* current L1 table */
     ret = check_refcounts_l1(bs, res, refcount_table, nb_clusters,
-                             s->l1_table_offset, s->l1_size,
-                             CHECK_OFLAG_COPIED | CHECK_FRAG_INFO);
+                             s->l1_table_offset, s->l1_size, CHECK_FRAG_INFO);
     if (ret < 0) {
         goto fail;
     }
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw

Am 30.09.2013 um 09:21 hat Max Reitz geschrieben:

Quoted 6 lines

CHECK_OFLAG_COPIED as a parameter to check_refcounts_l1 and check_refcounts_l2 is obselete now, since the OFLAG_COPIED consistency check is actually no longer performed by these functions (but by check_oflag_copied).

#2 lore raw
In reply to Max Reitz
Quoted 9 lines · Max Reitz

CHECK_OFLAG_COPIED as a parameter to check_refcounts_l1 and check_refcounts_l2 is obselete now, since the OFLAG_COPIED consistency check is actually no longer performed by these functions (but by check_oflag_copied).

---
 block/qcow2-refcount.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan