<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v2.6.16.50</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md?h=v2.6.16.50</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md?h=v2.6.16.50'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2007-03-26T21:43:10Z</updated>
<entry>
<title>md: fix /proc/mdstat refcounting</title>
<updated>2007-03-26T21:43:10Z</updated>
<author>
<name>Akinbou Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2007-03-26T21:43:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=25c72f37099c2f32e8e6c7311735e7a3a036b178'/>
<id>urn:sha1:25c72f37099c2f32e8e6c7311735e7a3a036b178</id>
<content type='text'>
I have seen mdadm oops after successfully unloading md module.

This patch privents from unloading md module while
mdadm is polling /proc/mdstat.

Signed-off-by: Akinbou Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>fix read past end of array in md/linear.c</title>
<updated>2007-03-26T21:42:40Z</updated>
<author>
<name>Andy Isaacson</name>
<email>adi@hexapodia.org</email>
</author>
<published>2007-03-26T21:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36c8a3d3ac8b0157ea4ebc54926d40309787a865'/>
<id>urn:sha1:36c8a3d3ac8b0157ea4ebc54926d40309787a865</id>
<content type='text'>
When iterating through an array, one must be careful to test one's index
variable rather than another similarly-named variable.

The loop will read off the end of conf-&gt;disks[] in the following
(pathological) case:

% dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1
% for i in 2 3 4; do dd if=/dev/zero of=d$i bs=1k count=$(($i+150)); done
% ./vmlinux ubd0=root ubd1=d1 ubd2=d2 ubd3=d3 ubd4=d4
# mdadm -C /dev/md0 --level=linear --raid-devices=4 /dev/ubd[1234]

adding some printks, I saw this:
[42949374.960000] hash_spacing = 821120
[42949374.960000] cnt          = 4
[42949374.960000] min_spacing  = 801
[42949374.960000] j=0 size=820928 sz=820928
[42949374.960000] i=0 sz=820928 hash_spacing=820928
[42949374.960000] j=1 size=64 sz=64
[42949374.960000] j=2 size=64 sz=128
[42949374.960000] j=3 size=64 sz=192
[42949374.960000] j=4 size=1515870810 sz=1515871002

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>md: pass down BIO_RW_SYNC in raid{1,10}</title>
<updated>2007-03-26T21:41:58Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars@linbit.com</email>
</author>
<published>2007-03-26T21:41:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b9720b5aca01aba1fb9403f1b75bb26689223a1'/>
<id>urn:sha1:6b9720b5aca01aba1fb9403f1b75bb26689223a1</id>
<content type='text'>
md raidX make_request functions strip off the BIO_RW_SYNC flag, thus
introducing additional latency.

Fixing this in raid1 and raid10 seems to be straightforward enough.

For our particular usage case in DRBD, passing this flag improved some
initialization time from ~5 minutes to ~5 seconds.

Signed-off-by: Lars Ellenberg &lt;lars@linbit.com&gt;
Acked-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>md: Fix bug where spares don't always get rebuilt properly when they become live</title>
<updated>2007-03-26T21:41:22Z</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2007-03-26T21:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c920d11e0b9a2c894b99cf9a95cbd83f53c533eb'/>
<id>urn:sha1:c920d11e0b9a2c894b99cf9a95cbd83f53c533eb</id>
<content type='text'>
If save_raid_disk is &gt;= 0, then the device could be a device that is
already in sync that is being re-added.  So we need to default this
value to -1.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>MD: Fix problem where hot-added drives are not resynced.</title>
<updated>2007-03-26T21:40:42Z</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2007-03-26T21:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d03e0c61f63e3c12a5b33403c895285f4e345c35'/>
<id>urn:sha1:d03e0c61f63e3c12a5b33403c895285f4e345c35</id>
<content type='text'>
If a drive is added with HOT_ADD_DISK rather than ADD_NEW_DISK,
saved_raid_disk isn't initialised properly, and the drive can be
included in the array without a resync.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>Make 'repair' actually work for raid1.</title>
<updated>2007-02-03T00:56:23Z</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2007-01-30T23:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=346c9b5d4fde30eae1cbcdb4bc62f9e1d0ddfd13'/>
<id>urn:sha1:346c9b5d4fde30eae1cbcdb4bc62f9e1d0ddfd13</id>
<content type='text'>
When 'repair' finds a block that is different one the various
parts of the mirror. it is meant to write a chosen good version
to the others.  However it currently writes out the original data
to each. The memcpy to make all the data the same is missing.

