Artur Paszkiewicz c622ca543b md: don't print the same repeated messages about delayed sync operation
This fixes a long-standing bug that caused a flood of messages like:
"md: delaying data-check of md1 until md2 has finished (they share one
or more physical units)"

It can be reproduced like this:
1. Create at least 3 raid1 arrays on a pair of disks, each on different
   partitions.
2. Request a sync operation like 'check' or 'repair' on 2 arrays by
   writing to their md/sync_action attribute files. One operation should
   start and one should be delayed and a message like the above will be
   printed.
3. Issue a write to the third array. Each write will cause 2 copies of
   the message to be printed.

This happens when wake_up(&resync_wait) is called, usually by
md_check_recovery(). Then the delayed sync thread again prints the
message and is put to sleep. This patch adds a check in md_do_sync() to
prevent printing this message more than once for the same pair of
devices.

Reported-by: Sven Koehler <sven.koehler@gmail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=151801
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
2016-08-17 10:22:08 -07:00
..
2016-07-27 14:03:52 -07:00
2016-07-28 17:38:16 -07:00
2016-07-30 11:32:01 -07:00
2016-07-06 15:14:48 -07:00
2016-07-28 15:45:17 -07:00
2016-07-30 11:32:01 -07:00
2016-07-27 14:58:31 -07:00
2016-07-30 11:32:01 -07:00
2016-07-20 23:39:36 -07:00
2016-07-28 17:38:16 -07:00
2016-07-30 11:32:01 -07:00
2016-07-26 17:23:08 -07:00
2016-07-26 18:27:20 -07:00
2016-07-28 17:38:16 -07:00
2016-07-27 14:11:43 -07:00
2016-07-01 05:32:17 -04:00
2016-07-27 11:35:37 -07:00
2016-07-27 15:18:53 -07:00