<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v3.10.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md?h=v3.10.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md?h=v3.10.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-06-13T17:13:29Z</updated>
<entry>
<title>Merge tag 'md-3.10-fixes' of git://neil.brown.name/md</title>
<updated>2013-06-13T17:13:29Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-06-13T17:13:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=82ea4be61f45d1a7ba1f5151d90124d1ece0c07a'/>
<id>urn:sha1:82ea4be61f45d1a7ba1f5151d90124d1ece0c07a</id>
<content type='text'>
Pull md bugfixes from Neil Brown:
 "A few bugfixes for md

  Some tagged for -stable"

* tag 'md-3.10-fixes' of git://neil.brown.name/md:
  md/raid1,5,10: Disable WRITE SAME until a recovery strategy is in place
  md/raid1,raid10: use freeze_array in place of raise_barrier in various places.
  md/raid1: consider WRITE as successful only if at least one non-Faulty and non-rebuilding drive completed it.
  md: md_stop_writes() should always freeze recovery.
</content>
</entry>
<entry>
<title>md/raid1,5,10: Disable WRITE SAME until a recovery strategy is in place</title>
<updated>2013-06-13T04:49:54Z</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@zytor.com</email>
</author>
<published>2013-06-12T14:37:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5026d7a9b2f3eb1f9bda66c18ac6bc3036ec9020'/>
<id>urn:sha1:5026d7a9b2f3eb1f9bda66c18ac6bc3036ec9020</id>
<content type='text'>
There are cases where the kernel will believe that the WRITE SAME
command is supported by a block device which does not, in fact,
support WRITE SAME.  This currently happens for SATA drivers behind a
SAS controller, but there are probably a hundred other ways that can
happen, including drive firmware bugs.

After receiving an error for WRITE SAME the block layer will retry the
request as a plain write of zeroes, but mdraid will consider the
failure as fatal and consider the drive failed.  This has the effect
that all the mirrors containing a specific set of data are each
offlined in very rapid succession resulting in data loss.

However, just bouncing the request back up to the block layer isn't
ideal either, because the whole initial request-retry sequence should
be inside the write bitmap fence, which probably means that md needs
to do its own conversion of WRITE SAME to write zero.

Until the failure scenario has been sorted out, disable WRITE SAME for
raid1, raid5, and raid10.

[neilb: added raid5]

This patch is appropriate for any -stable since 3.7 when write_same
support was added.

Cc: stable@vger.kernel.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1,raid10: use freeze_array in place of raise_barrier in various places.</title>
<updated>2013-06-13T03:40:48Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-06-12T01:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e2d59925221cd562e07fee38ec8839f7209ae603'/>
<id>urn:sha1:e2d59925221cd562e07fee38ec8839f7209ae603</id>
<content type='text'>
Various places in raid1 and raid10 are calling raise_barrier when they
really should call freeze_array.
The former is only intended to be called from "make_request".
The later has extra checks for 'nr_queued' and makes a call to
flush_pending_writes(), so it is safe to call it from within the
management thread.

Using raise_barrier will sometimes deadlock.  Using freeze_array
should not.

As 'freeze_array' currently expects one request to be pending (in
handle_read_error - the only previous caller), we need to pass
it the number of pending requests (extra) to ignore.

The deadlock was made particularly noticeable by commits
050b66152f87c7 (raid10) and 6b740b8d79252f13 (raid1) which
appeared in 3.4, so the fix is appropriate for any -stable
kernel since then.

This patch probably won't apply directly to some early kernels and
will need to be applied by hand.

Cc: stable@vger.kernel.org
Reported-by: Alexander Lyakas &lt;alex.bolshoy@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1: consider WRITE as successful only if at least one non-Faulty and non-rebuilding drive completed it.</title>
<updated>2013-06-13T03:20:03Z</updated>
<author>
<name>Alex Lyakas</name>
<email>alex@zadarastorage.com</email>
</author>
<published>2013-06-04T17:42:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3056e3aec8d8ba61a0710fb78b2d562600aa2ea7'/>
<id>urn:sha1:3056e3aec8d8ba61a0710fb78b2d562600aa2ea7</id>
<content type='text'>
Without that fix, the following scenario could happen:

- RAID1 with drives A and B; drive B was freshly-added and is rebuilding
- Drive A fails
- WRITE request arrives to the array. It is failed by drive A, so
r1_bio is marked as R1BIO_WriteError, but the rebuilding drive B
succeeds in writing it, so the same r1_bio is marked as
R1BIO_Uptodate.
- r1_bio arrives to handle_write_finished, badblocks are disabled,
md_error()-&gt;error() does nothing because we don't fail the last drive
of raid1
- raid_end_bio_io()  calls call_bio_endio()
- As a result, in call_bio_endio():
        if (!test_bit(R1BIO_Uptodate, &amp;r1_bio-&gt;state))
                clear_bit(BIO_UPTODATE, &amp;bio-&gt;bi_flags);
this code doesn't clear the BIO_UPTODATE flag, and the whole master
WRITE succeeds, back to the upper layer.

So we returned success to the upper layer, even though we had written
the data onto the rebuilding drive only. But when we want to read the
data back, we would not read from the rebuilding drive, so this data
is lost.

