<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md/raid0.c, branch v4.1</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.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-05-20T23:14:25Z</updated>
<entry>
<title>md/raid0: fix restore to sector variable in raid0_make_request</title>
<updated>2015-05-20T23:14:25Z</updated>
<author>
<name>Eric Work</name>
<email>work.eric@gmail.com</email>
</author>
<published>2015-05-19T06:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a81157768a00e8cf8a7b43b5ea5cac931262374f'/>
<id>urn:sha1:a81157768a00e8cf8a7b43b5ea5cac931262374f</id>
<content type='text'>
The variable "sector" in "raid0_make_request()" was improperly updated
by a call to "sector_div()" which modifies its first argument in place.
Commit 47d68979cc968535cb87f3e5f2e6a3533ea48fbd restored this variable
after the call for later re-use.  Unfortunetly the restore was done after
the referenced variable "bio" was advanced.  This lead to the original
value and the restored value being different.  Here we move this line to
the proper place.

One observed side effect of this bug was discarding a file though
unlinking would cause an unrelated file's contents to be discarded.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Fixes: 47d68979cc96 ("md/raid0: fix bug with chunksize not a power of 2.")
Cc: stable@vger.kernel.org (any that received above backport)
URL: https://bugzilla.kernel.org/show_bug.cgi?id=98501
</content>
</entry>
<entry>
<title>md-raid0: conditional mddev-&gt;queue access to suit dm-raid</title>
<updated>2015-05-08T08:39:40Z</updated>
<author>
<name>Heinz Mauelshagen</name>
<email>heinzm@redhat.com</email>
</author>
<published>2015-05-08T08:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6538fe32966e63ef38897860ef220980d904974'/>
<id>urn:sha1:b6538fe32966e63ef38897860ef220980d904974</id>
<content type='text'>
This patch is a prerequisite for dm-raid "raid0" support to allow
dm-raid to access the MD RAID0 personality doing unconditional
accesses to mddev-&gt;queue, which is NULL in case of dm-raid stacked on
top of MD.

Most of the conditional mddev-&gt;queue accesses made it to upstream but
this missing one, which prohibits md raid0 to set disk stack limits
(being done in dm core in case of md underneath dm).

Signed-off-by: Heinz Mauelshagen &lt;heinzm@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>md raid0: access mddev-&gt;queue (request queue member) conditionally because it is not set when accessed from dm-raid</title>
<updated>2015-04-21T22:00:41Z</updated>
<author>
<name>Heinz Mauelshagen</name>
<email>heinzm@redhat.com</email>
</author>
<published>2015-02-13T18:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=753f2856cda2a130d38ebc3db97bff66c1ef3ca7'/>
<id>urn:sha1:753f2856cda2a130d38ebc3db97bff66c1ef3ca7</id>
<content type='text'>
The patch makes 3 references to mddev-&gt;queue in the raid0 personality
conditional in order to allow for it to be accessed from dm-raid.
Mandatory, because md instances underneath dm-raid don't manage
a request queue of their own which'd lead to oopses without the patch.

Signed-off-by: Heinz Mauelshagen &lt;heinzm@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>md/raid0: fix bug with chunksize not a power of 2.</title>
<updated>2015-04-10T05:36:31Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2015-04-10T03:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47d68979cc968535cb87f3e5f2e6a3533ea48fbd'/>
<id>urn:sha1:47d68979cc968535cb87f3e5f2e6a3533ea48fbd</id>
<content type='text'>
Since commit 20d0189b1012a37d2533a87fb451f7852f2418d1
in v3.14-rc1 RAID0 has performed incorrect calculations
when the chunksize is not a power of 2.

This happens because "sector_div()" modifies its first argument, but
this wasn't taken into account in the patch.

So restore that first arg before re-using the variable.

Reported-by: Joe Landman &lt;joe.landman@gmail.com&gt;
Reported-by: Dave Chinner &lt;david@fromorbit.com&gt;
Fixes: 20d0189b1012a37d2533a87fb451f7852f2418d1
Cc: stable@vger.kernel.org (3.14 and later).
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: fix problems with freeing private data after -&gt;run failure.</title>
<updated>2015-03-20T22:40:36Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2015-03-13T00:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c35bd4723e4a39ba2da4c13a22cb97986ee10c8'/>
<id>urn:sha1:0c35bd4723e4a39ba2da4c13a22cb97986ee10c8</id>
<content type='text'>
If -&gt;run() fails, it can either free the data structures it
allocated, or leave that task to -&gt;free() which will be called
on failures.

