]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commitdiff
dm-io: Warn on creating multiple atomic write bios for a region
authorJohn Garry <john.g.garry@oracle.com>
Thu, 16 Jan 2025 17:03:00 +0000 (17:03 +0000)
committerMikulas Patocka <mpatocka@redhat.com>
Fri, 17 Jan 2025 21:24:09 +0000 (22:24 +0100)
A region should just be for a single atomic write, so warn when we are
creating many. This should not occur if request queue limits are properly
configured.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-io.c

index d7a8e2f40db336546002329c742e619cf62ba491..c37668790577faf05231518bad5284ffa369f717 100644 (file)
@@ -379,6 +379,7 @@ static void do_region(const blk_opf_t opf, unsigned int region,
 
                atomic_inc(&io->count);
                submit_bio(bio);
+               WARN_ON_ONCE(opf & REQ_ATOMIC && remaining);
        } while (remaining);
 }