diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2020-06-02 15:34:40 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-06-05 14:59:41 -0400 |
commit | 33a180623b6c35f2727daecb63763955af3af1df (patch) | |
tree | df17dbb862aee516cf07560d58b2175c95339306 /include | |
parent | 88f878e58879acfdad03e08776c9802f9cd6f26a (diff) |
dm bufio: introduce forget_buffer_locked
Introduce a function forget_buffer_locked that forgets a range of
buffers. It is more efficient than calling forget_buffer in a loop.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dm-bufio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/dm-bufio.h b/include/linux/dm-bufio.h index 5ec6bfbde9ae..29d255fdd5d6 100644 --- a/include/linux/dm-bufio.h +++ b/include/linux/dm-bufio.h @@ -137,6 +137,13 @@ void dm_bufio_release_move(struct dm_buffer *b, sector_t new_block); void dm_bufio_forget(struct dm_bufio_client *c, sector_t block); /* + * Free the given range of buffers. + * This is just a hint, if the buffer is in use or dirty, this function + * does nothing. + */ +void dm_bufio_forget_buffers(struct dm_bufio_client *c, sector_t block, sector_t n_blocks); + +/* * Set the minimum number of buffers before cleanup happens. */ void dm_bufio_set_minimum_buffers(struct dm_bufio_client *c, unsigned n); |