<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v2.6.28</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.28</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.28'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-12-19T05:25:01Z</updated>
<entry>
<title>md: Don't read past end of bitmap when reading bitmap.</title>
<updated>2008-12-19T05:25:01Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-12-19T05:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2ed9615e3222645007fc19991aedf30eed3ecfd'/>
<id>urn:sha1:a2ed9615e3222645007fc19991aedf30eed3ecfd</id>
<content type='text'>
When we read the write-intent-bitmap off the device, we currently
read a whole number of pages.
When PAGE_SIZE is 4K, this works due to the alignment we enforce
on the superblock and bitmap.
When PAGE_SIZE is 64K, this case read past the end-of-device
which causes an error.

When we write the superblock, we ensure to clip the last page
to just be the required size.  Copy that code into the read path
to just read the required number of sectors.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>block: fix setting of max_segment_size and seg_boundary mask</title>
<updated>2008-12-03T11:55:55Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2008-12-03T11:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e435ac26e3f951d83338ed3d4ab7dc0fe0055bc'/>
<id>urn:sha1:0e435ac26e3f951d83338ed3d4ab7dc0fe0055bc</id>
<content type='text'>
Fix setting of max_segment_size and seg_boundary mask for stacked md/dm
devices.

When stacking devices (LVM over MD over SCSI) some of the request queue
parameters are not set up correctly in some cases by default, namely
max_segment_size and and seg_boundary mask.

If you create MD device over SCSI, these attributes are zeroed.

Problem become when there is over this mapping next device-mapper mapping
- queue attributes are set in DM this way:

request_queue   max_segment_size  seg_boundary_mask
SCSI                65536             0xffffffff
MD RAID1                0                      0
LVM                 65536                 -1 (64bit)

Unfortunately bio_add_page (resp.  bio_phys_segments) calculates number of
physical segments according to these parameters.

During the generic_make_request() is segment cout recalculated and can
increase bio-&gt;bi_phys_segments count over the allowed limit.  (After
bio_clone() in stack operation.)

Thi is specially problem in CCISS driver, where it produce OOPS here

    BUG_ON(creq-&gt;nr_phys_segments &gt; MAXSGENTRIES);

(MAXSEGENTRIES is 31 by default.)

Sometimes even this command is enough to cause oops:

  dd iflag=direct if=/dev/&lt;vg&gt;/&lt;lv&gt; of=/dev/null bs=128000 count=10

This command generates bios with 250 sectors, allocated in 32 4k-pages
(last page uses only 1024 bytes).

For LVM layer, it allocates bio with 31 segments (still OK for CCISS),
unfortunatelly on lower layer it is recalculated to 32 segments and this
violates CCISS restriction and triggers BUG_ON().

The patch tries to fix it by:

 * initializing attributes above in queue request constructor
   blk_queue_make_request()

 * make sure that blk_queue_stack_limits() inherits setting

 (DM uses its own function to set the limits because it
 blk_queue_stack_limits() was introduced later.  It should probably switch
 to use generic stack limit function too.)

 * sets the default seg_boundary value in one place (blkdev.h)

 * use this mask as default in DM (instead of -1, which differs in 64bit)

Bugs related to this:
https://bugzilla.redhat.com/show_bug.cgi?id=471639
http://bugzilla.kernel.org/show_bug.cgi?id=8672

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Reviewed-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Tejun Heo &lt;htejun@gmail.com&gt;
Cc: Mike Miller &lt;mike.miller@hp.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>dm: avoid destroying table in dm_any_congested</title>
<updated>2008-11-13T23:39:14Z</updated>
<author>
<name>Chandra Seetharaman</name>
<email>sekharan@us.ibm.com</email>
</author>
<published>2008-11-13T23:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a57dfc6f943c92b861c9a19b0c86ddcb2aba768'/>
<id>urn:sha1:8a57dfc6f943c92b861c9a19b0c86ddcb2aba768</id>
<content type='text'>
dm_any_congested() just checks for the DMF_BLOCK_IO and has no
code to make sure that suspend waits for dm_any_congested() to
complete.  This patch adds such a check.

Without it, a race can occur with dm_table_put() attempting to
destroying the table in the wrong thread, the one running
dm_any_congested() which is meant to be quick and return
immediately.

Two examples of problems:
1. Sleeping functions called from congested code, the caller
   of which holds a spin lock.
2. An ABBA deadlock between pdflush and multipathd. The two locks
   in contention are inode lock and kernel lock.

