diff options
author | Joe Thornber <ejt@redhat.com> | 2015-01-23 10:16:16 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-29 17:40:49 -0800 |
commit | ba42a61e500b1619c4f29cd2b6ac693c0ecc9645 (patch) | |
tree | 3ae8294bc164d055881212d74a26dce99af21aae /include/linux/time.h | |
parent | 90e6c435b7f08718f7c5394bd18c42355ac70ec2 (diff) | |
download | lwn-ba42a61e500b1619c4f29cd2b6ac693c0ecc9645.tar.gz lwn-ba42a61e500b1619c4f29cd2b6ac693c0ecc9645.zip |
dm cache: fix problematic dual use of a single migration count variable
commit a59db67656021fa212e9b95a583f13c34eb67cd9 upstream.
Introduce a new variable to count the number of allocated migration
structures. The existing variable cache->nr_migrations became
overloaded. It was used to:
i) track of the number of migrations in flight for the purposes of
quiescing during suspend.
ii) to estimate the amount of background IO occuring.
Recent discard changes meant that REQ_DISCARD bios are processed with
a migration. Discards are not background IO so nr_migrations was not
incremented. However this could cause quiescing to complete early.
(i) is now handled with a new variable cache->nr_allocated_migrations.
cache->nr_migrations has been renamed cache->nr_io_migrations.
cleanup_migration() is now called free_io_migration(), since it
decrements that variable.
Also, remove the unused cache->next_migration variable that got replaced
with with prealloc_structs a while ago.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/time.h')
0 files changed, 0 insertions, 0 deletions