<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/persistent-data, branch v4.3</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=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-10-23T18:02:55Z</updated>
<entry>
<title>dm btree: fix leak of bufio-backed block in btree_split_beneath error path</title>
<updated>2015-10-23T18:02:55Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2015-10-22T14:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4dcb8b57df3593dcb20481d9d6cf79d1dc1534be'/>
<id>urn:sha1:4dcb8b57df3593dcb20481d9d6cf79d1dc1534be</id>
<content type='text'>
btree_split_beneath()'s error path had an outstanding FIXME that speaks
directly to the potential for _not_ cleaning up a previously allocated
bufio-backed block.

Fix this by releasing the previously allocated bufio block using
unlock_block().

Reported-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Acked-by: Joe Thornber &lt;thornber@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm btree remove: fix a bug when rebalancing nodes after removal</title>
<updated>2015-10-23T18:02:55Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-10-21T17:36:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2871c69e025e8bc507651d5a9cf81a8a7da9d24b'/>
<id>urn:sha1:2871c69e025e8bc507651d5a9cf81a8a7da9d24b</id>
<content type='text'>
Commit 4c7e309340ff ("dm btree remove: fix bug in redistribute3") wasn't
a complete fix for redistribute3().

The redistribute3 function takes 3 btree nodes and shares out the entries
evenly between them.  If the three nodes in total contained
(MAX_ENTRIES * 3) - 1 entries between them then this was erroneously getting
rebalanced as (MAX_ENTRIES - 1) on the left and right, and (MAX_ENTRIES + 1) in
the center.

Fix this issue by being more careful about calculating the target number
of entries for the left and right nodes.

Unit tested in userspace using this program:
https://github.com/jthornber/redistribute3-test/blob/master/redistribute3_t.c

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: remove unlikely() before IS_ERR()</title>
<updated>2015-08-12T15:32:21Z</updated>
<author>
<name>viresh kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-08-10T06:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc0a446152877d3a4e40166ddb19b6e0cb5f6567'/>
<id>urn:sha1:fc0a446152877d3a4e40166ddb19b6e0cb5f6567</id>
<content type='text'>
IS_ERR() already contains an 'unlikely' compiler flag so there is no
need to do that again from IS_ERR() callers.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm btree remove: remove unused function get_nr_entries()</title>
<updated>2015-08-12T15:32:19Z</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2015-07-06T15:55:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c747fd0c3f514233afaca98139c03cca2cf2d2f'/>
<id>urn:sha1:8c747fd0c3f514233afaca98139c03cca2cf2d2f</id>
<content type='text'>
rebalance_children() calls get_nr_entries() and assigns the result to an
unused local 'child_entries' variable.  Remove get_nr_entries() and
cleanup rebalance_children() accordingly.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm btree: remove unused "dm_block_t root" parameter in btree_split_sibling()</title>
<updated>2015-08-12T15:32:19Z</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2015-07-06T15:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a8d4c3ef8f14cbd26d97767e3676722d4eebee5'/>
<id>urn:sha1:0a8d4c3ef8f14cbd26d97767e3676722d4eebee5</id>
<content type='text'>
Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm btree: add ref counting ops for the leaves of top level btrees</title>
<updated>2015-08-12T14:50:37Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-08-12T14:12:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0dc3c8bc157c60b1d470163882be8c13e1950af'/>
<id>urn:sha1:b0dc3c8bc157c60b1d470163882be8c13e1950af</id>
<content type='text'>
When using nested btrees, the top leaves of the top levels contain
block addresses for the root of the next tree down.  If we shadow a
shared leaf node the leaf values (sub tree roots) should be incremented
accordingly.

This is only an issue if there is metadata sharing in the top levels.
Which only occurs if metadata snapshots are being used (as is possible
with dm-thinp).  And could result in a block from the thinp metadata
snap being reused early, thus corrupting the thinp metadata snap.

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 btree remove: fix bug in remove_one()</title>
<updated>2015-08-07T15:56:43Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-08-07T15:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa0cd28d057fd4cb686fbdd2475a6a3f609dd581'/>
<id>urn:sha1:aa0cd28d057fd4cb686fbdd2475a6a3f609dd581</id>
<content type='text'>
remove_one() was not incrementing the key for the beginning of the
range, so not all entries were being removed.  This resulted in
discards that were not unmapping all blocks.

Fixes: 4ec331c3ea ("dm btree: add dm_btree_remove_leaves()")
Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm btree: silence lockdep lock inversion in dm_btree_del()</title>
<updated>2015-07-06T14:45:02Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-07-03T13:51:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c7518794a3647eb345d59ee52844e8a40405198'/>
<id>urn:sha1:1c7518794a3647eb345d59ee52844e8a40405198</id>
<content type='text'>
Allocate memory using GFP_NOIO when deleting a btree.  dm_btree_del()
can be called via an ioctl and we don't want to recurse into the FS or
block layer.

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 btree remove: fix bug in redistribute3</title>
<updated>2015-07-05T21:43:58Z</updated>
<author>
<name>Dennis Yang</name>
<email>shinrairis@gmail.com</email>
</author>
<published>2015-06-26T14:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4c7e309340ff85072e96f529582d159002c36734'/>
<id>urn:sha1:4c7e309340ff85072e96f529582d159002c36734</id>
<content type='text'>
redistribute3() shares entries out across 3 nodes.  Some entries were
being moved the wrong way, breaking the ordering.  This manifested as a
BUG() in dm-btree-remove.c:shift() when entries were removed from the
btree.

For additional context see:
https://www.redhat.com/archives/dm-devel/2015-May/msg00113.html

Signed-off-by: Dennis Yang &lt;shinrairis@gmail.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 space map metadata: fix occasional leak of a metadata block on resize</title>
<updated>2015-06-17T14:09:23Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-06-17T12:35:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6096d91af0b65a3967139b32d5adbb3647858a26'/>
<id>urn:sha1:6096d91af0b65a3967139b32d5adbb3647858a26</id>
<content type='text'>
The metadata space map has a simplified 'bootstrap' mode that is
operational when extending the space maps.  Whilst in this mode it's
possible for some refcount decrement operations to become queued (eg, as
a result of shadowing one of the bitmap indexes).  These decrements were
not being applied when switching out of bootstrap mode.

The effect of this bug was the leaking of a 4k metadata block.  This is
detected by the latest version of thin_check as a non fatal error.

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>
</feed>
