dm snapshot: introduce account_start_copy() and account_end_copy()
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 2 Oct 2019 10:14:17 +0000 (06:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2019 11:18:00 +0000 (12:18 +0100)
commit5de1e3a9e99df6f7c0af64cc8448a98fcd232728
tree0d9cfbab94eddc71c3f513cd71b76b88076e0ebf
parent0685a2565a8b5da7288d2107f993dba43e83efd8
dm snapshot: introduce account_start_copy() and account_end_copy()

[ Upstream commit a2f83e8b0c82c9500421a26c49eb198b25fcdea3 ]

This simple refactoring moves code for modifying the semaphore cow_count
into separate functions to prepare for changes that will extend these
methods to provide for a more sophisticated mechanism for COW
throttling.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Nikos Tsironis <ntsironis@arrikto.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-snap.c