<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v2.6.37</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.37</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.37'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-12-20T17:19:46Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block</title>
<updated>2010-12-20T17:19:46Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-12-20T17:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f8635cc9e66a26d7280ba680b044fa2f65104af'/>
<id>urn:sha1:7f8635cc9e66a26d7280ba680b044fa2f65104af</id>
<content type='text'>
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  cciss: fix cciss_revalidate panic
  block: max hardware sectors limit wrapper
  block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits instead
  blk-throttle: Correct the placement of smp_rmb()
  blk-throttle: Trim/adjust slice_end once a bio has been dispatched
  block: check for proper length of iov entries earlier in blk_rq_map_user_iov()
  drbd: fix for spin_lock_irqsave in endio callback
  drbd: don't recvmsg with zero length
</content>
</entry>
<entry>
<title>block: max hardware sectors limit wrapper</title>
<updated>2010-12-17T07:36:01Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2010-12-17T07:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=72d4cd9f38b5ed96b75df4c622be25e1c2648dd3'/>
<id>urn:sha1:72d4cd9f38b5ed96b75df4c622be25e1c2648dd3</id>
<content type='text'>
Implement blk_limits_max_hw_sectors() and make
blk_queue_max_hw_sectors() a wrapper around it.

DM needs this to avoid setting queue_limits' max_hw_sectors and
max_sectors directly.  dm_set_device_limits() now leverages
blk_limits_max_hw_sectors() logic to establish the appropriate
max_hw_sectors minimum (PAGE_SIZE).  Fixes issue where DM was
incorrectly setting max_sectors rather than max_hw_sectors (which
caused dm_merge_bvec()'s max_hw_sectors check to be ineffective).

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@kernel.org
Acked-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits instead</title>
<updated>2010-12-17T07:35:53Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2010-12-01T18:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e692cb668fdd5a712c6ed2a2d6f2a36ee83997b4'/>
<id>urn:sha1:e692cb668fdd5a712c6ed2a2d6f2a36ee83997b4</id>
<content type='text'>
When stacking devices, a request_queue is not always available. This
forced us to have a no_cluster flag in the queue_limits that could be
used as a carrier until the request_queue had been set up for a
metadevice.

There were several problems with that approach. First of all it was up
to the stacking device to remember to set queue flag after stacking had
completed. Also, the queue flag and the queue limits had to be kept in
sync at all times. We got that wrong, which could lead to us issuing
commands that went beyond the max scatterlist limit set by the driver.

The proper fix is to avoid having two flags for tracking the same thing.
We deprecate QUEUE_FLAG_CLUSTER and use the queue limit directly in the
block layer merging functions. The queue_limit 'no_cluster' is turned
into 'cluster' to avoid double negatives and to ease stacking.
Clustering defaults to being enabled as before. The queue flag logic is
removed from the stacking function, and explicitly setting the cluster
flag is no longer necessary in DM and MD.

Reported-by: Ed Lin &lt;ed.lin@promise.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>md: protect against NULL reference when waiting to start a raid10.</title>
<updated>2010-12-09T06:02:14Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-12-09T06:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=589a594be1fb8815b3f18e517be696c48664f728'/>
<id>urn:sha1:589a594be1fb8815b3f18e517be696c48664f728</id>
<content type='text'>
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.

Cc: stable@kernel.org
Reported-by: "Citizen" &lt;citizen_lee@thecus.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: fix bug with re-adding of partially recovered device.</title>
<updated>2010-12-09T05:36:28Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-12-09T05:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a855a0606653d2d82506281e2c686bacb4b2f45'/>
<id>urn:sha1:1a855a0606653d2d82506281e2c686bacb4b2f45</id>
<content type='text'>
With v0.90 metadata, a hot-spare does not become a full member of the
array until recovery is complete.  So if we re-add such a device to
the array, we know that all of it is as up-to-date as the event count
would suggest, and so it a bitmap-based recovery is possible.

However with v1.x metadata, the hot-spare immediately becomes a full
member of the array, but it record how much of the device has been
recovered.  If the array is stopped and re-assembled recovery starts
from this point.

When such a device is hot-added to an array we currently lose the 'how
much is recovered' information and incorrectly included it as a full
in-sync member (after bitmap-based fixup).
This is wrong and unsafe and could corrupt data.

So be more careful about setting saved_raid_disk - which is what
guides the re-adding of devices back into an array.
The new code matches the code in slot_store which does a similar
thing, which is encouraging.

This is suitable for any -stable kernel.

Reported-by: "Dailey, Nate" &lt;Nate.Dailey@stratus.com&gt;
Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: fix possible deadlock in handling flush requests.</title>
<updated>2010-12-09T05:17:51Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-12-09T05:17:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a035fc3e2531703b539f23bec4ca7943cfc69349'/>
<id>urn:sha1:a035fc3e2531703b539f23bec4ca7943cfc69349</id>
<content type='text'>
As recorded in
    https://bugzilla.kernel.org/show_bug.cgi?id=24012

it is possible for a flush request through md to hang.  This is due to
an interaction between the recursion avoidance in
generic_make_request, the insistence in md of only having one flush
active at a time, and the possibility of dm (or md) submitting two
flush requests to a device from the one generic_make_request.

If a generic_make_request call into dm causes two flush requests to be
queued (as happens if the dm table has two targets - they get one
each), these two will be queued inside generic_make_request.

Assume they are for the same md device.
The first is processed and causes 1 or more flush requests to be sent
to lower devices.  These get queued within generic_make_request too.
Then the second flush to the md device gets handled and it blocks
waiting for the first flush to complete.  But it won't complete until
the two lower-device requests complete, and they haven't even been
submitted yet as they are on the generic_make_request queue.

The deadlock can be broken by using a separate thread to submit the
requests to lower devices.  md has such a thread readily available:
md_wq.

So use it to submit these requests.

Reported-by: Giacomo Catenazzi &lt;cate@cateee.net&gt;
Tested-by: Giacomo Catenazzi &lt;cate@cateee.net&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: move code in to submit_flushes.</title>
<updated>2010-12-09T05:04:25Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-12-09T05:04:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7a07e69653acf8540daa1da053cd84bf86e8e66'/>
<id>urn:sha1:a7a07e69653acf8540daa1da053cd84bf86e8e66</id>
<content type='text'>
submit_flushes is called from exactly one place.
Move the code that is before and after that call into
submit_flushes.

This has not functional change, but will make the next patch
smaller and easier to follow.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: remove handling of flush_pending in md_submit_flush_data</title>
<updated>2010-12-09T04:59:01Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-12-09T04:59:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b74e12e567feb4163e32815bce0be57489e73b9'/>
<id>urn:sha1:2b74e12e567feb4163e32815bce0be57489e73b9</id>
<content type='text'>
None of the functions called between setting flush_pending to 1, and
atomic_dec_and_test can change flush_pending, or will anything
running in any other thread (as -&gt;flush_bio is not NULL).  So the
atomic_dec_and_test will always succeed.
So remove the atomic_sec and the atomic_dec_and_test.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Call blk_queue_flush() to establish flush/fua support</title>
<updated>2010-11-24T05:40:33Z</updated>
<author>
<name>Darrick J. Wong</name>
<email>djwong@us.ibm.com</email>
</author>
<published>2010-11-24T05:40:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be20e6c67b6c6024c19094d3447f144d118733b0'/>
<id>urn:sha1:be20e6c67b6c6024c19094d3447f144d118733b0</id>
<content type='text'>
Before 2.6.37, the md layer had a mechanism for catching I/Os with the
barrier flag set, and translating the barrier into barriers for all
the underlying devices.  With 2.6.37, I/O barriers have become plain
old flushes, and the md code was updated to reflect this.  However,
one piece was left out -- the md layer does not tell the block layer
that it supports flushes or FUA access at all, which results in md
silently dropping flush requests.

Since the support already seems there, just add this one piece of
bookkeeping.

Signed-off-by: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: really fix recovery looping when single good device fails.</title>
<updated>2010-11-24T05:39:46Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-11-24T05:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>
</feed>
