<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux-stable.git/drivers/md/raid1.c, branch linux-2.6.37.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/'/>
<updated>2011-03-07T23:05:11+00:00</updated>
<entry>
<title>md: avoid spinlock problem in blk_throtl_exit</title>
<updated>2011-03-07T23:05:11+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-02-21T07:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=eacacaf73496fdad9e82e4d81a1645be05cd3d59'/>
<id>urn:sha1:eacacaf73496fdad9e82e4d81a1645be05cd3d59</id>
<content type='text'>
commit da9cf5050a2e3dbc3cf26a8d908482eb4485ed49 upstream.

blk_throtl_exit assumes that -&gt;queue_lock still exists,
so make sure that it does.
To do this, we stop redirecting -&gt;queue_lock to conf-&gt;device_lock
and leave it pointing where it is initialised - __queue_lock.

As the blk_plug functions check the -&gt;queue_lock is held, we now
take that spin_lock explicitly around the plug functions.  We don't
need the locking, just the warning removal.

This is needed for any kernel with the blk_throtl code, which is
which is 2.6.37 and later.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>md/raid1: really fix recovery looping when single good device fails.</title>
<updated>2010-11-24T05:39:46+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-11-24T05:39:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=8f9e0ee38f75d4740daa9e42c8af628d33d19a02'/>
<id>urn:sha1:8f9e0ee38f75d4740daa9e42c8af628d33d19a02</id>
<content type='text'>
Commit 4044ba58dd15cb01797c4fd034f39ef4a75f7cc3 supposedly fixed a
problem where if a raid1 with just one good device gets a read-error
during recovery, the recovery would abort and immediately restart in
an infinite loop.

However it depended on raid1_remove_disk removing the spare device
from the array.  But that does not happen in this case.  So add a test
so that in the 'recovery_disabled' case, the device will be removed.

This suitable for any kernel since 2.6.29 which is when
recovery_disabled was introduced.

Cc: stable@kernel.org
Reported-by: Sebastian Färber &lt;faerber@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: tidy up device searches in read_balance.</title>
<updated>2010-10-29T05:40:33+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-09-06T04:10:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=f3ac8bf7ce1c5abd763ea762e95d1cdcf7799372'/>
<id>urn:sha1:f3ac8bf7ce1c5abd763ea762e95d1cdcf7799372</id>
<content type='text'>
The code for searching through the device list to read-balance in
raid1 is rather clumsy and hard to follow.  Try to simplify it a bit.

No important functionality change here.


Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: fix some typos in comments.</title>
<updated>2010-10-29T05:40:33+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-10-26T04:46:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=046abeede717909feec38587d667cde1fc6c459c'/>
<id>urn:sha1:046abeede717909feec38587d667cde1fc6c459c</id>
<content type='text'>
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;

</content>
</entry>
<entry>
<title>md/raid1: discard unused variable.</title>
<updated>2010-10-29T05:40:33+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-10-27T04:39:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=9b19553e0bd342957846037c996861d280ed694d'/>
<id>urn:sha1:9b19553e0bd342957846037c996861d280ed694d</id>
<content type='text'>
This structure field (flushing_bio_list) is never used, so remove it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: use separate bio pool for each md device.</title>
<updated>2010-10-28T06:36:15+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-10-26T07:31:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=a167f663243662aa9153c01086580a11cde9ffdc'/>
<id>urn:sha1:a167f663243662aa9153c01086580a11cde9ffdc</id>
<content type='text'>
bio_clone and bio_alloc allocate from a common bio pool.
If an md device is stacked with other devices that use this pool, or under
something like swap which uses the pool, then the multiple calls on
the pool can cause deadlocks.

So allocate a local bio pool for each md array and use that rather
than the common pool.

This pool is used both for regular IO and metadata updates.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: change type of first arg to sync_page_io.</title>
<updated>2010-10-28T06:36:11+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-10-27T04:16:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=2b193363ef68667ad717a6723165e0dccf99470f'/>
<id>urn:sha1:2b193363ef68667ad717a6723165e0dccf99470f</id>
<content type='text'>
Currently sync_page_io takes a 'bdev'.
Every caller passes 'rdev-&gt;bdev'.
We will soon want another field out of the rdev in sync_page_io,
So just pass the rdev instead of the bdev out of it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: perform mem allocation before disabling writes during resync.</title>
<updated>2010-10-28T06:36:09+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-10-26T06:41:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=1c4588e9c19cae6209a28c9da2f16a18a610b935'/>
<id>urn:sha1:1c4588e9c19cae6209a28c9da2f16a18a610b935</id>
<content type='text'>
Though this mem alloc is GFP_NOIO an so will not deadlock, it seems
better to do the allocation before 'raise_barrier' which stops any IO
requests while the resync proceeds.

raid10 always uses this order, so it is at least consistent to do the
same in raid1.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: use bio_kmalloc rather than bio_alloc when failure is acceptable.</title>
<updated>2010-10-28T06:36:06+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-10-26T06:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=6746557f0325a66f57d179126426e38a8ea66945'/>
<id>urn:sha1:6746557f0325a66f57d179126426e38a8ea66945</id>
<content type='text'>
bio_alloc can never fail (as it uses a mempool) but an block
indefinitely, especially if the caller is holding a reference to a
previously allocated bio.

So these to places which both handle failure and hold multiple bios
should not use bio_alloc, they should use bio_kmalloc.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Fix possible deadlock with multiple mempool allocations.</title>
<updated>2010-10-28T06:34:07+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-10-19T01:54:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=4e78064f42ad474ce9c31760861f7fb0cfc22532'/>
<id>urn:sha1:4e78064f42ad474ce9c31760861f7fb0cfc22532</id>
<content type='text'>
It is not safe to allocate from a mempool while holding an item
previously allocated from that mempool as that can deadlock when the
mempool is close to exhaustion.

So don't use a bio list to collect the bios to write to multiple
devices in raid1 and raid10.
Instead queue each bio as it becomes available so an unplug will
activate all previously allocated bios and so a new bio has a chance
of being allocated.

This means we must set the 'remaining' count to '1' before submitting
any requests, then when all are submitted, decrement 'remaining' and
possible handle the write completion at that point.

Reported-by: Torsten Kaiser &lt;just.for.lkml@googlemail.com&gt;
Tested-by: Torsten Kaiser &lt;just.for.lkml@googlemail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
</feed>
