<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/md/linear.c, branch v2.6.28</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.28</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.28'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2008-11-06T08:41:24+00:00</updated>
<entry>
<title>md: linear: Fix a division by zero bug for very small arrays.</title>
<updated>2008-11-06T08:41:24+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-11-06T08:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1cd14ae52985634d0389e934eba25b5ecf24565'/>
<id>urn:sha1:f1cd14ae52985634d0389e934eba25b5ecf24565</id>
<content type='text'>
We currently oops with a divide error on starting a linear software
raid array consisting of at least two very small (&lt; 500K) devices.

The bug is caused by the calculation of the hash table size which
tries to compute sector_div(sz, base) with "base" being zero due to
the small size of the component devices of the array.

Fix this by requiring the hash spacing to be at least one which
implies that also "base" is non-zero.

This bug has existed since about 2.6.14.

Cc: stable@kernel.org
Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Remove unnecessary #includes, #defines, and function declarations.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb4d8c76e56a887b9eee99fbc55fe82b18625d30'/>
<id>urn:sha1:fb4d8c76e56a887b9eee99fbc55fe82b18625d30</id>
<content type='text'>
A lot of cruft has gathered over the years.  Time to remove it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Convert remaining 1k representations in linear.c to sectors.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab5bd5cbc8d4b868378d062eed3d4240930fbb86'/>
<id>urn:sha1:ab5bd5cbc8d4b868378d062eed3d4240930fbb86</id>
<content type='text'>
This patch renames hash_spacing and preshift to  spacing and
sector_shift respectively with the following change of semantics:

Case 1: (sizeof(sector_t) &lt;= 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) &gt; 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-&gt;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 &gt;&gt; sector_shift) / spacing

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

((sector/2) &gt;&gt; preshift) / hash_spacing

which is the value computed by the old code.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: linear.c: Make two local variables sector-based.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23242fbb470ff4c8c4d41f178832cf1929273d7d'/>
<id>urn:sha1:23242fbb470ff4c8c4d41f178832cf1929273d7d</id>
<content type='text'>
This is a preparation for representing also the remaining fields of struct
linear_private_data as sectors.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: linear: Represent dev_info-&gt;size and dev_info-&gt;offset in sectors.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6283815d1853b7daf31dc4adb83e5c1dc9568251'/>
<id>urn:sha1:6283815d1853b7daf31dc4adb83e5c1dc9568251</id>
<content type='text'>
Rename them to num_sectors and start_sector which is more descriptive.

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: linear.c: Remove broken debug code.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=451708d2a439accbce136637ed4f156fc27371ab'/>
<id>urn:sha1:451708d2a439accbce136637ed4f156fc27371ab</id>
<content type='text'>
conf-&gt;smallest_size is undefined since day one of the git repo..

Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: linear.c: Remove pointless initialization of curr_offset.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=481d86c7ebe2ce59dfb6ccb720efa9d3fc1cf7cd'/>
<id>urn:sha1:481d86c7ebe2ce59dfb6ccb720efa9d3fc1cf7cd</id>
<content type='text'>
Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: linear.c: Fix typo in comment.</title>
<updated>2008-10-13T00:55:12+00:00</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-10-13T00:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e61130228ea5740e31e9646ea6d1c9d9089746c3'/>
<id>urn:sha1:e61130228ea5740e31e9646ea6d1c9d9089746c3</id>
<content type='text'>
Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>block: mark bio_split_pool static</title>
<updated>2008-10-09T06:57:05+00:00</updated>
<author>
<name>Denis ChengRq</name>
<email>crquan@gmail.com</email>
</author>
<published>2008-10-09T06:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6feef531f55cf4a20fd9eb39f5352e5745203603'/>
<id>urn:sha1:6feef531f55cf4a20fd9eb39f5352e5745203603</id>
<content type='text'>
Since all bio_split calls refer the same single bio_split_pool, the bio_split
function can use bio_split_pool directly instead of the mempool_t parameter;

then the mempool_t parameter can be removed from bio_split param list, and
bio_split_pool is only referred in fs/bio.c file, can be marked static.

Signed-off-by: Denis ChengRq &lt;crquan@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: move stats from disk to part0</title>
<updated>2008-10-09T06:56:08+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-08-25T10:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=074a7aca7afa6f230104e8e65eba3420263714a5'/>
<id>urn:sha1:074a7aca7afa6f230104e8e65eba3420263714a5</id>
<content type='text'>
Move stats related fields - stamp, in_flight, dkstats - from disk to
part0 and unify stat handling such that...

* part_stat_*() now updates part0 together if the specified partition
  is not part0.  ie. part_stat_*() are now essentially all_stat_*().

* {disk|all}_stat_*() are gone.

* part_round_stats() is updated similary.  It handles part0 stats
  automatically and disk_round_stats() is killed.

* part_{inc|dec}_in_fligh() is implemented which automatically updates
  part0 stats for parts other than part0.

* disk_map_sector_rcu() is updated to return part0 if no part matches.
  Combined with the above changes, this makes NULL special case
  handling in callers unnecessary.

* Separate stats show code paths for disk are collapsed into part
  stats show code paths.

* Rename disk_stat_lock/unlock() to part_stat_lock/unlock()

While at it, reposition stat handling macros a bit and add missing
parentheses around macro parameters.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
</feed>
