<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v2.6.38</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=v2.6.38</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.38'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-02-24T06:26:41Z</updated>
<entry>
<title>md: Fix - again - partition detection when array becomes active</title>
<updated>2011-02-24T06:26:41Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-02-24T06:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0b4f7e2f29af678bd9af43422c537dcb6008603'/>
<id>urn:sha1:f0b4f7e2f29af678bd9af43422c537dcb6008603</id>
<content type='text'>
Revert
    b821eaa572fd737faaf6928ba046e571526c36c6
and
    f3b99be19ded511a1bf05a148276239d9f13eefa

When I wrote the first of these I had a wrong idea about the
lifetime of 'struct block_device'.  It can disappear at any time that
the block device is not open if it falls out of the inode cache.

So relying on the 'size' recorded with it to detect when the
device size has changed and so we need to revalidate, is wrong.

Rather, we really do need the 'changed' attribute stored directly in
the mddev and set/tested as appropriate.

Without this patch, a sequence of:
   mknod / open / close / unlink

(which can cause a block_device to be created and then destroyed)
will result in a rescan of the partition table and consequence removal
and addition of partitions.
Several of these in a row can get udev racing to create and unlink and
other code can get confused.

With the patch, the rescan is only performed when needed and so there
are no races.

This is suitable for any stable kernel from 2.6.35.

Reported-by: "Wojcik, Krzysztof" &lt;krzysztof.wojcik@intel.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>md: avoid spinlock problem in blk_throtl_exit</title>
<updated>2011-02-21T07:25:57Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-02-21T07:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da9cf5050a2e3dbc3cf26a8d908482eb4485ed49'/>
<id>urn:sha1:da9cf5050a2e3dbc3cf26a8d908482eb4485ed49</id>
<content type='text'>
blk_throtl_exit assumes that -&gt;queue_lock still exists,
so make sure that it does.
To do this, we stop redirecting -&gt;queue_lock to conf-&gt;device_lock
and leave it pointing where it is initialised - __queue_lock.

As the blk_plug functions check the -&gt;queue_lock is held, we now
take that spin_lock explicitly around the plug functions.  We don't
need the locking, just the warning removal.

This is needed for any kernel with the blk_throtl code, which is
which is 2.6.37 and later.

Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: correctly handle probe of an 'mdp' device.</title>
<updated>2011-02-16T02:58:51Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-02-16T02:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8f5f02c460b7ca74ce55ce126ce0c1e58a3f923d'/>
<id>urn:sha1:8f5f02c460b7ca74ce55ce126ce0c1e58a3f923d</id>
<content type='text'>
'mdp' devices are md devices with preallocated device numbers
for partitions. As such it is possible to mknod and open a partition
before opening the whole device.

this causes  md_probe() to be called with a device number of a
partition, which in-turn calls mddev_find with such a number.

However mddev_find expects the number of a 'whole device' and
does the wrong thing with partition numbers.

So add code to mddev_find to remove the 'partition' part of
a device number and just work with the 'whole device'.

This patch addresses https://bugzilla.kernel.org/show_bug.cgi?id=28652

Reported-by: hkmaly@bigfoot.com
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: &lt;stable@kernel.org&gt;
</content>
</entry>
<entry>
<title>md: don't set_capacity before array is active.</title>
<updated>2011-02-16T02:58:38Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-02-16T02:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cbe6ef1d2622e08e272600b3cb6040bed60f0450'/>
<id>urn:sha1:cbe6ef1d2622e08e272600b3cb6040bed60f0450</id>
<content type='text'>
If the desired size of an array is set (via sysfs) before the array is
active (which is the normal sequence), we currrently call set_capacity
immediately.
This means that a subsequent 'open' (as can be caused by some
udev-triggers program) will notice the new size and try to probe for
partitions.  However as the array isn't quite ready yet the read will
fail.  Then when the array is read, as the size doesn't change again
we don't try to re-probe.

So when setting array size via sysfs, only call set_capacity if the
array is already active.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Fix raid1-&gt;raid0 takeover</title>
<updated>2011-02-13T23:01:41Z</updated>
<author>
<name>Krzysztof Wojcik</name>
<email>krzysztof.wojcik@intel.com</email>
</author>
<published>2011-02-13T23:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f7bee80945155ad0326916486dabc38428c6cdef'/>
<id>urn:sha1:f7bee80945155ad0326916486dabc38428c6cdef</id>
<content type='text'>
Takeover raid1-&gt;raid0 not succeded. Kernel message is shown:
"md/raid0:md126: too few disks (1 of 2) - aborting!"

