summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bufio.h
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2017-04-30 17:31:22 -0400
committerMike Snitzer <snitzer@redhat.com>2017-08-28 11:47:17 -0400
commit1e3b21c6fb671a5ce9d77a05a8bde805d8908467 (patch)
tree58617942ff3b8497c396750161e8b29416e970c2 /drivers/md/dm-bufio.h
parentdc6364b5170dc446fca076d6523aaebc339d6511 (diff)
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);