tmp_suning_uos_patched/drivers/md
NeilBrown a2826aa92e md: support barrier requests on all personalities.
Previously barriers were only supported on RAID1.  This is because
other levels requires synchronisation across all devices and so needed
a different approach.
Here is that approach.

When a barrier arrives, we send a zero-length barrier to every active
device.  When that completes - and if the original request was not
empty -  we submit the barrier request itself (with the barrier flag
cleared) and then submit a fresh load of zero length barriers.

The barrier request itself is asynchronous, but any subsequent
request will block until the barrier completes.

The reason for clearing the barrier flag is that a barrier request is
allowed to fail.  If we pass a non-empty barrier through a striping
raid level it is conceivable that part of it could succeed and part
could fail.  That would be way too hard to deal with.
So if the first run of zero length barriers succeed, we assume all is
sufficiently well that we send the request and ignore errors in the
second run of barriers.

RAID5 needs extra care as write requests may not have been submitted
to the underlying devices yet.  So we flush the stripe cache before
proceeding with the barrier.

Note that the second set of zero-length barriers are submitted
immediately after the original request is submitted.  Thus when
a personality finds mddev->barrier to be set during make_request,
it should not return from make_request until the corresponding
per-device request(s) have been queued.

That will be done in later patches.

Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Andre Noll <maan@systemlinux.org>
2009-12-14 12:49:49 +11:00
..
raid6test
.gitignore
bitmap.c
bitmap.h
dm-bio-record.h
dm-crypt.c
dm-delay.c
dm-exception-store.c
dm-exception-store.h
dm-io.c
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.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.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
dm-stripe.c
dm-sysfs.c
dm-table.c
dm-target.c
dm-uevent.c
dm-uevent.h
dm-zero.c
dm.c
dm.h
faulty.c
Kconfig
linear.c md: support barrier requests on all personalities. 2009-12-14 12:49:49 +11:00
linear.h
Makefile
md.c md: support barrier requests on all personalities. 2009-12-14 12:49:49 +11:00
md.h md: support barrier requests on all personalities. 2009-12-14 12:49:49 +11:00
mktables.c
multipath.c md: support barrier requests on all personalities. 2009-12-14 12:49:49 +11:00
multipath.h
raid0.c md: support barrier requests on all personalities. 2009-12-14 12:49:49 +11:00
raid0.h
raid1.c
raid1.h
raid5.c md: support barrier requests on all personalities. 2009-12-14 12:49:49 +11:00
raid5.h
raid6algos.c md: remove sparse warning:symbol XXX was not declared. 2009-12-14 12:49:47 +11:00
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c md: support barrier requests on all personalities. 2009-12-14 12:49:49 +11:00
raid10.h
unroll.awk