<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md?h=v3.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-16T19:56:51Z</updated>
<entry>
<title>dm cache: avoid conflicting remove_mapping() in mq policy</title>
<updated>2013-08-16T19:56:51Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2013-07-26T07:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b936bf8b785f0fbe083d203049e4da1c56ec788f'/>
<id>urn:sha1:b936bf8b785f0fbe083d203049e4da1c56ec788f</id>
<content type='text'>
On sparc32, which includes &lt;linux/swap.h&gt; from &lt;asm/pgtable_32.h&gt;:

drivers/md/dm-cache-policy-mq.c:962:13: error: conflicting types for 'remove_mapping'
include/linux/swap.h:285:12: note: previous declaration of 'remove_mapping' was here

As mq_remove_mapping() already exists, and the local remove_mapping() is
used only once, inline it manually to avoid the conflict.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair Kergon &lt;agk@redhat.com&gt;
Acked-by: Joe Thornber &lt;ejt@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'md/3.11-fixes' of git://neil.brown.name/md</title>
<updated>2013-07-26T18:20:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-07-26T18:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c271f5bc9a7a03fab037dbf5bdd5a730a6e26211'/>
<id>urn:sha1:c271f5bc9a7a03fab037dbf5bdd5a730a6e26211</id>
<content type='text'>
Pull md fixes from Neil Brown:
 "Two more bugfixes for md in 3.11

  Both marked for -stable, both since 3.3.  I guess I should spend more
  time testing..."

* tag 'md/3.11-fixes' of git://neil.brown.name/md:
  md/raid5: fix interaction of 'replace' and 'recovery'.
  md/raid10: remove use-after-free bug.
</content>
</entry>
<entry>
<title>md/raid5: fix interaction of 'replace' and 'recovery'.</title>
<updated>2013-07-25T06:46:57Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-07-22T02:57:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f94c0b6658c7edea8bc19d13be321e3860a3fa54'/>
<id>urn:sha1:f94c0b6658c7edea8bc19d13be321e3860a3fa54</id>
<content type='text'>
If a device in a RAID4/5/6 is being replaced while another is being
recovered, then the writes to the replacement device currently don't
happen, resulting in corruption when the replacement completes and the
new drive takes over.

This is because the replacement writes are only triggered when
's.replacing' is set and not when the similar 's.sync' is set (which
is the case during resync and recovery - it means all devices need to
be read).

So schedule those writes when s.replacing is set as well.

In this case we cannot use "STRIPE_INSYNC" to record that the
replacement has happened as that is needed for recording that any
parity calculation is complete.  So introduce STRIPE_REPLACED to
record if the replacement has happened.

For safety we should also check that STRIPE_COMPUTE_RUN is not set.
This has a similar effect to the "s.locked == 0" test.  The latter
ensure that now IO has been flagged but not started.  The former
checks if any parity calculation has been flagged by not started.
We must wait for both of these to complete before triggering the
'replace'.

Add a similar test to the subsequent check for "are we finished yet".
This possibly isn't needed (is subsumed in the STRIPE_INSYNC test),
but it makes it more obvious that the REPLACE will happen before we
think we are finished.

Finally if a NeedReplace device is not UPTODATE then that is an
error.  We really must trigger a warning.

This bug was introduced in commit 9a3e1101b827a59ac9036a672f5fa8d5279d0fe2
(md/raid5:  detect and handle replacements during recovery.)
which introduced replacement for raid5.
That was in 3.3-rc3, so any stable kernel since then would benefit
from this fix.

Cc: stable@vger.kernel.org (3.3+)
Reported-by: qindehua &lt;13691222965@163.com&gt;
Tested-by: qindehua &lt;qindehua@163.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid10: remove use-after-free bug.</title>
<updated>2013-07-25T06:46:53Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-07-24T05:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0eb25bb027a100f5a9df8991f2f628e7d851bc1e'/>
<id>urn:sha1:0eb25bb027a100f5a9df8991f2f628e7d851bc1e</id>
<content type='text'>
We always need to be careful when calling generic_make_request, as it
can start a chain of events which might free something that we are
using.

Here is one place I wasn't careful enough.  If the wbio2 is not in
use, then it might get freed at the first generic_make_request call.
So perform all necessary tests first.

This bug was introduced in 3.3-rc3 (24afd80d99) and can cause an
oops, so fix is suitable for any -stable since then.

Cc: stable@vger.kernel.org (3.3+)
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-3.11/drivers' of git://git.kernel.dk/linux-block</title>
<updated>2013-07-23T02:02:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-07-23T02:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4c90b1b9fe907da0d310008e5a769b591a14399'/>
<id>urn:sha1:d4c90b1b9fe907da0d310008e5a769b591a14399</id>
<content type='text'>
Pull block IO driver bits from Jens Axboe:
 "As I mentioned in the core block pull request, due to real life
  circumstances the driver pull request would be late.  Now it looks
  like -rc2 late...  On the plus side, apart form the rsxx update, these
  are all things that I could argue could go in later in the cycle as
  they are fixes and not features.  So even though things are late, it's
  not ALL bad.

  The pull request contains:

   - Updates to bcache, all bug fixes, from Kent.

   - A pile of drbd bug fixes (no big features this time!).

   - xen blk front/back fixes.

   - rsxx driver updates, some of them deferred form 3.10.  So should be
     well cooked by now"

