[Devel] [PATCH RHEL10 COMMIT] dm-qcow2: fix seek constant comparison

Konstantin Khorenko khorenko at virtuozzo.com
Tue Aug 25 13:41:55 MSK 2026


The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.9.vz10
------>
commit 55c027bb79909b0c9a0befdb2ad654598bd997e9
Author: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Date:   Wed Aug 19 03:07:41 2026 +0300

    dm-qcow2: fix seek constant comparison
    
    This is just an enum, not a mask.
    
    https://virtuozzo.atlassian.net/browse/VSTOR-139407
    Feature: dm-qcow2: block device over QCOW2 files driver
    Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
    Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
---
 drivers/md/dm-qcow2-map.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index 342e4af688509..d6d15b04215c6 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -4520,7 +4520,7 @@ static int qcow2_llseek_hole_qio(struct qio *qio, int whence, loff_t *result)
 			}
 		}
 
-		if (whence & SEEK_HOLE) {
+		if (whence == SEEK_HOLE) {
 			if (arg.zeroes || arg.unmapped) {
 				*result = to_bytes(qio->bi_iter.bi_sector);
 				ret = 0;
@@ -4536,7 +4536,7 @@ static int qcow2_llseek_hole_qio(struct qio *qio, int whence, loff_t *result)
 			}
 		}
 
-		if (whence & SEEK_DATA) {
+		if (whence == SEEK_DATA) {
 			if (!arg.zeroes && !arg.unmapped) {
 				*result = to_bytes(qio->bi_iter.bi_sector);
 				ret = 0;


More information about the Devel mailing list