<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/md, branch v3.0</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-06-28T06:59:42Z</updated>
<entry>
<title>md: avoid endless recovery loop when waiting for fail device to complete.</title>
<updated>2011-06-28T06:59:42Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-06-28T06:59:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4274215d24633df7302069e51426659d4759c5ed'/>
<id>urn:sha1:4274215d24633df7302069e51426659d4759c5ed</id>
<content type='text'>
If a device fails in a way that causes pending request to take a while
to complete, md will not be able to immediately remove it from the
array in remove_and_add_spares.
It will then incorrectly look like a spare device and md will try to
recover it even though it is failed.
This leads to a recovery process starting and instantly aborting over
and over again.

We should check if the device is faulty before considering it to be a
spare.  This will avoid trying to start a recovery that cannot
proceed.

This bug was introduced in 2.6.26 so that patch is suitable for any
kernel since then.

Cc: stable@kernel.org
Reported-by: Jim Paradis &lt;james.paradis@stratus.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid5: remove unusual use of bio_iovec_idx()</title>
<updated>2011-06-14T04:23:57Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-14T04:23:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fcde90759a985d8bfa4391346a821cc12fc16207'/>
<id>urn:sha1:fcde90759a985d8bfa4391346a821cc12fc16207</id>
<content type='text'>
In the bio_for_each_segment loop, bvl always points current
bio_vec, so the same as bio_iovec_idx(, i). Let's get rid of
it.

Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid5: fix FUA request handling in ops_run_io()</title>
<updated>2011-06-14T04:20:19Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-14T04:20:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b062962edb086011e94ec4d9eb3f6a6d814f2a8f'/>
<id>urn:sha1:b062962edb086011e94ec4d9eb3f6a6d814f2a8f</id>
<content type='text'>
Commit e9c7469bb4f5 ("md: implment REQ_FLUSH/FUA support")
introduced R5_WantFUA flag and set rw to WRITE_FUA in that case.
However remaining code still checks whether rw is exactly same
as WRITE or not, so FUAed-write ends up with being treated as
READ. Fix it.

This bug has been present since 2.6.37 and the fix is suitable for any
-stable kernel since then.  It is not clear why this has not caused
more problems.

Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: stable@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid5: fix raid5_set_bi_hw_segments</title>
<updated>2011-06-14T04:09:41Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-13T05:48:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9b2dc8b665932a8e681a7ab3237f60475e75e161'/>
<id>urn:sha1:9b2dc8b665932a8e681a7ab3237f60475e75e161</id>
<content type='text'>
The @bio-&gt;bi_phys_segments consists of active stripes count in the
lower 16 bits and processed stripes count in the upper 16 bits. So
logical-OR operator should be bitwise one.

This bug has been present since 2.6.27 and the fix is suitable for any
-stable kernel since then.  Fortunately the bad code is only used on
error paths and is relatively unlikely to be hit.

Cc: stable@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: remove unused fields from struct bitmap</title>
<updated>2011-06-09T01:43:01Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-09T01:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=97b3d4aacfbd7186faf34597fcf1f55b8579be17'/>
<id>urn:sha1:97b3d4aacfbd7186faf34597fcf1f55b8579be17</id>
<content type='text'>
Get rid of -&gt;syncchunk and -&gt;counter_bits since they're never used.

Also discard COUNTER_BYTE_RATIO which is unused.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/bitmap: use proper accessor macro</title>
<updated>2011-06-09T01:42:57Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-09T01:42:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=27d5ea04d08bea37bf651090e5f3c573d2390df8'/>
<id>urn:sha1:27d5ea04d08bea37bf651090e5f3c573d2390df8</id>
<content type='text'>
Use COUNTER()/NEEDED() macro instead of open-coding them.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: check -&gt;hot_remove_disk when removing disk</title>
<updated>2011-06-09T01:42:54Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-09T01:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01393f3d5836b7d62e925e6f4658a7eb22b83a11'/>
<id>urn:sha1:01393f3d5836b7d62e925e6f4658a7eb22b83a11</id>
<content type='text'>
Check pers-&gt;hot_remove_disk instead of pers-&gt;hot_add_disk in slot_store()
during disk removal. The linear personality only has -&gt;hot_add_disk and
no -&gt;hot_remove_disk, so that removing disk in the array resulted to
following kernel bug:

