linux/drivers/md
Andre Noll ab5bd5cbc8 md: Convert remaining 1k representations in linear.c to sectors.
This patch renames hash_spacing and preshift to  spacing and
sector_shift respectively with the following change of semantics:

Case 1: (sizeof(sector_t) <= sizeof(u32)).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In this case, we have sector_shift = preshift = 0 and spacing =
2 * hash_spacing.

Hence, the index for the hash table which is computed by the new code
in which_dev() as sector / spacing equals the old value which was
(sector/2) / hash_spacing.

Note also that the value of nb_zone stays the same because both sz
and base double.

Case 2: (sizeof(sector_t) > sizeof(u32)).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(aka the shifting dance case). Here we have sector_shift = preshift +
1 and

spacing = 2 * hash_spacing

during the computation of nb_zone and curr_sector, but

spacing = hash_spacing

in which_dev() because in the last hunk of the patch for linear.c we
shift down conf->spacing (= 2 * hash_spacing) by one more bit than
in the old code.

Hence in the computation of nb_zone, sz and base have the same value
as before, so nb_zone is not affected. Also curr_sector in the next
hunk stays the same.

In which_dev() the hash table index is computed as

(sector >> sector_shift) / spacing

In view of sector_shift = preshift + 1 and spacing = hash_spacing,
this equals

((sector/2) >> preshift) / hash_spacing

which is the value computed by the old code.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-10-13 11:55:12 +11:00
..
raid6test md: raid6: clean up the style of raid6test/test.c 2008-02-06 10:41:18 -08:00
.gitignore
Kconfig [SCSI] scsi_dh: fix kconfig related build errors 2008-07-15 09:16:43 -05:00
Makefile [SCSI] scsi_dh: Remove hardware handler infrastructure from dm 2008-06-05 09:23:42 -05:00
bitmap.c Fix problem with waiting while holding rcu read lock in md/bitmap.c 2008-09-01 12:48:13 +10:00
dm-bio-list.h
dm-bio-record.h
dm-crypt.c dm crypt: avoid unnecessary wait when splitting bio 2008-10-10 13:37:08 +01:00
dm-delay.c
dm-exception-store.c dm exception store: use chunk_t for_areas 2008-10-10 13:37:01 +01:00
dm-io.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-ioctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2008-10-10 11:11:47 -07:00
dm-kcopyd.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-linear.c dm: linear add merge 2008-07-21 12:00:38 +01:00
dm-log.c dm log: make dm_dirty_log init and exit static 2008-07-21 12:00:27 +01:00
dm-mpath.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2008-10-10 11:11:47 -07: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.h
dm-raid1.c dm raid1: kcopyd should stop on error if errors handled 2008-10-10 13:36:59 +01:00
dm-round-robin.c
dm-snap.c dm snapshot: use per device mempools 2008-07-21 12:00:35 +01:00
dm-snap.h dm snapshot: use per device mempools 2008-07-21 12:00:35 +01:00
dm-stripe.c block: don't depend on consecutive minor space 2008-10-09 08:56:05 +02:00
dm-table.c dm: detect lost queue 2008-10-10 13:37:13 +01:00
dm-target.c
dm-uevent.c md: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
dm-uevent.h
dm-zero.c
dm.c block: move stats from disk to part0 2008-10-09 08:56:08 +02:00
dm.h dm: publish dm_vcalloc 2008-10-10 13:37:12 +01:00
faulty.c md: Make mddev->array_size sector-based. 2008-07-21 17:05:22 +10:00
linear.c md: Convert remaining 1k representations in linear.c to sectors. 2008-10-13 11:55:12 +11:00
md.c md: Don't try to set an array to 'read-auto' if it is already in that state. 2008-10-13 11:55:12 +11:00
mktables.c md: raid6: Fix mktable.c 2008-02-06 10:41:18 -08:00
multipath.c block: move stats from disk to part0 2008-10-09 08:56:08 +02:00
raid0.c block: mark bio_split_pool static 2008-10-09 08:57:05 +02:00
raid1.c block: move stats from disk to part0 2008-10-09 08:56:08 +02:00
raid5.c block: move stats from disk to part0 2008-10-09 08:56:08 +02:00
raid6.h
raid6algos.c drivers/md: use time_before, time_before_eq, etc 2008-04-28 08:58:42 -07:00
raid6altivec.uc
raid6int.uc
raid6mmx.c x86 merge fallout: uml 2007-10-29 07:41:32 -07:00
raid6recov.c
raid6sse1.c x86 merge fallout: uml 2007-10-29 07:41:32 -07:00
raid6sse2.c x86 merge fallout: uml 2007-10-29 07:41:32 -07:00
raid6x86.h x86 merge fallout: uml 2007-10-29 07:41:32 -07:00
raid10.c block: mark bio_split_pool static 2008-10-09 08:57:05 +02:00
unroll.pl