Merge tag 'md-3.11' into for-next

md updates for 3.11

Mostly fixes with a few minor features (e.g. "last_sync_action" sysfs file).
block: add bio_rewind() to reset bio_vec

Provide a mechanism for drivers to "rewind" a bio, essentially undoing
all bio_advance() calls on the bio. After the rewind, the bio idx will
be 0, size and sector reset, and each bio_vec len and offset restored to
their initial values.

This is needed to fix a bug in 3.10.

Cc: stable@vger.kernel.org (3.10)
Suggested-by: NeilBrown <neilb@suse.de>
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Signed-off-by: NeilBrown <neilb@suse.de>
md: raid1: use bio_rewind() before bio_copy_data()

bio_copy_data() cannot execute on a fully completed source (or
destination) bio.  MD RAID1 is recycling a completed read bio for RAID
repair purposes and needs to fix up the source and destination bios for
bio_copy_data(): in particular, the io-vector index needs to be rewound
and the bios unchained.

This fixes a bug which cause md/raid1 to crash during "check",
so is suitable for 3.10-stable.

Cc: stable@vger.kernel.org
Suggested-by: NeilBrown <neilb@suse.de>
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Signed-off-by: NeilBrown <neilb@suse.de>