<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/raid1.c, branch v3.4-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md/raid1.c?h=v3.4-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md/raid1.c?h=v3.4-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-04-03T05:39:23Z</updated>
<entry>
<title>md/raid1,raid10: don't compare excess byte during consistency check.</title>
<updated>2012-04-03T05:39:23Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-04-01T15:39:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5020ad7d143ccfcf8149974096220d59e5572120'/>
<id>urn:sha1:5020ad7d143ccfcf8149974096220d59e5572120</id>
<content type='text'>
When comparing two pages read from different legs of a mirror, only
compare the bytes that were read, not the whole page.

In most cases we read a whole page, but in some cases with
bad blocks or odd sizes devices we might read fewer than that.

This bug has been present "forever" but at worst it might cause
a report of two many mismatches and generate a little bit
extra resync IO, so there is no need to back-port to -stable
kernels.

Reported-by: majianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1:Remove unnecessary rcu_dereference(conf-&gt;mirrors[i].rdev).</title>
<updated>2012-04-03T05:37:33Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2012-04-01T15:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a42f9d83b5c05dc6e678a1f0cd9767502c2c58de'/>
<id>urn:sha1:a42f9d83b5c05dc6e678a1f0cd9767502c2c58de</id>
<content type='text'>
Because rde-&gt;nr_pending &gt; 0,so can not remove this disk.
And in any case, we aren't holding rcu_read_lock()

Signed-off-by: majianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: If md_integrity_register() failed,run() must free the mem</title>
<updated>2012-04-01T23:48:38Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2012-04-01T23:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5220ea1e640869e70f894837678315c878c651fd'/>
<id>urn:sha1:5220ea1e640869e70f894837678315c878c651fd</id>
<content type='text'>
Signed-off-by: majianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: handle merge_bvec_fn in member devices.</title>
<updated>2012-03-19T01:46:39Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-03-19T01:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b740b8d79252f13bcb7e5d3c1d43157e78a81e7'/>
<id>urn:sha1:6b740b8d79252f13bcb7e5d3c1d43157e78a81e7</id>
<content type='text'>
Currently we don't honour merge_bvec_fn in member devices so if there
is one, we force all requests to be single-page at most.
This is not ideal.

So create a raid1 merge_bvec_fn to check that function in children
as well.

This introduces a small problem.  There is no locking around calls
the -&gt;merge_bvec_fn and subsequent calls to -&gt;make_request.  So a
device added between these could end up getting a request which
violates its merge_bvec_fn.

Currently the best we can do is synchronize_sched().  This will work
providing no preemption happens.  If there is is preemption, we just
have to hope that new devices are largely consistent with old devices.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: tidy up rdev_for_each usage.</title>
<updated>2012-03-19T01:46:39Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-03-19T01:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dafb20fa34320a472deb7442f25a0c086e0feb33'/>
<id>urn:sha1:dafb20fa34320a472deb7442f25a0c086e0feb33</id>
<content type='text'>
md.h has an 'rdev_for_each()' macro for iterating the rdevs in an
mddev.  However it uses the 'safe' version of list_for_each_entry,
and so requires the extra variable, but doesn't include 'safe' in the
name, which is useful documentation.

Consequently some places use this safe version without needing it, and
many use an explicity list_for_each entry.

So:
 - rename rdev_for_each to rdev_for_each_safe
 - create a new rdev_for_each which uses the plain
   list_for_each_entry,
 - use the 'safe' version only where needed, and convert all other
   list_for_each_entry calls to use rdev_for_each.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1,raid10: avoid deadlock during resync/recovery.</title>
<updated>2012-03-19T01:46:38Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-03-19T01:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6b42dcb995e6acd7cc276774e751ffc9f0ef4bf'/>
<id>urn:sha1:d6b42dcb995e6acd7cc276774e751ffc9f0ef4bf</id>
<content type='text'>
If RAID1 or RAID10 is used under LVM or some other stacking
block device, it is possible to enter a deadlock during
resync or recovery.
This can happen if the upper level block device creates
two requests to the RAID1 or RAID10.  The first request gets
processed, blocks recovery and queue requests for underlying
requests in current-&gt;bio_list.  A resync request then starts
which will wait for those requests and block new IO.

But then the second request to the RAID1/10 will be attempted
and it cannot progress until the resync request completes,
which cannot progress until the underlying device requests complete,
which are on a queue behind that second request.

So allow that second request to proceed even though there is
a resync request about to start.

This is suitable for any -stable kernel.

Cc: stable@vger.kernel.org
Reported-by: Ray Morris &lt;support@bettercgi.com&gt;
Tested-by: Ray Morris &lt;support@bettercgi.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: fix buglet in md_raid1_contested.</title>
<updated>2012-02-13T03:24:05Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-02-13T03:24:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f53e29fc87b6fb76db0043202ec2c3450caa5ff3'/>
<id>urn:sha1:f53e29fc87b6fb76db0043202ec2c3450caa5ff3</id>
<content type='text'>
Since we added 'replacement' capability, RAID1 can have twice
as many devices as -&gt;raid_disks indicates.
So md_raid1_congested needs to check that many possible devices,
not just -&gt;raid_disks many.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: perform bad-block tests for WriteMostly devices too.</title>
<updated>2012-01-10T21:35:17Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-01-08T14:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=307729c8bc5b5a41361af8af95906eee7552acb1'/>
<id>urn:sha1:307729c8bc5b5a41361af8af95906eee7552acb1</id>
<content type='text'>
We normally try to avoid reading from write-mostly devices, but when
we do we really have to check for bad blocks and be sure not to
try reading them.

With the current code, best_good_sectors might not get set and that
causes zero-length read requests to be send down which is very
confusing.

This bug was introduced in commit d2eb35acfdccbe2 and so the patch
is suitable for 3.1.x and 3.2.x

Reported-and-tested-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Reported-and-tested-by: Art -kwaak- van Breemen &lt;ard@telegraafnet.nl&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>md/raid1: Mark device want_replacement when we see a write error.</title>
<updated>2011-12-22T23:17:57Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-12-22T23:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=19d671695e1931ebfd75b2b888778201aefe35ca'/>
<id>urn:sha1:19d671695e1931ebfd75b2b888778201aefe35ca</id>
<content type='text'>
Now that WantReplacement drives are replaced cleanly, mark a drive
as want_replacement when we see a write error.  It might get failed soon so
the WantReplacement flag is irrelevant, but if the write error is recorded
in the bad block log, we still want to activate any spare that might
be available.

Signed-off-by:  NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: If there is a spare and a want_replacement device, start replacement.</title>
<updated>2011-12-22T23:17:57Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-12-22T23:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ef449d1ec3668acbba6af6a500d0c84636b436f'/>
<id>urn:sha1:7ef449d1ec3668acbba6af6a500d0c84636b436f</id>
<content type='text'>
When attempting to add a spare to a RAID1 array, also consider
adding it as a replacement for a want_replacement device.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
</feed>