However:
  md.c calls -&gt;free() even if -&gt;private_data is NULL, which
     causes problems in some personalities.
  raid0.c frees the data, but doesn't clear -&gt;private_data,
     which will become a problem when we fix md.c

So better fix both these issues at once.

Reported-by: Richard W.M. Jones &lt;rjones@redhat.com&gt;
Fixes: 5aa61f427e4979be733e4847b9199ff9cc48a47e
URL: https://bugzilla.kernel.org/show_bug.cgi?id=94381
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: rename -&gt;stop to -&gt;free</title>
<updated>2015-02-03T21:35:52Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-12-15T01:56:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=afa0f557cb15176570a18fb2a093e348a793afd4'/>
<id>urn:sha1:afa0f557cb15176570a18fb2a093e348a793afd4</id>
<content type='text'>
Now that the -&gt;stop function only frees the private data,
rename is accordingly.

Also pass in the private pointer as an arg rather than using
mddev-&gt;private.  This flexibility will be useful in level_store().

Finally, don't clear -&gt;private.  It doesn't make sense to clear
it seeing that isn't what we free, and it is no longer necessary
to clear -&gt;private (it was some time ago before  -&gt;to_remove was
introduced).

Setting -&gt;to_remove in -&gt;free() is a bit of a wart, but not a
big problem at the moment.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: split detach operation out from -&gt;stop.</title>
<updated>2015-02-03T21:35:52Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-12-15T01:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5aa61f427e4979be733e4847b9199ff9cc48a47e'/>
<id>urn:sha1:5aa61f427e4979be733e4847b9199ff9cc48a47e</id>
<content type='text'>
Each md personality has a 'stop' operation which does two
things:
 1/ it finalizes some aspects of the array to ensure nothing
    is accessing the -&gt;private data
 2/ it frees the -&gt;private data.

All the steps in '1' can apply to all arrays and so can be
performed in common code.

This is useful as in the case where we change the personality which
manages an array (in level_store()), it would be helpful to do
step 1 early, and step 2 later.

So split the 'step 1' functionality out into a new mddev_detach().

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: make merge_bvec_fn more robust in face of personality changes.</title>
<updated>2015-02-03T21:35:52Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-12-15T01:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64590f45ddc7147fa1968147a1f5b5c436b728fe'/>
<id>urn:sha1:64590f45ddc7147fa1968147a1f5b5c436b728fe</id>
<content type='text'>
There is no locking around calls to merge_bvec_fn(), so
it is possible that calls which coincide with a level (or personality)
change could go wrong.

So create a central dispatch point for these functions and use
rcu_read_lock().
If the array is suspended, reject any merge that can be rejected.
If not, we know it is safe to call the function.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: make -&gt;congested robust against personality changes.</title>
<updated>2015-02-03T21:35:52Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-12-15T01:56:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c675f83c68fbdf9c0e103c1090b06be747fa62c'/>
<id>urn:sha1:5c675f83c68fbdf9c0e103c1090b06be747fa62c</id>
<content type='text'>
There is currently no locking around calls to the 'congested'
bdi function.  If called at an awkward time while an array is
being converted from one level (or personality) to another, there
is a tiny chance of running code in an unreferenced module etc.

So add a 'congested' function to the md_personality operations
structure, and call it with appropriate locking from a central
'mddev_congested'.

When the array personality is changing the array will be 'suspended'
so no IO is processed.
If mddev_congested detects this, it simply reports that the
array is congested, which is a safe guess.
As mddev_suspend calls synchronize_rcu(), mddev_congested can
avoid races by included the whole call inside an rcu_read_lock()
region.
This require that the congested functions for all subordinate devices
can be run under rcu_lock.  Fortunately this is the case.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: remove unwanted white space from md.c</title>
<updated>2014-10-14T02:08:29Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-09-30T04:23:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f72ffdd68616e3697bc782b21c82197aeb480fd5'/>
<id>urn:sha1:f72ffdd68616e3697bc782b21c82197aeb480fd5</id>
<content type='text'>
My editor shows much of this is RED.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
</feed>
