Skip to content

Commit c6a657d

Browse files
johnpgarryMikulas Patocka
authored andcommitted
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 <[email protected]> Reviewed-by: Mike Snitzer <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent 30b88ed commit c6a657d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/dm-io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ static void do_region(const blk_opf_t opf, unsigned int region,
379379

380380
atomic_inc(&io->count);
381381
submit_bio(bio);
382+
WARN_ON_ONCE(opf & REQ_ATOMIC && remaining);
382383
} while (remaining);
383384
}
384385

0 commit comments

Comments
 (0)