[neilb - applied identical change to raid10 as well]

This bug can result in lost data, so it is suitable for any
-stable kernel.

Cc: stable@vger.kernel.org
Signed-off-by: Alex Lyakas &lt;alex@zadarastorage.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: md_stop_writes() should always freeze recovery.</title>
<updated>2013-06-13T03:18:15Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-05-08T23:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b6204ee92adb53bfd6a77cb5679282ec3820c4b'/>
<id>urn:sha1:6b6204ee92adb53bfd6a77cb5679282ec3820c4b</id>
<content type='text'>
__md_stop_writes() will currently sometimes freeze recovery.
So any caller must be ready for that to happen, and indeed they are.

However if __md_stop_writes() doesn't freeze_recovery, then
a recovery could start before mddev_suspend() is called, which
could be awkward.  This can particularly cause problems or dm-raid.

So change __md_stop_writes() to always freeze recovery.  This is safe
and more predicatable.

Reported-by: Brassow Jonathan &lt;jbrassow@redhat.com&gt;
Tested-by: Brassow Jonathan &lt;jbrassow@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2013-06-12T23:42:39Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-06-12T23:42:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b2cc9c19e48bcf00f10c23fbf9f6abe43f6929d5'/>
<id>urn:sha1:b2cc9c19e48bcf00f10c23fbf9f6abe43f6929d5</id>
<content type='text'>
Pull block layer fixes from Jens Axboe:
 "Outside of bcache (which really isn't super big), these are all
  few-liners.  There are a few important fixes in here:

   - Fix blk pm sleeping when holding the queue lock

   - A small collection of bcache fixes that have been done and tested
     since bcache was included in this merge window.

   - A fix for a raid5 regression introduced with the bio changes.

   - Two important fixes for mtip32xx, fixing an oops and potential data
     corruption (or hang) due to wrong bio iteration on stacked devices."

* 'for-linus' of git://git.kernel.dk/linux-block:
  scatterlist: sg_set_buf() argument must be in linear mapping
  raid5: Initialize bi_vcnt
  pktcdvd: silence static checker warning
  block: remove refs to XD disks from documentation
  blkpm: avoid sleep when holding queue lock
  mtip32xx: Correctly handle bio-&gt;bi_idx != 0 conditions
  mtip32xx: Fix NULL pointer dereference during module unload
  bcache: Fix error handling in init code
  bcache: clarify free/available/unused space
  bcache: drop "select CLOSURES"
  bcache: Fix incompatible pointer type warning
</content>
</entry>
<entry>
<title>raid5: Initialize bi_vcnt</title>
<updated>2013-05-30T06:44:39Z</updated>
<author>
<name>Kent Overstreet</name>
<email>koverstreet@google.com</email>
</author>
<published>2013-05-30T06:44:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4997b72ee62930cb841d185398ea547d979789f4'/>
<id>urn:sha1:4997b72ee62930cb841d185398ea547d979789f4</id>
<content type='text'>
The patch that converted raid5 to use bio_reset() forgot to initialize
bi_vcnt.

Signed-off-by: Kent Overstreet &lt;koverstreet@google.com&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: linux-raid@vger.kernel.org
Tested-by: Ilia Mirkin &lt;imirkin@alum.mit.edu&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>dm thin: fix metadata dev resize detection</title>
<updated>2013-05-19T17:57:50Z</updated>
<author>
<name>Alasdair G Kergon</name>
<email>agk@redhat.com</email>
</author>
<published>2013-05-19T17:57:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=610bba8b9372597967aefdc8d90661d2ab248802'/>
<id>urn:sha1:610bba8b9372597967aefdc8d90661d2ab248802</id>
<content type='text'>
Fix detection of the need to resize the dm thin metadata device.

The code incorrectly tried to extend the metadata device when it
didn't need to due to a merging error with patch 24347e9 ("dm thin:
detect metadata device resizing").

  device-mapper: transaction manager: couldn't open metadata space map
  device-mapper: thin metadata: tm_open_with_sm failed
  device-mapper: thin: aborting transaction failed
  device-mapper: thin: switching pool to failure mode

Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bcache-for-upstream' of git://evilpiepirate.org/~kent/linux-bcache into for-linus</title>
<updated>2013-05-15T08:36:25Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2013-05-15T08:36:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c0a363f5cf21f79d72ab630524c3aa06fc6d066c'/>
<id>urn:sha1:c0a363f5cf21f79d72ab630524c3aa06fc6d066c</id>
<content type='text'>
Kent writes:

Jens - couple more bcache patches. Bug fixes and a doc update.
</content>
</entry>
<entry>
<title>bcache: Fix error handling in init code</title>
<updated>2013-05-15T07:48:14Z</updated>
<author>
<name>Kent Overstreet</name>
<email>koverstreet@google.com</email>
</author>
<published>2013-05-15T07:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f59fce847fc8483508b5028c24e2b1e00523dd88'/>
<id>urn:sha1:f59fce847fc8483508b5028c24e2b1e00523dd88</id>
<content type='text'>
This code appears to have rotted... fix various bugs and do some
refactoring.

Signed-off-by: Kent Overstreet &lt;koverstreet@google.com&gt;
</content>
</entry>
</feed>
