From: John Garry Date: Thu, 16 Jan 2025 17:03:00 +0000 (+0000) Subject: dm-io: Warn on creating multiple atomic write bios for a region X-Git-Tag: v6.14-rc1~66^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6a657d9683def5588aee6ed920cef61415a6a52;p=thirdparty%2Fkernel%2Flinux.git dm-io: Warn on creating multiple atomic write bios for a region 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 Reviewed-by: Mike Snitzer Signed-off-by: Mikulas Patocka --- diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index d7a8e2f40db33..c37668790577f 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -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); }