Files
ubports_kernel_google_msm/include/linux
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
..
2008-07-25 10:53:30 -07:00
2008-08-10 23:32:07 +02:00
2008-07-27 01:26:17 +02:00
2008-09-12 16:30:20 -07:00
2008-08-12 10:13:38 +10:00
2008-07-24 10:47:24 -07:00
2008-07-24 10:47:33 -07:00
2008-07-24 10:47:33 -07:00
2008-10-09 08:56:22 +02:00
2008-08-04 21:56:09 -07:00
2008-07-25 10:53:33 -07:00
2008-07-20 17:12:38 -07:00
2008-07-22 17:30:57 -07:00
2008-10-10 13:37:12 +01:00
2008-08-28 11:49:15 -05:00
2008-07-21 12:00:37 +01:00
2008-07-24 10:47:29 -07:00
2008-08-20 13:19:51 -07:00
2008-10-08 19:44:18 -04:00
2008-08-12 16:07:31 -07:00
2008-07-16 23:27:03 +02:00
2008-07-26 20:53:20 -04:00
2008-07-25 10:53:48 -07:00
2008-07-20 17:12:36 -07:00
2008-09-22 07:29:31 +01:00
2008-07-25 10:53:30 -07:00
2008-07-20 17:12:36 -07:00
2008-07-23 15:25:21 +02:00
2008-08-08 15:13:27 +01:00
2008-08-28 08:33:23 +02:00
2008-07-25 10:53:42 -07:00
2008-07-18 18:05:19 -07:00
2008-10-09 11:59:55 -07:00
2008-07-14 22:49:06 -07:00
2008-09-22 21:28:11 -07:00
2008-08-02 18:36:10 +01:00
2008-10-07 15:34:37 -07:00
2008-07-25 10:53:39 -07:00
2008-07-18 22:50:34 +02:00
2008-07-20 17:12:37 -07:00
2008-07-30 09:41:45 -07:00
2008-07-24 10:47:17 -07:00
2008-08-25 17:28:25 +03:00
2008-07-23 09:49:56 +01:00
2008-09-01 09:47:16 +02:00
2008-08-11 15:25:07 +02:00
2008-10-09 08:56:06 +02:00
2008-07-27 01:56:38 +02:00
2008-07-27 01:54:58 +02:00
2008-08-02 16:28:50 +02:00
2008-08-16 16:45:56 -07:00
2008-08-16 16:45:56 -07:00
2008-07-28 16:30:21 -07:00
2008-07-24 10:47:24 -07:00
2008-07-25 10:53:34 -07:00
2008-08-26 10:37:20 -07:00
2008-10-01 07:03:24 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-07-26 12:00:03 -07:00
2008-10-08 16:38:41 -07:00
2008-08-05 14:33:50 -07:00
2008-09-16 19:35:05 -07:00
2008-07-26 20:53:12 -04:00
2008-08-07 17:18:47 -07:00
2008-10-02 15:53:13 -07:00
2008-07-25 10:53:29 -07:00
2008-08-15 17:03:06 +02:00
2008-08-22 16:29:57 -04:00
2008-08-20 15:40:32 -07:00
2008-09-22 19:51:15 -07:00
2008-07-25 10:53:42 -07:00
2008-07-24 08:31:21 -04:00
2008-07-24 10:47:24 -07:00
2008-10-07 14:22:33 -07:00
2008-08-05 09:28:47 +03:00
2008-07-25 10:53:30 -07:00
2008-09-09 17:41:42 +02:00
2008-08-11 09:30:24 +02:00
2008-07-20 17:12:37 -07:00
2008-07-26 12:00:12 -07:00
2008-07-26 20:53:12 -04:00
2008-10-07 14:43:06 -07:00
2008-09-05 14:39:38 -07:00
2008-07-20 17:12:34 -07:00
2008-08-15 10:34:07 -07:00
2008-07-21 15:15:55 -07:00
2008-08-16 16:45:56 -07:00
2008-07-24 10:47:14 -07:00
2008-07-25 10:53:40 -07:00