The ioctl requires CAP_SYS_ADMIN, so sysfs should too.
Note that we don't require CAP_SYS_ADMIN for reading
attributes even though the ioctl does. There is no reason
to limit the read access, and much of the information is
already available via /proc/mdstat
cc: Chris Wright <[EMAIL PROTECTED]>
Following are 12 assorted small patches for md.
They are against 2.6.17-mm2 and are suitable for inclusion in 2.6.18.
They are primarily small bug fixes, many fixing possible races, some
of which have been seen in the wild, some not.
Thanks,
NeilBrown
[PATCH 001 of 12] md: Possible fix for
The comment gives more details, but I didn't quite have the
sequencing write, so there was room for races to leave bits
unset in the on-disk bitmap for short periods of time.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 30 ++
Some places we use number (0660) someplaces names (S_IRUGO).
Change all numbers to be names, and change 0655 to be
what it should be.
Also make some formatting more consistent.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/md.c | 56 +
I have reports of a problem with raid5 which turns out to be because
the raid5 device gets stuck in a 'plugged' state. This shouldn't be
able to happen as 3msec after it gets plugged it should get unplugged.
However it happens none-the-less. This patch fixes the problem and is
a reasonable thing
When an array is started we start one or two threads (two if
there is a reshape or recovery that needs to be completed).
We currently start these *before* the array is completely set up and
in particular before queue->queuedata is set. If the thread
actually starts very quickly on another CPU, w
When a device is unplugged, requests are moved from one or two
(depending on whether a bitmap is in use) queues to the main
request queue.
So whenever requests are put on either of those queues, we should make
sure the raid5 array is 'plugged'.
However we don't. We currently plug the raid5 queue
This is generally useful, but particularly helps see if it is
the same sector that always needs correcting, or different ones.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid1.c |3 +++
./drivers/md/raid10.c |4
./drivers/md/raid5.c | 30
Though it rarely matters, we should be using 's' rather than
r1_bio->sector here.
### Diffstat output
./drivers/md/raid1.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff .prev/drivers/md/raid1.c ./drivers/md/raid1.c
--- .prev/drivers/md/raid1.c2006-06-27 12:15:16.0 +1
We introduced 'io_sectors' recently so we could count
the sectors that causes io during resync separate from sectors
which didn't cause IO - there can be a difference if a bitmap
is being used to accelerate resync.
However when a speed is reported, we find the number of sectors
processed recently
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c |1 -
1 file changed, 1 deletion(-)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c2006-06-27 12:17:33.0 +1000
+++ ./drivers/md/raid5.c2006-06-27 12:17
This has to be done in ->load_super, not ->validate_super
Without this, hot-adding devices to an array doesn't always
work right - though there is a work around in mdadm-2.5.2 to
make this less of an issue.
### Diffstat output
./drivers/md/md.c |6 +-
1 file changed, 5 insertions(+), 1
If a partitionable array is used, we should say e.g.
Will configure md_d0 (super-block) from
rather than
Will configure md0 (super-block) from
which implies non-partitionable.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./usr/kinit/do_mounts_md.c |4 ++--
Following are 9 patches for md in 2.6-mm-latest that should be
targeted for 2.6.19 (not 2.6.18 material).
Nothing really remarkable, so I'll leave to speak for themselves.
NeilBrown
[PATCH 001 of 9] md: The scheduled removal of the START_ARRAY ioctl for md
[PATCH 002 of 9] md: Fix a co
--
-What: START_ARRAY ioctl for md
-When: July 2006
-Files: drivers/md/md.c
-Why: Not reliable by design - can fail when most needed.
- Alternatives exist
-Who: NeilBrown <[EMAIL PROTECTED]>
-
-
What: eepro100 network driver
When: January 2
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./include/linux/raid/raid5.h |5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff .prev/include/linux/raid/raid5.h ./include/linux/raid/raid5.h
--- .prev/include/linux/raid/raid5.h2006-07-31 16:33:02.0
Instead of magic numbers (0,1,2,3) in sb_dirty, we have
some flags instead:
MD_CHANGE_DEVS
Some device state has changed requiring superblock update
on all devices.
MD_CHANGE_CLEAN
The array has transitions from 'clean' to 'dirty' or back,
requiring a superblock update on active device
It is equivalent to conf->raid_disks - conf->mddev->degraded.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid1.c | 28
./include/linux/raid/raid1.h |1 -
2 files changed, 12 insertions(+), 17 deletions(-)
diff .prev
The error handling routines don't use proper locking, and
so two concurrent errors could trigger a problem.
So:
- use test-and-set and test-and-clear to synchonise
the In_sync bits with the ->degraded count
- use the spinlock to protect updates to the
degraded count (could use an atomi
They are not needed.
conf->failed_disks is the same as mddev->degraded
and
conf->working_disks is conf->raid_disks - mddev->degraded.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 20
./include/linux/raid/raid5.h |2 +
raid1d has t many nested block, so take the fix_read_error
functionality out into a separate function.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid1.c | 161 ---
1 file changed, 89 insertions(+), 72 dele
It isn't needed as mddev->degraded contains equivalent info.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid10.c | 12
./include/linux/raid/raid10.h |1 -
2 files changed, 4 insertions(+), 9 deletions(-)
diff .prev/drivers/md/raid10
raid10d has t many nested block, so take the fix_read_error
functionality out into a separate function.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid10.c | 213 ++
1 file changed, 115 insertions(+), 98 d
This patch fixed a bug in 2.6.18-rc3 It would be good if it can get
into -final.
Thanks,
NeilBrown
### Comments for Changeset
A recent patch that allowed linear arrays to be reconfigured on-line
allowed in a bug which results in divide by zero - not all
mddev->array_size were converted to c
patch for 2.6.16 stable series
My applogies to people reading this with a window narrower than
111 characters :-(
NeilBrown
### Comments for Changeset
At the point where this 'atomic_add' is, rdev could be NULL,
as seen by the fact that we test for this in the very next
statement.
patch for 2.6.17 stable series.
Thanks,
NeilBrown
### Comments for Changeset
At the point where this 'atomic_add' is, rdev could be NULL,
as seen by the fact that we test for this in the very next
statement.
Further is it is really the wrong place of the add.
We could add to th
).
Thanks,
NeilBrown
[PATCH 001 of 2] md: Avoid backward event updates in md superblock when
degraded.
[PATCH 002 of 2] md: replace magic numbers in sb_dirty with well defined bit
flags
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message
If we
- shut down a clean array,
- restart with one (or more) drive(s) missing
- make some changes
- pause, so that they array gets marked 'clean',
the event count on the superblock of included drives
will be the same as that of the removed drives.
So adding the removed drive back in will
From: NeilBrown <[EMAIL PROTECTED]>
Instead of magic numbers (0,1,2,3) in sb_dirty, we have
some flags instead:
MD_CHANGE_DEVS
Some device state has changed requiring superblock update
on all devices.
MD_CHANGE_CLEAN
The array has transitions from 'clean' to
can stripe out all the rcu-extra-carefulness as a separate
patch and just leave the important bit which involves moving the
atomic_add down twenty-something lines.
Thanks,
NeilBrown
[PATCH 001 of 4] md: Fix recent breakage of md/raid1 array checking
[PATCH 002 of 4] md: Fix issues with referencing
We need to be careful when referencing mirrors[i].rdev.
so it can disappear under us at various times.
So:
fix a couple of problem places.
comment a couple of non-problem places
move an 'atomic_add' which deferences rdev down a little
way to some where where it is sure to not be NULL.
A recent patch broke the ability to do a
user-request check of a raid1.
This patch fixes the breakage and also moves a comment that
was dislocated by the same patch.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid1.c |7 ---
1 file changed, 4 inserti
From: Paul Clements <[EMAIL PROTECTED]>
This patch (tested against 2.6.18-rc1-mm1) adds a new sysfs interface
that allows the bitmap of an array to be dirtied. The interface is
write-only, and is used as follows:
echo "1000" > /sys/block/md2/md/bitmap
(dirty the bit for chunk 1000 [offset 0]
>From : Coywolf Qi Hunt <[EMAIL PROTECTED]>
Signed-off-by: Coywolf Qi Hunt <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c |5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5
We need to be careful when referencing mirrors[i].rdev. so it can
disappear under us at various times.
So:
fix a couple of problem places.
comment a couple of non-problem places
move an 'atomic_add' which deferences rdev down a little
way to some where where it is sure to not be NULL.
patch
md-remove-working_disks-from-raid1-state-data.patch
md-improve-locking-around-error-handling.patch
The first one listed above was at the end of the list, and should
go into 2.6.18.
Thanks,
NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body
From: NeilBrown <[EMAIL PROTECTED]>
It is equivalent to conf->raid_disks - conf->mddev->degraded.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
---
drivers/md/raid1.c | 28
include/linux/raid/raid1.h |1 -
2 files changed,
From: NeilBrown <[EMAIL PROTECTED]>
raid1d has t many nested block, so take the fix_read_error functionality
out into a separate function.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
---
drivers/md/raid1.c | 161 +++
1 file changed, 8
From: NeilBrown <[EMAIL PROTECTED]>
The error handling routines don't use proper locking, and so two concurrent
errors could trigger a problem.
So:
- use test-and-set and test-and-clear to synchonise
the In_sync bits with the ->degraded count
- use the spinlock to protect
Each backing_dev needs to be able to report whether it is congested,
either by modulating BDI_*_congested in ->state, or by
defining a ->congested_fn.
md/raid did neither of these. This patch add a congested_fn
which simply checks all component devices to see if they are
congested.
Signed-off-by
ning.
The last improves some messages when resync happens so e.g. it doesn't
like your array is being resynced when you only asked for it to be checked.
Thanks,
NeilBrown
[PATCH 001 of 4] md: Define backing_dev_info.congested_fn for raid0 and linear
[PATCH 002 of 4] md: Define ->cong
It is possible to request a 'check' of an md/raid array where
the whole array is read and consistancies are reported.
This uses the same mechanisms as 'resync' and so reports in the
kernel logs that a resync is being started.
This understandably confuses/worries people.
Also the text in /proc/md
raid1, raid10 and multipath don't report their 'congested' status
through bdi_*_congested, but should.
This patch adds the appropriate functions which just check the
'congested' status of all active members (with appropriate locking).
raid1 read_balance should be modified to prefer devices where
This is very different from other raid levels and all requests
go through a 'stripe cache', and it has congestion management
already.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 21 +
1 file changed, 21 insertions(+)
diff .prev
md.txt has two sections describing the 'level'
sysfs attribute, and some of the text is out-of-date.
So make just one section, and make it right.
Cc: Christian Kujau <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./Documentation/md.txt | 17 +
I have had enough success reports not to believe that this
is safe for 2.6.19.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/Kconfig | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff .prev/drivers/md/Kconfig ./drivers/md/Kconfig
--- .pre
From: Paul Clements <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./include/linux/compat_ioctl.h |1 +
1 file changed, 1 insertion(+)
diff .prev/include/linux/compat_ioctl.h ./include/linux/compat_ioctl.h
--- .prev/include/linux/compat_ioctl.h 2006-0
From: Paul Clements <[EMAIL PROTECTED]>
find_first_set doesn't find the least-significant bit on bigendian
machines, so it is really wrong to use it.
ffs is closer, but takes an 'int' and we have a 'unsigned long'.
So use ffz(~X) to convert a chunksize into a chunkshift.
Signed-off-by: Neil Br
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/md.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers/md/md.c 2006-09-29 11:49:00.0 +1000
+++ ./drivers/md/md.c 2006-09-29
Once upon a time we needed to fixed limit to the number of md
devices, probably because we preallocated some array.
This need no longer exists, but we still have an arbitrary limit.
So remove MAX_MD_DEVS and allow as many devices as we can fit into the
'minor' part of a device number.
Also remov
There is a nasty bug in md in 2.6.18 affecting at least raid1.
This fixes it (and has already been sent to [EMAIL PROTECTED]).
### Comments for Changeset
This fixes a bug introduced in 2.6.18.
If a drive is added to a raid1 using older tools (mdadm-1.x or
raidtools) then it will be included in
Following are 4 bugfix patches for md.
The first is suitable for 2.6.18.2. All are suitable for 2.6.19.
Thanks,
NeilBrown
[PATCH 001 of 4] md: Fix calculation of ->degraded for multipath and raid10
[PATCH 002 of 4] md: Add another COMPAT_IOCTL for md.
[PATCH 003 of 4] md: Endian annotat
Two less-used md personalities have bugs in the calculation of
->degraded (the extent to which the array is degraded).
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/multipath.c |2 +-
./drivers/md/raid10.c|2 +-
2 files changed, 2 insertions(+), 2
Includes a couple of bugfixed found by sparse.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/md.c | 13 +
./include/linux/raid/md_p.h | 58 ++--
2 files changed, 36 insertions(+), 35 deletions(-)
dif
And a couple of bug fixes found by sparse.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/bitmap.c | 10 +-
./include/linux/raid/bitmap.h | 20 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
diff .prev/drivers/md/bitm
.. so that you can use bitmaps with 32bit userspace on a
64 bit kernel.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./include/linux/compat_ioctl.h |1 +
1 file changed, 1 insertion(+)
diff .prev/include/linux/compat_ioctl.h ./include/linux/compat_ioctl.h
--- .prev/in
I rang my regression test suite on md for the first time in a
while (obviously too long :-().
Found two bugs resulting in patches 1 and 3.
Others are fixes for more subtle issues.
All patches are suitable for 2.6.19, patch 1 is quite serious and should go in
2.6.18.2.
Thanks,
NeilBrown
If save_raid_disk is >= 0, then the device could be a device that is
already in sync that is being re-added. So we need to default this
value to -1.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/md.c |1 +
1 file changed, 1 insertion(+)
diff .prev/driver
A recent fix which made sure ->degraded was initialised properly
exposed a second bug - ->degraded wasn't been updated when drives
failed or were hot-added.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/multipath.c |2 ++
1 file changed, 2 insertions(+)
dif
When "mdadm --grow --size=xxx" is used to resize an array (use more or
less of each device), we check the new siza against the available
space in each device.
The already have that number recorded in rdev->size, so calculating it
is pointless (and wrong in one obscure case).
Signed-off-by: Neil
From: Randy Dunlap <[EMAIL PROTECTED]>
drivers/md/raid1.c:1479: warning: long long unsigned int format, long unsigned
int arg (arg 4)
drivers/md/raid10.c:1475: warning: long long unsigned int format, long unsigned
int arg (arg 4)
Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
Signed-off-by: Ne
This would be good for 2.6.19 and even 18.2, if it is seens acceptable.
raid0 at least (possibly other) can be made to Oops with a bad partition
table and best fix seem to be to not let out-of-range request get down
to the device.
### Comments for Changeset
Partitions are not limited to live wit
sts. These patches
are largely due to "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>.
NeilBrown
[PATCH 001 of 6] md: Send online/offline uevents when an md array starts/stops.
[PATCH 002 of 6] md: Change lifetime rules for 'md' devices.
[PATCH 003 of 6] md: Define raid5_
This allows udev to do something intelligent when an
array becomes available.
cc: [EMAIL PROTECTED]
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/md.c |2 ++
1 file changed, 2 insertions(+)
diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers/md/m
Currently md devices are created when first opened and remain in existence
until the module is unloaded.
This isn't a major problem, but it somewhat ugly.
This patch changes the lifetime rules so that an md device will
disappear on the last close if it has no state.
Locking rules depend on bd_mu
If a bypass-the-cache read fails, we simply try again through
the cache. If it fails again it will trigger normal recovery
precedures.
cc: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 150 +
This will encourage read request to be on only one device,
so we will often be able to bypass the cache for read
requests.
cc: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 24
1 fi
Call the chunk_aligned_read where appropriate.
cc: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c |5 +
1 file changed, 5 insertions(+)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drive
cc: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 78 +++
1 file changed, 78 insertions(+)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers
resends with attribution improved.
Thanks,
NeilBrown
[PATCH 001 of 9] md: Change ONLINE/OFFLINE events to a single CHANGE event
[PATCH 002 of 9] md: Fix sizing problem with raid5-reshape and CONFIG_LBD=n
[PATCH 003 of 9] md: Do not freeze md threads for suspend.
[PATCH 004 of 9] md: Tidy up
I forgot to has the size-in-blocks to (loff_t) before shifting up to a
size-in-bytes.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/d
From: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
If a bypass-the-cache read fails, we simply try again through
the cache. If it fails again it will trigger normal recovery
precedures.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 150 +++
Currently md devices are created when first opened and remain in existence
until the module is unloaded.
This isn't a major problem, but it somewhat ugly.
This patch changes the lifetime rules so that an md device will
disappear on the last close if it has no state.
Locking rules depend on bd_mu
From: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 78 +++
1 file changed, 78 insertions(+)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/driv
From: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
This will encourage read request to be on only one device,
so we will often be able to bypass the cache for read
requests.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c | 24
1
An md array can be stopped leaving all the setting still in place,
or it can torn down and destroyed.
set_capacity and other change notifications only happen in the latter
case, but should happen in both.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/md.c | 1
It turns out that CHANGE is preferred to ONLINE/OFFLINE for various reasons
(not least of which being that udev understands it already).
So remove the recently added KOBJ_OFFLINE (no-one is likely to care
anyway) and change the ONLINE to a CHANGE event
Cc: Kay Sievers <[EMAIL PROTECTED]>
Signed-
From: "Raz Ben-Jehuda(caro)" <[EMAIL PROTECTED]>
Call the chunk_aligned_read where appropriate.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c |5 +
1 file changed, 5 insertions(+)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/dri
From: "Rafael J. Wysocki" <[EMAIL PROTECTED]>
If there's a swap file on a software RAID, it should be possible to use this
file for saving the swsusp's suspend image. Also, this file should be
available to the memory management subsystem when memory is being freed before
the suspend image is cr
stripe_to_pdidx finds the index of the parity disk for a given
stripe.
It assumes raid5 in that it uses "disks-1" to determine the number
of data disks.
This is incorrect for raid6 but fortunately the two usages cancel each
other out. The only way that 'data_disks' affects the calculation of
pd_
and a few other bugs I found while
re-reviewing and re-testing this code. There are actually about 9
separate bugs here, but I grouped some of them to avoid having lots
of tiny patches.
NeilBrown
[PATCH 001 of 4] md: Fix innocuous bug in raid6 stripe_to_pdidx
[PATCH 002 of 4] md: Fix newly
1/ When aligned requests fail (read error) they need to be retried
via the normal method (stripe cache). As we cannot be sure that
we can process a single read in one go (we may not be able to
allocate all the stripes needed) we store a bio-being-retried
and a list of bioes-that-stil
chunk_aligned_read and retry_aligned_read assume that
data_disks == raid_disks - 1
which is not true for raid6.
So when an aligned read request bypasses the cache, we can get the wrong data.
Also change the calculate of raid_disks in compute_blocknr to make it
more obviously correct.
Signed-
1/ We don't de-reference the rdev when the read completes.
This means we need to record the rdev to so it is still
available in the end_io routine. Fortunately
bi_next in the original bio is unused at this point so
we can stuff it in there.
2/ We leak a cloned by if the target rdev i
There are some vestiges of old code that was used for bypassing the
stripe cache on reads in raid5.c. This was never updated after the
change from buffer_heads to bios, but was left as a reminder.
That functionality has nowe been implemented in a completely different
way, so the old code can go.
Following are 5 patches for md in 2.6.19-rc6-mm2 that are suitable for 2.6.20.
Patch 4 might fix an outstanding bug against md which manifests as an
oops early in boot, but I don't have test results yet.
NeilBrown
[PATCH 001 of 5] md: Remove some old ifdefed-out code from raid5.c
[PATC
For each md device, we need a gendisk. As that gendisk has a name
that gets registered in sysfs, we need to make sure that when an md
device is shut down, we don't create it again until the shutdown is
complete and the gendisk has been deleted.
This patches utilises the disks_mutex to ensure the
Fix few bugs that meant that:
- superblocks weren't alway written at exactly the right time (this
could show up if the array was not written to - writting to the array
causes lots of superblock updates and so hides these errors).
- restarting device recovery after a clean shutdown (ve
As md devices a automatically created on first open, and automatically
destroyed on last close if they have no significant state, a loop can
be caused with udev.
If you open/close an md device that will generate add and remove
events to udev. udev will open the device, notice nothing is there
an
Currently raid5 depends on clearing the BIO_UPTODATE flag to signal an
error to higher levels. While this should be sufficient, it is safer
to explicitly set the error code as well - less room for confusion.
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/raid5.c
### Comments for Changeset
Thanks Jens for alerting me to this.
Cc: Jens Axboe <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./drivers/md/faulty.c |2 +-
./drivers/md/raid1.c |2 +-
./drivers/md/raid10.c |6 +++---
./dri
Following patch is suitable for 2.6.20. It fixes some minor bugs that
need to be fix in order to use new functionality in mdadm-2.6.
Thanks,
NeilBrown
### Comments for Changeset
While developing more functionality in mdadm I found some bugs in md...
- When we remove a device from an inactive
Following are 4 patches suitable for inclusion in 2.6.20.
Thanks,
NeilBrown
[PATCH 001 of 4] md: Update email address and status for MD in MAINTAINERS.
[PATCH 002 of 4] md: Make 'repair' actually work for raid1.
[PATCH 003 of 4] md: Make sure the events count in an md array never r
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
### Diffstat output
./MAINTAINERS |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff .prev/MAINTAINERS ./MAINTAINERS
--- .prev/MAINTAINERS 2007-01-23 11:14:14.0 +1100
+++ ./MAINTAINERS 2007-01-23 11:23:03.0 +1
In most cases we check the size of the bitmap file before
reading data from it. However when reading the superblock,
we always read the first PAGE_SIZE bytes, which might not
always be appropriate. So limit that read to the size of the
file if appropriate.
Also, we get the count of available b
When 'repair' finds a block that is different one the various
parts of the mirror. it is meant to write a chosen good version
to the others. However it currently writes out the original data
to each. The memcpy to make all the data the same is missing.
Signed-off-by: Neil Brown <[EMAIL PROTECTE
Now that we sometimes step the array events count backwards
(when transitioning dirty->clean where nothing else interesting
has happened - so that we don't need to write to spares all the time),
it is possible for the event count to return to zero, which is
potentially confusing and triggers and M
Another md patch suitable for 2.6.20.
Thanks,
NeilBrown
### Comments for Changeset
If a GFP_KERNEL allocation is attempted in md while the mddev_lock is
held, it is possible for a deadlock to eventuate.
This happens if the array was marked 'clean', and the memalloc triggers
a write-
One more... (sorry about the dribs-and-drabs approach)
NeilBrown
### Comments for Changeset
raid5_mergeable_bvec tries to ensure that raid5 never sees a read
request that does not fit within just one chunk. However as we
must always accept a single-page read, that is not always possible.
So
hardware-xor patches - one line
of context is different.
Patch 1 should probably go in -stable - the bug could cause data
corruption in a fairly uncommon raid10 configuration, so that one and
this intro are Cc:ed to [EMAIL PROTECTED]
Thanks,
NeilBrown
[PATCH 001 of 6] md: Fix raid10 recovery problem
1 - 100 of 419 matches
Mail list logo