Problem was that we weren't updating -&gt;raid_disks for that
takeover, unlike all the others.

Signed-off-by: Krzysztof Wojcik &lt;krzysztof.wojcik@intel.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>FIX: md: process hangs at wait_barrier after 0-&gt;10 takeover</title>
<updated>2011-02-08T00:49:02Z</updated>
<author>
<name>Krzysztof Wojcik</name>
<email>krzysztof.wojcik@intel.com</email>
</author>
<published>2011-02-04T13:18:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02214dc5461c36da26a34014cab4e1bb484edba2'/>
<id>urn:sha1:02214dc5461c36da26a34014cab4e1bb484edba2</id>
<content type='text'>
Following symptoms were observed:
1. After raid0-&gt;raid10 takeover operation we have array with 2
missing disks.
When we add disk for rebuild, recovery process starts as expected
but it does not finish- it stops at about 90%, md126_resync process
hangs in "D" state.
2. Similar behavior is when we have mounted raid0 array and we
execute takeover to raid10. After this when we try to unmount array-
it causes process umount hangs in "D"

In scenarios above processes hang at the same function- wait_barrier
in raid10.c.
Process waits in macro "wait_event_lock_irq" until the
"!conf-&gt;barrier" condition will be true.
In scenarios above it never happens.

Reason was that at the end of level_store, after calling pers-&gt;run,
we call mddev_resume. This calls pers-&gt;quiesce(mddev, 0) with
RAID10, that calls lower_barrier.
However raise_barrier hadn't been called on that 'conf' yet,
so conf-&gt;barrier becomes negative, which is bad.

This patch introduces setting conf-&gt;barrier=1 after takeover
operation. It prevents to become barrier negative after call
lower_barrier().

Signed-off-by: Krzysztof Wojcik &lt;krzysztof.wojcik@intel.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md_make_request: don't touch the bio after calling make_request</title>
<updated>2011-02-07T22:53:28Z</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2011-02-08T00:21:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e91ece5590b3c728624ab57043fc7a05069c604a'/>
<id>urn:sha1:e91ece5590b3c728624ab57043fc7a05069c604a</id>
<content type='text'>
md_make_request was calling bio_sectors() for part_stat_add
after it was calling the make_request function.  This is
bad because the make_request function can free the bio and
because the bi_size field can change around.

The fix here was suggested by Jens Axboe.  It saves the
sector count before the make_request call.  I hit this
with CONFIG_DEBUG_PAGEALLOC turned on while trying to break
his pretty fusionio card.

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Don't allow slot_store while resync/recovery is happening.</title>
<updated>2011-02-02T00:57:13Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-02-02T00:57:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c6751b2bde477f56ceef67aa1d298ce44e8e2e23'/>
<id>urn:sha1:c6751b2bde477f56ceef67aa1d298ce44e8e2e23</id>
<content type='text'>
Activating a spare in an array while resync/recovery is already
happening can lead the that spare being marked in-sync when it isn't
really.
So don't allow the 'slot' to be set (this activating the device)
while resync/recovery is happening.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: don't clear curr_resync_completed at end of resync.</title>
<updated>2011-01-31T03:30:27Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-01-31T03:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7281f8129c362436237b82c8c026494dd36479dc'/>
<id>urn:sha1:7281f8129c362436237b82c8c026494dd36479dc</id>
<content type='text'>
There is no need to set this to zero at this point.  It will be
set to zero by remove_and_add_spares or at the start of
md_do_sync at the latest.
And setting it to zero before MD_RECOVERY_RUNNING is cleared can
make a 'zero' appear briefly in the 'sync_completed' sysfs attribute
just as resync is finishing.

So simply remove this setting to zero.


Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md: Don't use remove_and_add_spares to remove failed devices from a read-only array</title>
<updated>2011-01-31T02:47:13Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-01-31T02:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8c42c7f476b5bb39bb3a5b32d5473b9a46cadb9'/>
<id>urn:sha1:a8c42c7f476b5bb39bb3a5b32d5473b9a46cadb9</id>
<content type='text'>
remove_and_add_spares is called in two places where the needs really
are very different.
remove_and_add_spares should not be called on an array which is about
to be reshaped as some extra devices might have been manually added
and that would remove them.  However if the array is 'read-auto',
that will currently happen, which is bad.

So in the 'ro != 0' case don't call remove_and_add_spares but simply
remove the failed devices as the comment suggests is needed.

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