Mikulas Patocka aaa53168cb dm: optimize flushes
Device mapper sends flush bios to all the targets and the targets send it
to the underlying device. That may be inefficient, for example if a table
contains 10 linear targets pointing to the same physical device, then
device mapper would send 10 flush bios to that device - despite the fact
that only one bio would be sufficient.

This commit optimizes the flush behavior. It introduces a per-target
variable flush_bypasses_map - it is set when the target supports flush
optimization - currently, the dm-linear and dm-stripe targets support it.
When all the targets in a table have flush_bypasses_map,
flush_bypasses_map on the table is set. __send_empty_flush tests if the
table has flush_bypasses_map - and if it has, no flush bios are sent to
the targets via the "map" method and the list dm_table->devices is
iterated and the flush bios are sent to each member of the list.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Suggested-by: Yang Yang <yang.yang@vivo.com>
2024-06-26 11:32:39 -04:00
..
2024-05-20 15:18:34 -07:00
2024-05-27 13:47:14 +10:00
2024-05-22 10:49:54 -07:00
Hi,
2024-05-13 10:40:15 -07:00
2024-06-26 11:32:39 -04:00
2024-05-04 10:19:59 +02:00
2024-06-20 15:19:17 -06:00
2024-05-29 10:40:36 +02:00
2024-06-20 15:19:17 -06:00