<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/md/raid10.c, branch linux-2.6.35.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2011-02-06T19:03:42+00:00</updated>
<entry>
<title>md: protect against NULL reference when waiting to start a raid10.</title>
<updated>2011-02-06T19:03:42+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-12-09T06:02:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3a057e54f2cb3efc797633d7d7102db90beed50'/>
<id>urn:sha1:c3a057e54f2cb3efc797633d7d7102db90beed50</id>
<content type='text'>
commit 589a594be1fb8815b3f18e517be696c48664f728 upstream.

When we fail to start a raid10 for some reason, we call
md_unregister_thread to kill the thread that was created.

Unfortunately md_thread() will then make one call into the handler
(raid10d) even though md_wakeup_thread has not been called.  This is
not safe and as md_unregister_thread is called after mddev-&gt;private
has been set to NULL, it will definitely cause a NULL dereference.

So fix this at both ends:
 - md_thread should only call the handler if THREAD_WAKEUP has been
   set.
 - raid10 should call md_unregister_thread before setting things
   to NULL just like all the other raid modules do.

This is applicable to 2.6.35 and later.

Reported-by: "Citizen" &lt;citizen_lee@thecus.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>md/raid10: fix deadlock with unaligned read during resync</title>
<updated>2010-08-13T20:30:49+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-08-07T11:17:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f986737b930114d41549f405a4efdeb13002db70'/>
<id>urn:sha1:f986737b930114d41549f405a4efdeb13002db70</id>
<content type='text'>
commit 51e9ac77035a3dfcb6fc0a88a0d80b6f99b5edb1 upstream.

If the 'bio_split' path in raid10-read is used while
resync/recovery is happening it is possible to deadlock.
Fix this be elevating -&gt;nr_waiting for the duration of both
parts of the split request.

This fixes a bug that has been present since 2.6.22
but has only started manifesting recently for unknown reasons.
It is suitable for and -stable since then.

Reported-by:  Justin Bronder &lt;jsbronder@gentoo.org&gt;
Tested-by:  Justin Bronder &lt;jsbronder@gentoo.org&gt;
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: fix raid10 takeover: use new_layout for setup_conf</title>
<updated>2010-06-24T03:33:51+00:00</updated>
<author>
<name>Maciej Trela</name>
<email>maciej.trela@intel.com</email>
</author>
<published>2010-06-16T10:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f73ea87375a1b2bf6c0be82bb9a3cb9d5ee7a407'/>
<id>urn:sha1:f73ea87375a1b2bf6c0be82bb9a3cb9d5ee7a407</id>
<content type='text'>
Use mddev-&gt;new_layout in setup_conf.
Also use new_chunk, and don't set -&gt;degraded in takeover().  That
gets set in run()

Signed-off-by: Maciej Trela &lt;maciej.trela@intel.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: fix handling of array level takeover that re-arranges devices.</title>
<updated>2010-06-24T03:33:24+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-06-15T08:36:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e93f68a1fc6244c05ad8fae28e75835ec74ab34e'/>
<id>urn:sha1:e93f68a1fc6244c05ad8fae28e75835ec74ab34e</id>
<content type='text'>
Most array level changes leave the list of devices largely unchanged,
possibly causing one at the end to become redundant.
However conversions between RAID0 and RAID10 need to renumber
all devices (except 0).

This renumbering is currently being done in the -&gt;run method when the
new personality takes over.  However this is too late as the common
code in md.c might already have invalidated some of the devices if
they had a -&gt;raid_disk number that appeared to high.

Moving it into the -&gt;takeover method is too early as the array is
still active at that time and wrong -&gt;raid_disk numbers could cause
confusion.

So add a -&gt;new_raid_disk field to mdk_rdev_s and use it to communicate
the new raid_disk number.
Now the common code knows exactly which devices need to be renumbered,
and which can be invalidated, and can do it all at a convenient time
when the array is suspend.
It can also update some symlinks in sysfs which previously were not be
updated correctly.

Reported-by: Maciej Trela &lt;maciej.trela@intel.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: raid10: Fix null pointer dereference in fix_read_error()</title>
<updated>2010-06-24T03:31:03+00:00</updated>
<author>
<name>Prasanna S. Panchamukhi</name>
<email>prasanna.panchamukhi@riverbed.com</email>
</author>
<published>2010-06-24T03:31:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0544a21db02c1d8883158fd6f323364f830a120a'/>
<id>urn:sha1:0544a21db02c1d8883158fd6f323364f830a120a</id>
<content type='text'>
Such NULL pointer dereference can occur when the driver was fixing the
read errors/bad blocks and the disk was physically removed
causing a system crash. This patch check if the
rcu_dereference() returns valid rdev before accessing it in fix_read_error().

Cc: stable@kernel.org
Signed-off-by: Prasanna S. Panchamukhi &lt;prasanna.panchamukhi@riverbed.com&gt;
Signed-off-by: Rob Becker &lt;rbecker@riverbed.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus</title>
<updated>2010-05-21T22:31:36+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-05-21T22:31:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19fdb9eefb21b72edbc365b838502780c392bad6'/>
<id>urn:sha1:19fdb9eefb21b72edbc365b838502780c392bad6</id>
<content type='text'>
Conflicts:
	drivers/md/md.c

- Resolved conflict in md_update_sb
- Added extra 'NULL' arg to new instance of sysfs_get_dirent.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Fix read balancing in RAID1 and RAID10 on drives &gt; 2TB</title>
<updated>2010-05-18T05:28:00+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-05-07T22:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af3a2cd6b8a479345786e7fe5e199ad2f6240e56'/>
<id>urn:sha1:af3a2cd6b8a479345786e7fe5e199ad2f6240e56</id>
<content type='text'>
read_balance uses a "unsigned long" for a sector number which
will get truncated beyond 2TB.
This will cause read-balancing to be non-optimal, and can cause
data to be read from the 'wrong' branch during a resync.  This has a
very small chance of returning wrong data.

Reported-by: Jordan Russell &lt;jr-list-2010@quo.to&gt;
Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid10: tidy up printk messages.</title>
<updated>2010-05-18T05:27:59+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-05-03T04:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=128595ed6ff2c7358ae253a560d47a0af463bc99'/>
<id>urn:sha1:128595ed6ff2c7358ae253a560d47a0af463bc99</id>
<content type='text'>
All raid10 printk messages now start
   md/raid10:md-device-name:

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: pass mddev to make_request functions rather than request_queue</title>
<updated>2010-05-18T05:27:55+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-04-01T04:02:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=21a52c6d05c15f862797736393915bfa8cd40ee9'/>
<id>urn:sha1:21a52c6d05c15f862797736393915bfa8cd40ee9</id>
<content type='text'>
We used to pass the personality make_request function direct
to the block layer so the first argument had to be a queue.
But now we have the intermediary md_make_request so it makes
at lot more sense to pass a struct mddev_s.
It makes it possible to have an mddev without its own queue too.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: move io accounting out of personalities into md_make_request</title>
<updated>2010-05-18T05:27:52+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-03-25T05:20:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=490773268cf64f68da2470e07b52c7944da6312d'/>
<id>urn:sha1:490773268cf64f68da2470e07b52c7944da6312d</id>
<content type='text'>
While I generally prefer letting personalities do as much as possible,
given that we have a central md_make_request anyway we may as well use
it to simplify code.
Also this centralises knowledge of -&gt;gendisk which will help later.

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