diff options
author | John Garry <john.g.garry@oracle.com> | 2025-01-16 17:03:00 +0000 |
---|---|---|
committer | Mikulas Patocka <mpatocka@redhat.com> | 2025-01-17 22:24:09 +0100 |
commit | c6a657d9683def5588aee6ed920cef61415a6a52 (patch) | |
tree | 5f706d64771cdec03fdf6ae17a30f58e4b679d9f | |
parent | 30b88ed06f8018b33e034c86d30d67b93f6aca12 (diff) |
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 <john.g.garry@oracle.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
-rw-r--r-- | drivers/md/dm-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index d7a8e2f40db3..c37668790577 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); } |