diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2017-05-01 00:31:22 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-08-28 18:47:17 +0300 |
commit | 1e3b21c6fb671a5ce9d77a05a8bde805d8908467 (patch) | |
tree | 58617942ff3b8497c396750161e8b29416e970c2 /drivers/md/dm-integrity.c | |
parent | dc6364b5170dc446fca076d6523aaebc339d6511 (diff) | |
download | linux-1e3b21c6fb671a5ce9d77a05a8bde805d8908467.tar.xz |
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-integrity.c')
-rw-r--r-- | drivers/md/dm-integrity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 3acce09bba35..689f89d8eeef 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -1040,7 +1040,7 @@ static int dm_integrity_rw_tag(struct dm_integrity_c *ic, unsigned char *tag, se memcpy(tag, dp, to_copy); } else if (op == TAG_WRITE) { memcpy(dp, tag, to_copy); - dm_bufio_mark_buffer_dirty(b); + dm_bufio_mark_partial_buffer_dirty(b, *metadata_offset, *metadata_offset + to_copy); } else { /* e.g.: op == TAG_CMP */ if (unlikely(memcmp(dp, tag, to_copy))) { |