dm: Ensure cloned bio is same length for atomic write
authorJohn Garry <john.g.garry@oracle.com>
Thu, 16 Jan 2025 17:02:57 +0000 (17:02 +0000)
committerMikulas Patocka <mpatocka@redhat.com>
Fri, 17 Jan 2025 21:24:01 +0000 (22:24 +0100)
commit5f430e34087b4882545baa3d31962f1f7d735421
treeba85d3924db2a44e972b86251c62621c8d75c592
parent3194e36488e2dae05f9a822c73eaa367e47b2e3d
dm: Ensure cloned bio is same length for atomic write

For an atomic write, a cloned bio must be same length as the original bio,
i.e. no splitting.

Error in case it is not.

Per-dm device queue limits should be setup to ensure that this does not
happen, but error this case as an insurance policy.

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.c