* 'for-3.11/drivers' of git://git.kernel.dk/linux-block: (63 commits)
  bcache: Allocation kthread fixes
  bcache: Fix GC_SECTORS_USED() calculation
  bcache: Journal replay fix
  bcache: Shutdown fix
  bcache: Fix a sysfs splat on shutdown
  bcache: Advertise that flushes are supported
  bcache: check for allocation failures
  bcache: Fix a dumb race
  bcache: Use standard utility code
  bcache: Update email address
  bcache: Delete fuzz tester
  bcache: Document shrinker reserve better
  bcache: FUA fixes
  drbd: Allow online change of al-stripes and al-stripe-size
  drbd: Constants should be UPPERCASE
  drbd: Ignore the exit code of a fence-peer handler if it returns too late
  drbd: Fix rcu_read_lock balance on error path
  drbd: fix error return code in drbd_init()
  drbd: Do not sleep inside rcu
  bcache: Refresh usage docs
  ...
</content>
</entry>
<entry>
<title>md/raid1: fix bio handling problems in process_checks()</title>
<updated>2013-07-18T04:18:04Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-07-17T05:19:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=30bc9b53878a9921b02e3b5bc4283ac1c6de102a'/>
<id>urn:sha1:30bc9b53878a9921b02e3b5bc4283ac1c6de102a</id>
<content type='text'>
Recent change to use bio_copy_data() in raid1 when repairing
an array is faulty.

The underlying may have changed the bio in various ways using
bio_advance and these need to be undone not just for the 'sbio' which
is being copied to, but also the 'pbio' (primary) which is being
copied from.

So perform the reset on all bios that were read from and do it early.

This also ensure that the sbio-&gt;bi_io_vec[j].bv_len passed to
memcmp is correct.

This fixes a crash during a 'check' of a RAID1 array.  The crash was
introduced in 3.10 so this is suitable for 3.10-stable.

Cc: stable@vger.kernel.org (3.10)
Reported-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Remove recent change which allows devices to skip recovery.</title>
<updated>2013-07-18T04:18:03Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-07-17T04:55:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5024c298311f3b97c85cb034f9edaa333fdb9338'/>
<id>urn:sha1:5024c298311f3b97c85cb034f9edaa333fdb9338</id>
<content type='text'>
commit 7ceb17e87bde79d285a8b988cfed9eaeebe60b86
    md: Allow devices to be re-added to a read-only array.

allowed a bit more than just that.  It also allows devices to be added
to a read-write array and to end up skipping recovery.

This patch removes the offending piece of code pending a rewrite for a
subsequent release.

More specifically:
 If the array has a bitmap, then the device will still need a bitmap
 based resync ('saved_raid_disk' is set under different conditions
 is a bitmap is present).
 If the array doesn't have a bitmap, then this is correct as long as
 nothing has been written to the array since the metadata was checked
 by -&gt;validate_super.  However there is no locking to ensure that there
 was no write.

Bug was introduced in 3.10 and causes data corruption so
patch is suitable for 3.10-stable.

Cc: stable@vger.kernel.org (3.10)
Reported-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid10: fix two problems with RAID10 resync.</title>
<updated>2013-07-18T04:18:01Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-07-16T06:50:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7bb23c4934059c64cbee2e41d5d24ce122285176'/>
<id>urn:sha1:7bb23c4934059c64cbee2e41d5d24ce122285176</id>
<content type='text'>
1/ When an different between blocks is found, data is copied from
   one bio to the other.  However bv_len is used as the length to
   copy and this could be zero.  So use r10_bio-&gt;sectors to calculate
   length instead.
   Using bv_len was probably always a bit dubious, but the introduction
   of bio_advance made it much more likely to be a problem.

2/ When preparing some blocks for sync, we don't set BIO_UPTODATE
   except on bios that we schedule for a read.  This ensures that
   missing/failed devices don't confuse the loop at the top of
   sync_request write.
   Commit 8be185f2c9d54d6 "raid10: Use bio_reset()"
   removed a loop which set BIO_UPTDATE on all appropriate bios.
   So we need to re-add that flag.

These bugs were introduced in 3.10, so this patch is suitable for
3.10-stable, and can remove a potential for data corruption.

Cc: stable@vger.kernel.org (3.10)
Reported-by: Brassow Jonathan &lt;jbrassow@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>bcache: Allocation kthread fixes</title>
<updated>2013-07-12T07:22:49Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kmo@daterainc.com</email>
</author>
<published>2013-07-11T01:31:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=79826c35eb99cd3c0873b8396f45fa26c87fb0b0'/>
<id>urn:sha1:79826c35eb99cd3c0873b8396f45fa26c87fb0b0</id>
<content type='text'>
The alloc kthread should've been using try_to_freeze() - and also there
was the potential for the alloc kthread to get woken up after it had
shut down, which would have been bad.

Signed-off-by: Kent Overstreet &lt;kmo@daterainc.com&gt;
</content>
</entry>
<entry>
<title>bcache: Fix GC_SECTORS_USED() calculation</title>
<updated>2013-07-12T07:22:48Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kmo@daterainc.com</email>
</author>
<published>2013-07-12T02:43:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=29ebf465b9050f241c4433a796a32e6c896a9dcd'/>
<id>urn:sha1:29ebf465b9050f241c4433a796a32e6c896a9dcd</id>
<content type='text'>
Part of the job of garbage collection is to add up however many sectors
of live data it finds in each bucket, but that doesn't work very well if
it doesn't reset GC_SECTORS_USED() when it starts. Whoops.

This wouldn't have broken anything horribly, but allocation tries to
preferentially reclaim buckets that are mostly empty and that's not
gonna work with an incorrect GC_SECTORS_USED() value.

Signed-off-by: Kent Overstreet &lt;kmo@daterainc.com&gt;
Cc: linux-stable &lt;stable@vger.kernel.org&gt; # &gt;= v3.10
</content>
</entry>
</feed>
