linux/drivers/md
NeilBrown f851b60db0 md: Check MD_RECOVERY_RUNNING as well as ->sync_thread.
A recent change to md started the ->sync_thread from a asynchronously
from a work_queue rather than synchronously.  This means that there
can be a small window between the time when MD_RECOVERY_RUNNING is set
and when ->sync_thread is set.

So code that checks ->sync_thread might now conclude that the thread
has not been started and (because a lock is held) will not be started.
That is no longer the case.

Most of those places are best fixed by testing MD_RECOVERY_RUNNING
as well.  To make this completely reliable, we wake_up(&resync_wait)
after clearing that flag as well as after clearing ->sync_thread.

Other places are better served by flushing the relevant workqueue
to ensure that that if the sync thread was starting, it has now
started.  This is particularly best if we are about to stop the
sync thread.

Fixes: ac05f25669
Signed-off-by: NeilBrown <neilb@suse.de>
2014-12-11 10:02:10 +11:00
..
bcache block: disable entropy contributions for nonrot devices 2014-10-04 10:55:32 -06:00
persistent-data dm btree: fix a recursion depth bug in btree walking code 2014-11-10 15:23:58 -05:00
bitmap.c md/bitmap: always wait for writes on unplug. 2014-10-09 10:07:04 +11:00
bitmap.h kernfs: s/sysfs_dirent/kernfs_node/ and rename its friends accordingly 2013-12-11 15:28:36 -08:00
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: Refactor for new bio cloning/splitting 2013-11-23 22:33:55 -08:00
dm-bufio.c . stable fix for dm-thin that avoids normal IO racing with discard 2014-11-13 09:19:20 -08:00
dm-bufio.h dm snapshot: use dm-bufio prefetch 2014-01-14 23:23:03 -05:00
dm-builtin.c dm sysfs: fix a module unload race 2014-01-14 23:23:04 -05:00
dm-cache-block-types.h dm cache: remove remainder of distinct discard block size 2014-03-27 16:56:23 -04:00
dm-cache-metadata.c dm cache metadata: use dm-space-map-metadata.h defined size limits 2014-08-01 12:30:33 -04:00
dm-cache-metadata.h dm cache metadata: use dm-space-map-metadata.h defined size limits 2014-08-01 12:30:33 -04:00
dm-cache-policy-cleaner.c dm cache: policy change version from string to integer set 2013-03-20 17:21:27 +00:00
dm-cache-policy-internal.h dm cache: add remove_cblock method to policy interface 2013-11-11 11:37:50 -05:00
dm-cache-policy-mq.c dm cache mq: fix memory allocation failure for large cache devices 2014-02-28 12:18:29 -05:00
dm-cache-policy.c dm cache: add policy name to status output 2014-01-16 13:44:11 -05:00
dm-cache-policy.h dm cache: add policy name to status output 2014-01-16 13:44:11 -05:00
dm-cache-target.c dm cache: fix race causing dirty blocks to be marked as clean 2014-09-10 11:20:47 -04:00
dm-crypt.c crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt 2014-10-14 10:51:23 +02:00
dm-delay.c Merge branch 'for-3.14/core' of git://git.kernel.dk/linux-block 2014-01-30 11:19:05 -08:00
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: replace simple_strtoul 2012-07-27 15:07:59 +01:00
dm-exception-store.h
dm-flakey.c block: Abstract out bvec iterator 2013-11-23 22:33:47 -08:00
dm-io.c dm io: simplify dec_count and sync_io 2014-08-01 12:30:30 -04:00
dm-ioctl.c dm: allow active and inactive tables to share dm_devs 2014-10-05 20:03:35 -04:00
dm-kcopyd.c dm: stop using WQ_NON_REENTRANT 2013-08-23 09:02:13 -04:00
dm-linear.c block: Abstract out bvec iterator 2013-11-23 22:33:47 -08:00
dm-log-userspace-base.c dm log userspace: allow mark requests to piggyback on flush requests 2014-01-21 23:46:27 -05:00
dm-log-userspace-transfer.c dm log userspace: fix memory leak in dm_ulog_tfr_init failure path 2014-10-05 20:03:38 -04:00
dm-log-userspace-transfer.h
dm-log.c dm: use memweight() 2012-07-30 17:25:16 -07:00
dm-mpath.c dm mpath: stop queueing IO when no valid paths exist 2014-10-05 20:03:35 -04:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-raid.c dm raid: fix inaccessible superblocks causing oops in configure_discard_support 2014-10-29 14:53:27 -04:00
dm-raid1.c dm raid1: fix immutable biovec related BUG when retrying read bio 2014-02-18 10:48:57 -05:00
dm-region-hash.c block: Abstract out bvec iterator 2013-11-23 22:33:47 -08:00
dm-round-robin.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-service-time.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-snap-persistent.c dm snapshot: fix metadata corruption 2014-03-03 17:58:13 -05:00
dm-snap-transient.c
dm-snap.c sched: Remove proliferation of wait_on_bit() action functions 2014-07-16 15:10:39 +02:00
dm-stats.c md: Replace __this_cpu_ptr with raw_cpu_ptr 2014-08-26 13:45:47 -04:00
dm-stats.h dm: add statistics support 2013-09-05 20:46:06 -04:00
dm-stripe.c dm stripe: fix potential for leak in stripe_ctr error path 2014-10-10 22:05:18 -04:00
dm-switch.c dm switch: efficiently support repetitive patterns 2014-08-01 12:30:37 -04:00
dm-sysfs.c dm sysfs: fix a module unload race 2014-01-14 23:23:04 -05:00
dm-table.c dm: allow active and inactive tables to share dm_devs 2014-10-05 20:03:35 -04:00
dm-target.c dm: allow error target to replace bio-based and request-based targets 2013-09-05 20:46:05 -04:00
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: ensure user takes action to validate data and metadata consistency 2014-03-05 15:25:35 -05:00
dm-thin.c dm thin: grab a virtual cell before looking up the mapping 2014-11-04 13:05:53 -05: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: allow active and inactive tables to share dm_devs 2014-10-05 20:03:35 -04:00
dm.h dm: allow active and inactive tables to share dm_devs 2014-10-05 20:03:35 -04:00
faulty.c block: Abstract out bvec iterator 2013-11-23 22:33:47 -08:00
Kconfig dm: add era target 2014-03-27 16:56:23 -04:00
linear.c md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
linear.h
Makefile dm: add era target 2014-03-27 16:56:23 -04:00
md.c md: Check MD_RECOVERY_RUNNING as well as ->sync_thread. 2014-12-11 10:02:10 +11:00
md.h md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
multipath.c md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
multipath.h
raid0.c md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
raid0.h
raid1.c md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
raid1.h md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
raid5.c md/raid5: fetch_block must fetch all the blocks handle_stripe_dirtying wants. 2014-12-03 16:07:58 +11:00
raid5.h md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
raid10.c md: remove unwanted white space from md.c 2014-10-14 13:08:29 +11:00
raid10.h MD RAID10: Improve redundancy for 'far' and 'offset' algorithms (part 1) 2013-02-26 11:55:30 +11:00