Signed-off-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: move pending queue wake_up end_io_acct</title>
<updated>2008-11-13T23:39:10Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2008-11-13T23:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d221d2e77696e70e94b13989ea15db2ba5b34f8e'/>
<id>urn:sha1:d221d2e77696e70e94b13989ea15db2ba5b34f8e</id>
<content type='text'>
This doesn't fix any bug, just moves wake_up immediately after decrementing
md-&gt;pending, for better code readability.

It must be clear to anyone manipulating md-&gt;pending to wake up
the queue if md-&gt;pending reaches zero, so move the wakeup as close to
the decrementing as possible.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm mpath: warn if args ignored</title>
<updated>2008-11-13T23:39:06Z</updated>
<author>
<name>Chandra Seetharaman</name>
<email>sekharan@us.ibm.com</email>
</author>
<published>2008-11-13T23:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14e98c5ca8bed825f65cbf11cb0ffd2c09dac2f4'/>
<id>urn:sha1:14e98c5ca8bed825f65cbf11cb0ffd2c09dac2f4</id>
<content type='text'>
Currently dm ignores the parameters provided to hardware handlers
without providing any notifications to the user.

This patch just prints a warning message so that the user knows that
the arguments are ignored.

Signed-off-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm mpath: avoid attempting to activate null path</title>
<updated>2008-11-13T23:39:00Z</updated>
<author>
<name>Chandra Seetharaman</name>
<email>sekharan@us.ibm.com</email>
</author>
<published>2008-11-13T23:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b81aa1c79201cb424114fd198607951900babe18'/>
<id>urn:sha1:b81aa1c79201cb424114fd198607951900babe18</id>
<content type='text'>
Path activation code is called even when the pgpath is NULL. This could
lead to a panic in activate_path(). Such a panic is seen in -rt kernel.

This problem has been there before the pg_init() was moved to a
workqueue.

Signed-off-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm stripe: fix init failure</title>
<updated>2008-11-13T23:38:56Z</updated>
<author>
<name>Heinz Mauelshagen</name>
<email>heinzm@redhat.com</email>
</author>
<published>2008-11-13T23:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6edebdee48729ab4ba564bbfcb8dbf6a6cd68a39'/>
<id>urn:sha1:6edebdee48729ab4ba564bbfcb8dbf6a6cd68a39</id>
<content type='text'>
Don't proceed if dm_stripe_init() fails to register itself as a dm target.

Signed-off-by: Heinz Mauelshagen &lt;heinzm@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm raid1: flush workqueue before destruction</title>
<updated>2008-11-13T23:38:52Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2008-11-13T23:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18776c7316545482a02bfaa2629a2aa1afc48357'/>
<id>urn:sha1:18776c7316545482a02bfaa2629a2aa1afc48357</id>
<content type='text'>
We queue work on keventd queue --- so this queue must be flushed in the
destructor. Otherwise, keventd could access mirror_set after it was freed.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>md: linear: Fix a division by zero bug for very small arrays.</title>
<updated>2008-11-06T08:41:24Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-11-06T08:41:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1cd14ae52985634d0389e934eba25b5ecf24565'/>
<id>urn:sha1:f1cd14ae52985634d0389e934eba25b5ecf24565</id>
<content type='text'>
We currently oops with a divide error on starting a linear software
raid array consisting of at least two very small (&lt; 500K) devices.

The bug is caused by the calculation of the hash table size which
tries to compute sector_div(sz, base) with "base" being zero due to
the small size of the component devices of the array.

Fix this by requiring the hash spacing to be at least one which
implies that also "base" is non-zero.

This bug has existed since about 2.6.14.

Cc: stable@kernel.org
Signed-off-by: Andre Noll &lt;maan@systemlinux.org&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: fix bug in raid10 recovery.</title>
<updated>2008-11-06T06:28:20Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-11-06T06:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a53a6c85756339f82ff19e001e90cfba2d6299a8'/>
<id>urn:sha1:a53a6c85756339f82ff19e001e90cfba2d6299a8</id>
<content type='text'>
Adding a spare to a raid10 doesn't cause recovery to start.
This is due to an silly type in
  commit 6c2fce2ef6b4821c21b5c42c7207cb9cf8c87eda
and so is a bug in 2.6.27 and .28-rc.

Thanks to Thomas Backlund for bisecting to find this.

Cc: Thomas Backlund &lt;tmb@mandriva.org&gt;
Cc: stable@kernel.org

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