dm vdo: add flush support
authorMatthew Sakai <msakai@redhat.com>
Fri, 17 Nov 2023 01:00:21 +0000 (20:00 -0500)
committerMike Snitzer <snitzer@kernel.org>
Tue, 20 Feb 2024 18:43:14 +0000 (13:43 -0500)
commit062401f0de3540322db559946249f639c6a211ec
tree2f7b521e3b092ccc825f507949cf0f1f21b5bc0b
parent79535a7881c0cbe95063a2670d840cc950ae9282
dm vdo: add flush support

This patch adds support for handling incoming flush and/or FUA bios. Each
such bio is assigned to a struct vdo_flush. These are allocated as needed,
but there is always one kept in reserve in case allocations fail. In the
event of an allocation failure, bios may need to wait for an outstanding
flush to complete.

The logical address space is partitioned into logical zones, each handled
by its own thread. Each zone keeps a list of all data_vios handling write
requests for logical addresses in that zone. When a flush bio is processed,
each logical zone is informed of the flush. When all of the writes which
are in progress at the time of the notification have completed in all
zones, the flush bio is then allowed to complete.

Co-developed-by: J. corwin Coburn <corwin@hurlbutnet.net>
Signed-off-by: J. corwin Coburn <corwin@hurlbutnet.net>
Co-developed-by: Michael Sclafani <dm-devel@lists.linux.dev>
Signed-off-by: Michael Sclafani <dm-devel@lists.linux.dev>
Co-developed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-vdo/flush.c [new file with mode: 0644]
drivers/md/dm-vdo/flush.h [new file with mode: 0644]
drivers/md/dm-vdo/logical-zone.c [new file with mode: 0644]
drivers/md/dm-vdo/logical-zone.h [new file with mode: 0644]