summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bufio.h
diff options
context:
space:
mode:
authorMikulas Patocka2017-04-30 23:31:22 +0200
committerMike Snitzer2017-08-28 17:47:17 +0200
commit1e3b21c6fb671a5ce9d77a05a8bde805d8908467 (patch)
tree58617942ff3b8497c396750161e8b29416e970c2 /drivers/md/dm-bufio.h
parentdm rq: do not update rq partially in each ending bio (diff)
downloadkernel-qcow2-linux-1e3b21c6fb671a5ce9d77a05a8bde805d8908467.tar.gz
kernel-qcow2-linux-1e3b21c6fb671a5ce9d77a05a8bde805d8908467.tar.xz
kernel-qcow2-linux-1e3b21c6fb671a5ce9d77a05a8bde805d8908467.zip
dm integrity: optimize writing dm-bufio buffers that are partially changed
Rather than write the entire dm-bufio buffer when only a subset is changed, improve dm-bufio (and dm-integrity) by only writing the subset of the buffer that changed. Update dm-integrity to make use of dm-bufio's new dm_bufio_mark_partial_buffer_dirty() interface. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-bufio.h')
-rw-r--r--drivers/md/dm-bufio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/dm-bufio.h b/drivers/md/dm-bufio.h
index b6d8f53ec15b..be732d3f8611 100644
--- a/drivers/md/dm-bufio.h
+++ b/drivers/md/dm-bufio.h
@@ -94,6 +94,15 @@ void dm_bufio_release(struct dm_buffer *b);
void dm_bufio_mark_buffer_dirty(struct dm_buffer *b);
/*
+ * Mark a part of the buffer dirty.
+ *
+ * The specified part of the buffer is scheduled to be written. dm-bufio may
+ * write the specified part of the buffer or it may write a larger superset.
+ */
+void dm_bufio_mark_partial_buffer_dirty(struct dm_buffer *b,
+ unsigned start, unsigned end);
+
+/*
* Initiate writing of dirty buffers, without waiting for completion.
*/
void dm_bufio_write_dirty_buffers_async(struct dm_bufio_client *c);