Commit 334b4fc1 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mike Snitzer

dm ebs: use dm_bufio_forget_buffers

Use dm_bufio_forget_buffers instead of a block-by-block loop that
calls dm_bufio_forget. dm_bufio_forget_buffers is faster than the loop
because it searches for used buffers using rb-tree.
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 33a18062
......@@ -167,8 +167,8 @@ static void __ebs_forget_bio(struct ebs_c *ec, struct bio *bio)
sector_t blocks, sector = bio->bi_iter.bi_sector;
blocks = __nr_blocks(ec, bio);
for (; blocks--; sector += ec->u_bs)
dm_bufio_forget(ec->bufio, __sector_to_block(ec, sector));
dm_bufio_forget_buffers(ec->bufio, __sector_to_block(ec, sector), blocks);
}
/* Worker funtion to process incoming bios. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment