<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v3.19</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=v3.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-02-04T03:54:57Z</updated>
<entry>
<title>Merge tag 'md/3.19-fixes' of git://neil.brown.name/md</title>
<updated>2015-02-04T03:54:57Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-02-04T03:54:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59acf65776f8720d5f7c4efec545d1ecec6abca3'/>
<id>urn:sha1:59acf65776f8720d5f7c4efec545d1ecec6abca3</id>
<content type='text'>
Pull two fixes for md from Neil Brown:

 - Another live lock, needs backporting

 - work-around false positive with new warnings.

* tag 'md/3.19-fixes' of git://neil.brown.name/md:
  md/bitmap: fix a might_sleep() warning.
  md/raid5: fix another livelock caused by non-aligned writes.
</content>
</entry>
<entry>
<title>md/bitmap: fix a might_sleep() warning.</title>
<updated>2015-02-02T06:08:03Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2015-02-02T06:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d95901433436aeb921eac58bfd8a2aa77f110384'/>
<id>urn:sha1:d95901433436aeb921eac58bfd8a2aa77f110384</id>
<content type='text'>
commit 8eb23b9f35aae413140d3fda766a98092c21e9b0
    sched: Debug nested sleeps

causes false-positive warnings in RAID5 code.

This annotation removes them and adds a comment
explaining why there is no real problem.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid5: fix another livelock caused by non-aligned writes.</title>
<updated>2015-02-02T05:57:17Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2015-02-01T23:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1b02fe97f75b12ab34b2303bfd4e3526d903a58'/>
<id>urn:sha1:b1b02fe97f75b12ab34b2303bfd4e3526d903a58</id>
<content type='text'>
If a non-page-aligned write is destined for a device which
is missing/faulty, we can deadlock.

As the target device is missing, a read-modify-write cycle
is not possible.
As the write is not for a full-page, a recontruct-write cycle
is not possible.

This should be handled by logic in fetch_block() which notices
there is a non-R5_OVERWRITE write to a missing device, and so
loads all blocks.

However since commit 67f455486d2ea2, that code requires
STRIPE_PREREAD_ACTIVE before it will active, and those circumstances
never set STRIPE_PREREAD_ACTIVE.

So: in handle_stripe_dirtying, if neither rmw or rcw was possible,
set STRIPE_DELAYED, which will cause STRIPE_PREREAD_ACTIVE be set
after a suitable delay.

Fixes: 67f455486d2ea20b2d94d6adf5b9b783d079e321
Cc: stable@vger.kernel.org (v3.16+)
Reported-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Tested-by: Heinz Mauelshagen &lt;heinzm@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>dm thin: don't allow messages to be sent to a pool target in READ_ONLY or FAIL mode</title>
<updated>2015-01-28T15:00:34Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-01-26T11:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a7eaea02b99b6e267b1e89c79acc6e9a51cee3b'/>
<id>urn:sha1:2a7eaea02b99b6e267b1e89c79acc6e9a51cee3b</id>
<content type='text'>
You can't modify the metadata in these modes.  It's better to fail these
messages immediately than let the block-manager deny write locks on
metadata blocks.  Otherwise these failed metadata changes will trigger
'needs_check' to get set in the metadata superblock -- requiring repair
using the thin_check utility.

Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm cache: fix missing ERR_PTR returns and handling</title>
<updated>2015-01-28T14:59:20Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-01-28T12:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=766a78882ddf79b162243649d7dfdbac1fb6fb88'/>
<id>urn:sha1:766a78882ddf79b162243649d7dfdbac1fb6fb88</id>
<content type='text'>
Commit 9b1cc9f251 ("dm cache: share cache-metadata object across
inactive and active DM tables") mistakenly ignored the use of ERR_PTR
returns.  Restore missing IS_ERR checks and ERR_PTR returns where
appropriate.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm: fix handling of multiple internal suspends</title>
<updated>2015-01-24T19:50:08Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2015-01-08T23:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96b26c8c64c7a30488b8b404f7a63346df4c3bff'/>
<id>urn:sha1:96b26c8c64c7a30488b8b404f7a63346df4c3bff</id>
<content type='text'>
Commit ffcc393641 ("dm: enhance internal suspend and resume interface")
attempted to handle multiple internal suspends on the same device, but
it did that incorrectly.  When these functions are called in this order
on the same device the device is no longer suspended, but it should be:
	dm_internal_suspend_noflush
	dm_internal_suspend_noflush
	dm_internal_resume

Fix this bug by maintaining an 'internal_suspend_count' and resuming
the device when this count drops to zero.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm cache: fix problematic dual use of a single migration count variable</title>
<updated>2015-01-23T16:06:08Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-01-23T10:16:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a59db67656021fa212e9b95a583f13c34eb67cd9'/>
<id>urn:sha1:a59db67656021fa212e9b95a583f13c34eb67cd9</id>
<content type='text'>
Introduce a new variable to count the number of allocated migration
structures.  The existing variable cache-&gt;nr_migrations became
overloaded.  It was used to:

 i) track of the number of migrations in flight for the purposes of
    quiescing during suspend.

 ii) to estimate the amount of background IO occuring.