$ sudo mdadm --create /dev/md0 --level=linear --raid-devices=4 /dev/loop[0-3]
$ echo none | sudo tee /sys/block/md0/md/dev-loop2/slot
 BUG: unable to handle kernel NULL pointer dereference at           (null)
 IP: [&lt;          (null)&gt;]           (null)
 PGD c9f5d067 PUD 8575a067 PMD 0
 Oops: 0010 [#1] SMP
 CPU 2
 Modules linked in: linear loop bridge stp llc kvm_intel kvm asus_atk0110 sr_mod cdrom sg

 Pid: 10450, comm: tee Not tainted 3.0.0-rc1-leonard+ #173 System manufacturer System Product Name/P5G41TD-M PRO
 RIP: 0010:[&lt;0000000000000000&gt;]  [&lt;          (null)&gt;]           (null)
 RSP: 0018:ffff880085757df0  EFLAGS: 00010282
 RAX: ffffffffa00168e0 RBX: ffff8800d1431800 RCX: 000000000000006e
 RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffff88008543c000
 RBP: ffff880085757e48 R08: 0000000000000002 R09: 000000000000000a
 R10: 0000000000000000 R11: ffff88008543c2e0 R12: 00000000ffffffff
 R13: ffff8800b4641000 R14: 0000000000000005 R15: 0000000000000000
 FS:  00007fe8c9e05700(0000) GS:ffff88011fa00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000000 CR3: 00000000b4502000 CR4: 00000000000406e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 Process tee (pid: 10450, threadinfo ffff880085756000, task ffff8800c9f08000)
 Stack:
  ffffffff8138496a ffff8800b4641000 ffff88008543c268 0000000000000000
  ffff8800b4641000 ffff88008543c000 ffff8800d1431868 ffffffff81a78a90
  ffff8800b4641000 ffff88008543c000 ffff8800d1431800 ffff880085757e98
 Call Trace:
  [&lt;ffffffff8138496a&gt;] ? slot_store+0xaa/0x265
  [&lt;ffffffff81384bae&gt;] rdev_attr_store+0x89/0xa8
  [&lt;ffffffff8115a96a&gt;] sysfs_write_file+0x108/0x144
  [&lt;ffffffff81106b87&gt;] vfs_write+0xb1/0x10d
  [&lt;ffffffff8106e6c0&gt;] ? trace_hardirqs_on_caller+0x111/0x135
  [&lt;ffffffff81106cac&gt;] sys_write+0x4d/0x77
  [&lt;ffffffff814fe702&gt;] system_call_fastpath+0x16/0x1b
 Code:  Bad RIP value.
 RIP  [&lt;          (null)&gt;]           (null)
  RSP &lt;ffff880085757df0&gt;
 CR2: 0000000000000000
 ---[ end trace ba5fc64319a826fb ]---

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Using poll  /proc/mdstat can monitor the events of adding a spare disks</title>
<updated>2011-06-09T01:42:48Z</updated>
<author>
<name>马建朋</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2011-06-09T01:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9864c0053d3da4c5731ac8a6c4835179310bd40a'/>
<id>urn:sha1:9864c0053d3da4c5731ac8a6c4835179310bd40a</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: use is_power_of_2 macro</title>
<updated>2011-06-09T01:42:36Z</updated>
<author>
<name>Jonathan Brassow</name>
<email>jbrassow@redhat.com</email>
</author>
<published>2011-06-08T23:01:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d744540cd39e93976c4c8401e140232444ef3b0b'/>
<id>urn:sha1:d744540cd39e93976c4c8401e140232444ef3b0b</id>
<content type='text'>
Make use of is_power_of_2 macro.

Signed-off-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>MD: raid5 do not set fullsync</title>
<updated>2011-06-09T01:42:29Z</updated>
<author>
<name>Jonathan Brassow</name>
<email>jbrassow@redhat.com</email>
</author>
<published>2011-06-08T23:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6b212f4b19da5301e6b6eca562e5c7a2a6e8c8d'/>
<id>urn:sha1:d6b212f4b19da5301e6b6eca562e5c7a2a6e8c8d</id>
<content type='text'>
Add check to determine if a device needs full resync or if partial resync will do

RAID 5 was assuming that if a device was not In_sync, it must undergo a full
resync.  We add a check to see if 'saved_raid_disk' is the same as 'raid_disk'.
If it is, we can safely skip the full resync and rely on the bitmap for
partial recovery instead.  This is the legitimate purpose of 'saved_raid_disk',
from md.h:
int saved_raid_disk;            /* role that device used to have in the
                                 * array and could again if we did a partial
                                 * resync from the bitmap
                                 */

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