linux/drivers
Joe Thornber a59db67656 dm cache: fix problematic dual use of a single migration count variable
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>
Cc: stable@vger.kernel.org
2015-01-23 11:06:08 -05:00
..
accessibility
acpi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
amba Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
ata Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
atm Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
auxdisplay
base Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
block Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
bluetooth Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
bus Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
cdrom
char Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
clk Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
clocksource Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
connector cn: verify msg->len before making callback 2014-11-26 19:09:01 -08:00
coresight coresight-replicator: remove .owner field for driver 2014-11-26 19:28:11 -08:00
cpufreq Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
cpuidle Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
crypto Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dca
devfreq
dio
dma Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dma-buf
edac Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
eisa
extcon Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
firewire
firmware Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
fmc
gpio Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-12-12 10:26:47 -08:00
hsi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
hv Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
hwmon Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
hwspinlock
i2c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ide Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
idle
iio Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-12-11 14:27:06 -08:00
input Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
iommu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
ipack
irqchip Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-12-12 10:08:06 -08:00
leds Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
lguest virtio: allow finalize_features to fail 2014-12-09 16:32:32 +02:00
macintosh
mailbox Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mcb
md dm cache: fix problematic dual use of a single migration count variable 2015-01-23 11:06:08 -05:00
media Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
memory Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
memstick
message
mfd Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
misc Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
mmc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mtd Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
net Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
nfc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ntb
nubus
of Merge branch 'i2c/for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-12-14 12:54:40 -08:00
oprofile
parisc
parport Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
pci Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pcmcia Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
phy Improvements in phy-core specifically on PHY core finds the PHY in the case 2014-11-27 08:25:20 -08:00
pinctrl Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
platform Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pnp
power Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
remoteproc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
reset Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
rpmsg rpmsg: use less buffers when vrings are small 2014-11-26 18:24:36 +02:00
rtc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
s390 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sbus
scsi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sfi
sh drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-05 03:08:24 +01:00
sn
soc Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
spi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spmi
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
staging Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
target Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-12-12 10:08:06 -08:00
tc
thermal Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
thunderbolt
tty Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
uio Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
usb Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
uwb
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-12-11 14:27:06 -08:00
video Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
virt
virtio Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
vlynq
vme
w1 Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
watchdog Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
xen xen: features and fixes for 3.19-rc0 2014-12-11 18:15:33 -08:00
zorro
Kconfig
Makefile