Also correct a test so that 'repair' causes a repair, rather than
anything other then 'repair'.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>md: Fix md grow/size code to correctly find the maximum available space</title>
<updated>2006-12-15T00:48:58Z</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-12-15T00:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=75ba82c65d55099a0af5aba1075f8bdcaf566b56'/>
<id>urn:sha1:75ba82c65d55099a0af5aba1075f8bdcaf566b56</id>
<content type='text'>
An md array can be asked to change the amount of each device that it is using,
and in particular can be asked to use the maximum available space.  This
currently only works if the first device is not larger than the rest.  As
'size' gets changed and so 'fit' becomes wrong.  So check if a 'fit' is
required early and don't corrupt it.

Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>dm crypt: Fix data corruption with dm-crypt over RAID5</title>
<updated>2006-12-15T00:21:59Z</updated>
<author>
<name>Christophe Saout</name>
<email>christophe@saout.de</email>
</author>
<published>2006-12-15T00:21:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a26b7719f9bde7e74385bfa6ca3ea89d365efd77'/>
<id>urn:sha1:a26b7719f9bde7e74385bfa6ca3ea89d365efd77</id>
<content type='text'>
Fix corruption issue with dm-crypt on top of software raid5. Cancelled
readahead bio's that report no error, just have BIO_UPTODATE cleared
were reported as successful reads to the higher layers (and leaving
random content in the buffer cache). Already fixed in 2.6.19.

Signed-off-by: Christophe Saout &lt;christophe@saout.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>dm snapshot: fix metadata writing when suspending</title>
<updated>2006-12-14T22:09:07Z</updated>
<author>
<name>Mark McLoughlin</name>
<email>markmc@redhat.com</email>
</author>
<published>2006-12-14T22:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=87b79ceffcfe322c55657051a948eb228e2c9a4d'/>
<id>urn:sha1:87b79ceffcfe322c55657051a948eb228e2c9a4d</id>
<content type='text'>
When suspending a device-mapper device, dm_suspend() sleeps until all
necessary I/O is completed.  This state is triggered by a callback from
persistent_commit().  But some I/O can still be issued *after* the callback
(to prepare the next metadata area for use if the current one is full).  This
patch delays the callback until after that I/O is complete.

Signed-off-by: Mark McLoughlin &lt;markmc@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>dm: Fix deadlock under high i/o load in raid1 setup.</title>
<updated>2006-12-14T22:08:32Z</updated>
<author>
<name>Daniel Kobras</name>
<email>kobras@linux.de</email>
</author>
<published>2006-12-14T22:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=970d548af4b9b95b416c31607bbcc844984a1af4'/>
<id>urn:sha1:970d548af4b9b95b416c31607bbcc844984a1af4</id>
<content type='text'>
On an nForce4-equipped machine with two SATA disk in raid1 setup using dmraid,
we experienced frequent deadlock of the system under high i/o load.  'cat
/dev/zero &gt; ~/zero' was the most reliable way to reproduce them: Randomly
after a few GB, 'cp' would be left in 'D' state along with kjournald and
kmirrord.  The functions cp and kjournald were blocked in did vary, but
kmirrord's wchan always pointed to 'mempool_alloc()'.  We've seen this pattern
on 2.6.15 and 2.6.17 kernels.  http://lkml.org/lkml/2005/4/20/142 indicates
that this problem has been around even before.

So much for the facts, here's my interpretation: mempool_alloc() first tries
to atomically allocate the requested memory, or falls back to hand out
preallocated chunks from the mempool.  If both fail, it puts the calling
process (kmirrord in this case) on a private waitqueue until somebody refills
the pool.  Where the only 'somebody' is kmirrord itself, so we have a
deadlock.

I worked around this problem by falling back to a (blocking) kmalloc when
before kmirrord would have ended up on the waitqueue.  This defeats part of
the benefits of using the mempool, but at least keeps the system running.  And
it could be done with a two-line change.  Note that mempool_alloc() clears the
GFP_NOIO flag internally, and only uses it to decide whether to wait or return
an error if immediate allocation fails, so the attached patch doesn't change
behaviour in the non-deadlocking case.  Path is against current git
(2.6.18-rc4), but should apply to earlier versions as well.  I've tested on
2.6.15, where this patch makes the difference between random lockup and a
stable system.

Signed-off-by: Daniel Kobras &lt;kobras@linux.de&gt;
Acked-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
</feed>
