[Devel] [PATCH RH9 1/2] dm-qcow2: Do not fail ctr in case dirty bit is set

Kirill Tkhai ktkhai at virtuozzo.com
Thu Nov 11 12:33:49 MSK 2021


The protocol is:
  1)vzctl sets dirty bit
  2)kernel checks for it.
Before this, only development protocol worked.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-qcow2-target.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-qcow2-target.c b/drivers/md/dm-qcow2-target.c
index 30d4275cc21c..2de817154ba3 100644
--- a/drivers/md/dm-qcow2-target.c
+++ b/drivers/md/dm-qcow2-target.c
@@ -504,7 +504,8 @@ static int qcow2_check_convert_hdr(struct QCowHeader *raw_hdr,
 	if (kernel_sets_dirty_bit !=
 	    !(hdr->incompatible_features & INCOMPATIBLE_FEATURES_DIRTY_BIT))
 		return kernel_sets_dirty_bit ? -EUCLEAN : -ENOLCK;
-	if (hdr->incompatible_features & ~INCOMPATIBLE_FEATURES_EXTL2_BIT)
+	if (hdr->incompatible_features &
+	    ~(INCOMPATIBLE_FEATURES_EXTL2_BIT|INCOMPATIBLE_FEATURES_DIRTY_BIT))
 		return -EOPNOTSUPP;
 	ext_l2 = hdr->incompatible_features & INCOMPATIBLE_FEATURES_EXTL2_BIT;
 




More information about the Devel mailing list