linux/drivers/md
Anssi Hannula 44fa816bb7 dm cache: fix race affecting dirty block count
nr_dirty is updated without locking, causing it to drift so that it is
non-zero (either a small positive integer, or a very large one when an
underflow occurs) even when there are no actual dirty blocks.  This was
due to a race between the workqueue and map function accessing nr_dirty
in parallel without proper protection.

People were seeing under runs due to a race on increment/decrement of
nr_dirty, see: https://lkml.org/lkml/2014/6/3/648

Fix this by using an atomic_t for nr_dirty.

Reported-by: roma1390@gmail.com
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
2014-08-01 12:25:22 -04:00
..
bcache arch: Mass conversion of smp_mb__*() 2014-04-18 14:20:48 +02:00
persistent-data
Kconfig
Makefile
bitmap.c md/bitmap: remove confusing code from filemap_get_page. 2014-05-29 16:59:47 +10:00
bitmap.h
dm-bio-prison.c dm bio prison: implement per bucket locking in the dm_bio_prison hash table 2014-06-11 16:48:54 -04:00
dm-bio-prison.h dm thin: return ENOSPC instead of EIO when error_if_no_space enabled 2014-06-03 13:44:08 -04:00
dm-bio-record.h
dm-bufio.c dm bufio: fully initialize shrinker 2014-08-01 12:07:21 -04:00
dm-bufio.h
dm-builtin.c
dm-cache-block-types.h
dm-cache-metadata.c dm cache metadata: do not allow the data block size to change 2014-07-15 14:07:50 -04:00
dm-cache-metadata.h dm cache: fix a lock-inversion 2014-04-04 14:53:05 -04:00
dm-cache-policy-cleaner.c
dm-cache-policy-internal.h
dm-cache-policy-mq.c
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm cache: fix race affecting dirty block count 2014-08-01 12:25:22 -04:00
dm-crypt.c dm crypt, dm zero: update author name following legal name change 2014-07-10 16:44:14 -04:00
dm-delay.c
dm-era-target.c dm era: check for a non-NULL metadata object before closing it 2014-06-03 13:44:08 -04:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
dm-io.c dm io: fix a race condition in the wake up code for sync_io 2014-07-10 16:44:14 -04:00
dm-ioctl.c
dm-kcopyd.c
dm-linear.c
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log.c
dm-mpath.c dm mpath: fix IO hang due to logic bug in multipath_busy 2014-07-10 16:44:15 -04:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c
dm-raid1.c
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c . Add dm_accept_partial_bio interface to DM core to allow DM targets 2014-06-12 13:33:29 -07:00
dm-stats.c
dm-stats.h
dm-stripe.c
dm-switch.c
dm-sysfs.c
dm-table.c dm: remove symbol export for dm_set_device_limits 2014-06-04 09:46:34 -04:00
dm-target.c
dm-thin-metadata.c dm thin metadata: do not allow the data block size to change 2014-07-15 14:05:26 -04:00
dm-thin-metadata.h
dm-thin.c dm thin: update discard_granularity to reflect the thin-pool blocksize 2014-06-11 16:56:12 -04:00
dm-uevent.c
dm-uevent.h
dm-verity.c dm verity: fix biovecs hash calculation regression 2014-04-15 12:19:24 -04:00
dm-zero.c dm crypt, dm zero: update author name following legal name change 2014-07-10 16:44:14 -04:00
dm.c dm: allocate a special workqueue for deferred device removal 2014-07-10 16:44:13 -04:00
dm.h
faulty.c
linear.c
linear.h
md.c md: flush writes before starting a recovery. 2014-07-03 10:44:45 +10:00
md.h md/bitmap: don't abuse i_writecount for bitmap files. 2014-04-09 12:26:59 +10:00
multipath.c
multipath.h
raid0.c
raid0.h
raid1.c md/raid1: r1buf_pool_alloc: free allocate pages when subsequent allocation fails. 2014-04-09 14:42:23 +10:00
raid1.h
raid5.c Assorted md fixes for 3.16 2014-06-11 08:33:41 -07:00
raid5.h raid5: add an option to avoid copy data from bio to stripe cache 2014-05-29 16:59:47 +10:00
raid10.c md/raid10: call wait_barrier() for each request submitted. 2014-05-06 09:49:26 +10:00
raid10.h