linux-kernel-test/drivers/md
Tejun Heo 6a8736d10c dm: relax ordering of bio-based flush implementation
Unlike REQ_HARDBARRIER, REQ_FLUSH/FUA doesn't mandate any ordering
against other bio's.  This patch relaxes ordering around flushes.

* A flush bio is no longer deferred to workqueue directly.  It's
  processed like other bio's but __split_and_process_bio() uses
  md->flush_bio as the clone source.  md->flush_bio is initialized to
  empty flush during md initialization and shared for all flushes.

* As a flush bio now travels through the same execution path as other
  bio's, there's no need for dedicated error handling path either.  It
  can use the same error handling path in dec_pending().  Dedicated
  error handling removed along with md->flush_error.

* When dec_pending() detects that a flush has completed, it checks
  whether the original bio has data.  If so, the bio is queued to the
  deferred list w/ REQ_FLUSH cleared; otherwise, it's completed.

* As flush sequencing is handled in the usual issue/completion path,
  dm_wq_work() no longer needs to handle flushes differently.  Now its
  only responsibility is re-issuing deferred bio's the same way as
  _dm_request() would.  REQ_FLUSH handling logic including
  process_flush() is dropped.

* There's no reason for queue_io() and dm_wq_work() write lock
  dm->io_lock.  queue_io() now only uses md->deferred_lock and
  dm_wq_work() read locks dm->io_lock.

* bio's no longer need to be queued on the deferred list while a flush
  is in progress making DMF_QUEUE_IO_TO_THREAD unncessary.  Drop it.

This avoids stalling the device during flushes and simplifies the
implementation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-09-10 12:35:38 +02:00
..
.gitignore
bitmap.c md/bitmap: separate out loading a bitmap from initialising the structures. 2010-07-26 13:21:34 +10:00
bitmap.h md/bitmap: separate out loading a bitmap from initialising the structures. 2010-07-26 13:21:34 +10:00
dm-bio-record.h dm: preserve bi_io_vec when resubmitting bios 2009-04-02 19:55:23 +01:00
dm-crypt.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-delay.c dm delay: support discard 2010-08-12 04:14:13 +01:00
dm-exception-store.c dm snapshot: test chunk size against both origin and snapshot 2010-08-12 04:13:51 +01:00
dm-exception-store.h dm snapshot: test chunk size against both origin and snapshot 2010-08-12 04:13:51 +01:00
dm-io.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-ioctl.c dm: allow autoloading of dm mod 2010-08-12 04:14:05 +01:00
dm-kcopyd.c block: unify flags for struct bio and struct request 2010-08-07 18:20:39 +02:00
dm-linear.c dm: use dm_target_offset macro 2010-08-12 04:14:11 +01:00
dm-log-userspace-base.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dm-log-userspace-transfer.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dm-log-userspace-transfer.h dm log: userspace add luid to distinguish between concurrent log instances 2009-09-04 20:40:34 +01:00
dm-log.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-mpath.c dm mpath: support discard 2010-08-12 04:14:32 +01:00
dm-mpath.h dm mpath: remove is_active from struct dm_path 2008-10-10 13:36:58 +01:00
dm-path-selector.c dm: path selector use module refcount directly 2009-04-02 19:55:27 +01:00
dm-path-selector.h dm mpath: add start_io and nr_bytes to path selectors 2009-06-22 10:12:27 +01:00
dm-queue-length.c dm mpath: add queue length load balancer 2009-06-22 10:12:27 +01:00
dm-raid1.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-region-hash.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-round-robin.c dm mpath: add start_io and nr_bytes to path selectors 2009-06-22 10:12:27 +01:00
dm-service-time.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dm-snap-persistent.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-snap-transient.c dm snapshot: move cow ref from exception store to snap core 2009-12-10 23:52:12 +00:00
dm-snap.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-stripe.c dm: implement REQ_FLUSH/FUA support for bio-based dm 2010-09-10 12:35:38 +02:00
dm-sysfs.c Driver core: Constify struct sysfs_ops in struct kobj_type 2010-03-07 17:04:49 -08:00
dm-table.c dm: linear support discard 2010-08-12 04:14:08 +01:00
dm-target.c dm: error return error for discards 2010-08-12 04:14:14 +01:00
dm-uevent.c dm table: remove dm_get from dm_table_get_md 2010-03-06 02:29:52 +00:00
dm-uevent.h
dm-zero.c dm: zero silently drop discards 2010-08-12 04:14:12 +01:00
dm.c dm: relax ordering of bio-based flush implementation 2010-09-10 12:35:38 +02:00
dm.h dm: linear support discard 2010-08-12 04:14:08 +01:00
faulty.c Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus 2010-05-22 08:31:36 +10:00
Kconfig Merge branch 'async' of macbook:git/btrfs-unstable 2010-08-09 10:36:44 +01:00
linear.c md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
linear.h md/linear: use call_rcu to free obsolete 'conf' structures. 2009-06-18 08:49:42 +10:00
Makefile Merge branch 'async' of macbook:git/btrfs-unstable 2010-08-09 10:36:44 +01:00
md.c md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
md.h md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
multipath.c md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
multipath.h md: remove mddev_to_conf "helper" macro 2009-06-16 16:54:21 +10:00
raid0.c md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
raid0.h md: fix handling of array level takeover that re-arranges devices. 2010-06-24 13:33:24 +10:00
raid1.c md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
raid1.h md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
raid5.c md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
raid5.h md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
raid10.c md: implment REQ_FLUSH/FUA support 2010-09-10 12:35:38 +02:00
raid10.h md: fix handling of array level takeover that re-arranges devices. 2010-06-24 13:33:24 +10:00