Recent discard changes meant that REQ_DISCARD bios are processed with
a migration.  Discards are not background IO so nr_migrations was not
incremented.  However this could cause quiescing to complete early.

(i) is now handled with a new variable cache-&gt;nr_allocated_migrations.
cache-&gt;nr_migrations has been renamed cache-&gt;nr_io_migrations.
cleanup_migration() is now called free_io_migration(), since it
decrements that variable.

Also, remove the unused cache-&gt;next_migration variable that got replaced
with with prealloc_structs a while ago.

Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm cache: share cache-metadata object across inactive and active DM tables</title>
<updated>2015-01-23T15:57:15Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-01-23T10:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b1cc9f251affdd27f29fe46d0989ba76c33faf6'/>
<id>urn:sha1:9b1cc9f251affdd27f29fe46d0989ba76c33faf6</id>
<content type='text'>
If a DM table is reloaded with an inactive table when the device is not
suspended (normal procedure for LVM2), then there will be two dm-bufio
objects that can diverge.  This can lead to a situation where the
inactive table uses bufio to read metadata at the same time the active
table writes metadata -- resulting in the inactive table having stale
metadata buffers once it is promoted to the active table slot.

Fix this by using reference counting and a global list of cache metadata
objects to ensure there is only one metadata object per metadata device.

Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm: fix missed error code if .end_io isn't implemented by target_type</title>
<updated>2014-12-17T17:31:13Z</updated>
<author>
<name>zhendong chen</name>
<email>alex.chen@huawei.com</email>
</author>
<published>2014-12-17T06:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5164bece1673cdf04782f8ed3fba70743700f5da'/>
<id>urn:sha1:5164bece1673cdf04782f8ed3fba70743700f5da</id>
<content type='text'>
In bio-based DM's clone_endio(), when target_type doesn't implement
.end_io (e.g. linear) r will be always be initialized 0.  So if a
WRITE SAME bio fails WRITE SAME will not be disabled as intended.

Fix this by initializing r to error, rather than 0, in clone_endio().

Signed-off-by: Alex Chen &lt;alex.chen@huawei.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Fixes: 7eee4ae2db ("dm: disable WRITE SAME if it fails")
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm thin: fix crash by initializing thin device's refcount and completion earlier</title>
<updated>2014-12-17T17:06:25Z</updated>
<author>
<name>Marc Dionne</name>
<email>marc.c.dionne@gmail.com</email>
</author>
<published>2014-12-17T12:59:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b94e8960cc3f225dec058f27570505351f4bc13'/>
<id>urn:sha1:2b94e8960cc3f225dec058f27570505351f4bc13</id>
<content type='text'>
Commit 80e96c5484be ("dm thin: do not allow thin device activation
while pool is suspended") delayed the initialization of a new thin
device's refcount and completion until after this new thin was added
to the pool's active_thins list and the pool lock is released.  This
opens a race with a worker thread that walks the list and calls
thin_get/put, noticing that the refcount goes to 0 and calling
complete, freezing up the system and giving the oops below:

 kernel: BUG: unable to handle kernel NULL pointer dereference at           (null)
 kernel: IP: [&lt;ffffffff810d360b&gt;] __wake_up_common+0x2b/0x90

 kernel: Call Trace:
 kernel: [&lt;ffffffff810d3683&gt;] __wake_up_locked+0x13/0x20
 kernel: [&lt;ffffffff810d3dc7&gt;] complete+0x37/0x50
 kernel: [&lt;ffffffffa0595c50&gt;] thin_put+0x20/0x30 [dm_thin_pool]
 kernel: [&lt;ffffffffa059aab7&gt;] do_worker+0x667/0x870 [dm_thin_pool]
 kernel: [&lt;ffffffff816a8a4c&gt;] ? __schedule+0x3ac/0x9a0
 kernel: [&lt;ffffffff810b1aef&gt;] process_one_work+0x14f/0x400
 kernel: [&lt;ffffffff810b206b&gt;] worker_thread+0x6b/0x490
 kernel: [&lt;ffffffff810b2000&gt;] ? rescuer_thread+0x260/0x260
 kernel: [&lt;ffffffff810b6a7b&gt;] kthread+0xdb/0x100
 kernel: [&lt;ffffffff810b69a0&gt;] ? kthread_create_on_node+0x170/0x170
 kernel: [&lt;ffffffff816ad7ec&gt;] ret_from_fork+0x7c/0xb0
 kernel: [&lt;ffffffff810b69a0&gt;] ? kthread_create_on_node+0x170/0x170

Set the thin device's initial refcount and initialize the completion
before adding it to the pool's active_thins list in thin_ctr().

Signed-off-by: Marc Dionne &lt;marc.dionne@your-file-system.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
</feed>
