]> git.baikalelectronics.ru Git - kernel.git/commit
dm: make sure to obey max_io_len_target_boundary
authorMichael Lass <bevan@bi-co.net>
Tue, 21 May 2019 19:58:07 +0000 (21:58 +0200)
committerMike Snitzer <snitzer@redhat.com>
Tue, 21 May 2019 23:15:20 +0000 (19:15 -0400)
commiteba86886d15d59bb3eb44048f82a4c7f5f7a0464
tree3a37a21670c6d37acacda2de65022d4671dd35d6
parentb30fc65c4ecf185029183c07a2fe3df530a71b20
dm: make sure to obey max_io_len_target_boundary

Commit 9797c9c008b0 ("dm: eliminate 'split_discard_bios' flag from DM
target interface") incorrectly removed code from
__send_changing_extent_only() that is required to impose a per-target IO
boundary on IO that exceeds max_io_len_target_boundary().  Otherwise
"special" IO (e.g. DISCARD, WRITE SAME, WRITE ZEROES) can write beyond
where allowed.

Fix this by restoring the max_io_len_target_boundary() limit in
__send_changing_extent_only()

Fixes: 9797c9c008b0 ("dm: eliminate 'split_discard_bios' flag from DM target interface")
Cc: stable@vger.kernel.org # 5.1+
Signed-off-by: Michael Lass <bevan@bi-co.net>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c