diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2021-01-08 11:15:56 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2021-01-08 15:57:29 -0500 |
commit | 9b5948267adc9e689da609eb61cf7ed49cae5fa8 (patch) | |
tree | 341fb881926d76ed49e67fcdd01fbe431301edfe /drivers/md/dm-bufio.c | |
parent | 0378c625afe80eb3f212adae42cc33c9f6f31abf (diff) |
dm integrity: fix flush with external metadata device
With external metadata device, flush requests are not passed down to the
data device.
Fix this by submitting the flush request in dm_integrity_flush_buffers. In
order to not degrade performance, we overlap the data device flush with
the metadata device flush.
Reported-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-bufio.c')
-rw-r--r-- | drivers/md/dm-bufio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 9c1a86bde658..fce4cbf9529d 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1534,6 +1534,12 @@ sector_t dm_bufio_get_device_size(struct dm_bufio_client *c) } EXPORT_SYMBOL_GPL(dm_bufio_get_device_size); +struct dm_io_client *dm_bufio_get_dm_io_client(struct dm_bufio_client *c) +{ + return c->dm_io; +} +EXPORT_SYMBOL_GPL(dm_bufio_get_dm_io_client); + sector_t dm_bufio_get_block_number(struct dm_buffer *b) { return b->block; |