(This should be merged with fix-occasional-deadlock-in-raid5.patch)
As we don't call stripe_handle in make_request any more, we need to
clear STRIPE_DELAYED to (previously done by stripe_handle) to ensure
that we test if the stripe still needs to be delayed or not.
Signed-off-by: Neil Brown
Finish ITERATE_ to for_each conversion.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c |8
./include/linux/raid/md_k.h | 14 --
2 files changed, 8 insertions(+), 14 deletions(-)
diff .prev/drivers/md/md.c
Currently, a given device is claimed by a particular array so
that it cannot be used by other arrays.
This is not ideal for DDF and other metadata schemes which have
their own partitioning concept.
So for externally managed metadata, just claim the device for
md in general, require that offset
happier about this patch. It introduced a
performance regression and I now understand why. I'm now happy for
that patch with this fix to go into 2.6.24 if that is convenient (If
not, 2.6.24.1 will do).
Thanks,
NeilBrown
[PATCH 001 of 4] md: Set and test the -persistent flag for md devices more
If you try to start an array for which the number of raid disks is
listed as zero, md will currently try to read metadata off any devices
that have been given. This was done because the value of raid_disks
is used to signal whether array details have been provided by
userspace (raid_disks 0) or
,
NeilBrown
[PATCH 001 of 6] md: Fix an occasional deadlock in raid5
[PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md
array.
[PATCH 003 of 6] md: Change a few 'int' to 'size_t' in md
[PATCH 004 of 6] md: Change INTERATE_MDDEV to for_each_mddev
[PATCH 005 of 6] md: Change
As this is more consistent with kernel style.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers/md/md.c 2008-01-14
as this is morein line with common practice in the kernel.
Also swap the args around to be more like list_for_each.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/bitmap.c |4 +-
./drivers/md/faulty.c |2 -
./drivers/md/linear.c |2 -
Finish ITERATE_ to for_each conversion.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c |8
./include/linux/raid/md_k.h | 14 --
2 files changed, 8 insertions(+), 14 deletions(-)
diff .prev/drivers/md/md.c
This patch fixes a fairly serious bug in md/raid5 in 2.6.23 and 24-rc.
It would be great if it cold get into 23.13 and 24.final.
Thanks.
NeilBrown
### Comments for Changeset
We currently do not wait for the block from the missing device
to be computed from parity before copying data to the new
Following are 7 md related patches are suitable for the next -mm
and maybe for 2.6.25.
They move towards giving user-space programs more fine control of an
array so that we can add support for more complex metadata formats
(e.g. DDF) without bothering the kernel with such things.
The last patch
- Add a state flag 'external' to indicate that the metadata is managed
externally (by user-space) so important changes need to be
left of user-space to handle.
Alternates are non-persistant ('none') where there is no stable metadata -
after the array is stopped there is no record of
When a device fails, we must not allow an further writes to the array
until the device failure has been recorded in array metadata.
When metadata is managed externally, this requires some synchronisation...
Allow/require userspace to explicitly remove failed devices
from active service in the
This allows userspace to control resync/reshape progress and
synchronise it with other activities, such as shared access in a SAN,
or backing up critical sections during a tricky reshape.
Writing a number of sectors (which must be a multiple of the chunk
size if such is meaningful) causes a
Currently, a given device is claimed by a particular array so
that it cannot be used by other arrays.
This is not ideal for DDF and other metadata schemes which have
their own partitioning concept.
So for externally managed metadata, just claim the device for
md in general, require that offset
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c |8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers/md/md.c 2007-12-14 16:09:01.0 +1100
+++ ./drivers/md/md.c 2007-12-14
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers/md/md.c 2007-12-14 16:09:03.0 +1100
+++ ./drivers/md/md.c 2007-12-14
Given an fd on a block device, returns a string like
/block/sda/sda1
which can be used to find related information in /sys.
Ideally we should have an ioctl that works on char devices as well,
but that seems far from trivial, so it seems reasonable to have
this until the later can be
From: H. Peter Anvin [EMAIL PROTECTED]
Make both mktables.c and its output CodingStyle compliant. Update the
copyright notice.
Signed-off-by: H. Peter Anvin [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/mktables.c | 43
Following 3 patches for md provide some code tidyup and a small
functionality improvement.
They do not need to go into 2.6.24 but are definitely appropriate 25-rc1.
(Patches made against 2.6.24-rc3-mm2)
Thanks,
NeilBrown
[PATCH 001 of 3] md: raid6: Fix mktable.c
[PATCH 002 of 3] md: raid6
From: H. Peter Anvin [EMAIL PROTECTED]
Date: Fri, 26 Oct 2007 11:22:42 -0700
Clean up the coding style in raid6test/test.c. Break it apart into
subfunctions to make the code more readable.
Signed-off-by: H. Peter Anvin [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat
Currently and md array with a write-intent bitmap does not updated
that bitmap to reflect successful partial resync. Rather the entire
bitmap is updated when the resync completes.
This is because there is no guarentee that resync requests will
complete in order, and tracking each request
commit 4ae3f847e49e3787eca91bced31f8fd328d50496 did not get applied
correctly, presumably due to substantial similarities between
handle_stripe5 and handle_stripe6.
This patch (with lots of context) moves the chunk of new code from
handle_stripe6 (where it isn't needed (yet)) to handle_stripe5.
It appears that a couple of bugs slipped in to md for 2.6.23.
These two patches fix them and are appropriate for 2.6.23.y as well
as 2.6.24-rcX
Thanks,
NeilBrown
[PATCH 001 of 2] md: Fix an unsigned compare to allow creation of bitmaps with
v1.0 metadata.
[PATCH 002 of 2] md: raid5: fix
As page-index is unsigned, this all becomes an unsigned comparison, which
almost always returns an error.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Cc: Stable [EMAIL PROTECTED]
### Diffstat output
./drivers/md/bitmap.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
From: Dan Williams [EMAIL PROTECTED]
ops_complete_biofill() runs outside of spin_lock(sh-lock) and clears the
'pending' and 'ack' bits. Since the test_and_ack_op() macro only checks
against 'complete' it can get an inconsistent snapshot of pending work.
Move the clearing of these bits to
http://bugzilla.kernel.org/show_bug.cgi?id=3277
There is a seq_printf here that isn't being passed a 'seq'.
Howeve as the code is inside #ifdef MD_DEBUG, nobody noticed.
Also remove some extra spaces.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/raid0.c | 10
When an array is started read-only, MD_RECOVERY_NEEDED can be set but
no recovery will be running. This causes 'sync_action' to report the
wrong value.
We could remove the test for MD_RECOVERY_NEEDED, but doing so would
leave a small gap after requesting a sync action, where 'sync_action'
would
From: Iustin Pop [EMAIL PROTECTED]
The 'degraded' attribute is useful to quickly determine if the array is
degraded, instead of parsing 'mdadm -D' output or relying on the other
techniques (number of working devices against number of defined devices, etc.).
The md code already keeps track of
Whenever a read error is found, we should attempt to overwrite with
correct data to 'fix' it.
However when do a 'check' pass (which compares data blocks that are
successfully read, but doesn't normally overwrite) we don't do that.
We should.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
###
This kmem_cache_create is creating a cache that already exists. We
could us the alternate name, just like we do a few lines up.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Cc: Dan Williams [EMAIL PROTECTED]
### Diffstat output
./drivers/md/raid5.c |2 +-
1 file changed, 1 insertion(+), 1
. It applies to current -mm with quite a bit of
fuzz...
Thanks,
NeilBrown
### Diffstat output
./drivers/md/raid5.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c2007-08-30 15:58
When a raid1 array is reshaped (number of drives changed),
the list of devices is compacted, so that slots for missing
devices are filled with working devices from later slots.
This requires the rd%d symlinks in sysfs to be updated.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat
Following 2 patches contain bugfixes for md. Both apply to earlier
kernels, but probably aren't significant enough for -stable (no oops,
no data corruption, no security hole).
They should go in 2.6.23 though.
Thanks,
NeilBrown
[PATCH 001 of 2] md: Make sure a re-add after a restart honours
Commit 1757128438d41670ded8bc3bc735325cc07dc8f9 was slightly bad. If
an array has a write-intent bitmap, and you remove a drive, then readd
it, only the changed parts should be resynced. However after the
above commit, this only works if the array has not been shut down and
restarted.
This is
until now :-(
The remainder are mainly cleaning up code and comments. They could
wait for 2.6.23, but are probably safe to go into 2.6.22 (maybe sit a week in
-mm??)
Thanks,
NeilBrown
[PATCH 001 of 7] md: Avoid overflow in raid0 calculation with large components.
[PATCH 002 of 7] md: Don't
If a raid0 has a component device larger than 4TB, and is accessed on
a 32bit machines, then as 'chunk' is unsigned lock,
chunk chunksize_bits
can overflow (this can be as high as the size of the device in KB).
chunk itself will not overflow (without triggering a BUG).
So change 'chunk' to
It is possible that real data or metadata follows the bitmap
without full page alignment.
So limit the last write to be only the required number of bytes,
rounded up to the hard sector size of the device.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
### Diffstat output
Adding a drive to a linear array seems to have stopped working,
due to changes elsewhere in md, and insufficient ongoing testing...
So the patch to make linear hot-add work in the first place
introduced a subtle bug elsewhere that interracts poorly with
older version of mdadm.
This fixes it all
People try to use raid auto-detect with version-1 superblocks (which
is not supported) and get confused when they are told they have an
invalid superblock.
So be more explicit, and say it it is not a valid v0.90 superblock.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
Don't use 'unsigned' variable to track sync vs non-sync IO, as
the only thing we want to do with them is a signed comparison,
and fix up the comment which had become quite wrong.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c | 35
We current completely trust user-space to set up metadata
describing an consistant array. In particlar, that the metadata,
data, and bitmap do not overlap.
But userspace can be buggy, and it is better to report an error
than corrupt data. So put in some appropriate checks.
Signed-off-by: Neil
bitmap_unplug only ever returns 0, so it may as well be void.
Two callers try to print a message if it returns non-zero, but
that message is already printed by bitmap_file_kick.
write_page returns an error which is not consistently checked. It
always causes BITMAP_WRITE_ERROR to be set on an
Following are two bugfixes for md in current kernels.
The first is suitable for -stable is it can allow drive errors
through to the filesystem wrongly.
Both are suitable for 2.6.22.
Thanks,
NeilBrown
[PATCH 001 of 2] md: Avoid a possibility that a read error can wrongly
propagate through md
When a raid1 has only one working drive, we want read error to
propagate up to the filesystem as there is no point failing the last
drive in an array.
Currently the code perform this check is racy. If a write and a read
a both submitted to a device on a 2-drive raid1, and the write fails
During a 'resync' or similar activity, md checks if the devices in the
array are otherwise active and winds back resync activity when they
are. This test in done in is_mddev_idle, and it is somewhat fragile -
it sometimes thinks there is non-sync io when there isn't.
The test compares the total
Following are 5 patches for md suitable for 2.6.22. None are needed for
-stable.
Thanks
NeilBrown
[PATCH 001 of 5] md: Move test for whether level supports bitmap to correct
place.
[PATCH 002 of 5] md: Stop using csum_partial for checksum calculation in md.
[PATCH 003 of 5] md: Remove
We need to check for internal-consistency of superblock in
load_super. validate_super is for inter-device consistency.
With the test in the wrong place, a badly created array will confuse md
rather an produce sensible errors.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
SLUB doesn't like slashes as it wants to use the cache name
as the name of a directory (or symlink) in sysfs.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/raid5.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff .prev/drivers/md/raid5.c
reshape_position records how much progress has been made on a
reshape (adding drives, changing layout or chunksize).
When it is set, the number of drives, layout and chunksize can have
two possible values, an old an a new.
So allow these different values to be visible, and allow both old and
md currently uses -media_changed to make sure rescan_partitions
is call on md array after they are assembled.
However that doesn't happen until the array is opened, which is later
than some people would like.
So use blkdev_ioctl to do the rescan immediately that the
array has been assembled.
If CONFIG_NET is not selected, csum_partial is not exported, so
md.ko cannot use it.
We shouldn't really be using csum_partial anyway as it is an
internal-to-networking interface.
So replace it with C code to do the same thing. Speed is not
crucial here, so something simple and correct is best.
(This patch should go in 2.6.21 as it fixes a recent regression - NB)
A device can be removed from an md array via e.g.
echo remove /sys/block/md3/md/dev-sde/state
This will try to remove the 'dev-sde' subtree which will deadlock
since
commit e7b0d26a86943370c04d6833c6edba2a72a6e240
With
A minor new feature and 2 bug fixes for md suitable for 2.6.21
The minor feature is to make reshape (adding a drive to an array and
restriping it) work for raid4. The code is all ready, it just wasn't
used.
Thanks,
NeilBrown
[PATCH 001 of 3] md: Allow raid4 arrays to be reshaped.
[PATCH 002
All that is missing the the function pointers in raid4_pers.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/raid5.c |4
1 file changed, 4 insertions(+)
diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c2007-03-23
If this mddev and queue got reused for another array that doesn't
register a congested_fn, this function would get called incorretly.
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c|1 +
./drivers/md/raid5.c |3 ++-
2 files changed, 3
... still not sure why we need this
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c| 41 +++--
./drivers/md/raid5.c | 12 ++--
2 files changed, 41 insertions(+), 12 deletions(-)
diff
### Comments for Changeset
Recent patch for raid6 reshape had a change missing that showed up in
subsequent review.
Many places in the raid5 code used conf-raid_disks-1 to mean
number of data disks. With raid6 that had to be changed to
conf-raid_disk - conf-max_degraded or similar. One place
with the 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
There are two errors that can lead to recovery problems with raid10
when used in 'far' more (not the default).
Due to a '' instead of '=' the wrong block is located which would
result in garbage being written to some random location, quite
possible outside the range of the device, causing the
md tries to warn the user if they e.g. create a raid1 using two partitions
of the same device, as this does not provide true redundancy.
However it also warns if a raid0 is created like this, and there is
nothing wrong with that.
At the place where the warning is currently printer, we don't
The mddev and queue might be used for another array which does not
set these, so they need to be cleared.
Signed-off-by: NeilBrown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/md.c |3 +++
1 file changed, 3 insertions(+)
diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers
From: H. Peter Anvin [EMAIL PROTECTED]
- Use kernel_fpu_begin() and kernel_fpu_end()
- Use boot_cpu_has() for feature testing even in userspace
Signed-off-by: H. Peter Anvin [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
### Diffstat output
./drivers/md/raid6mmx.c | 16 ---
An error always aborts any resync/recovery/reshape on the understanding
that it will immediately be restarted if that still makes sense.
However a reshape currently doesn't get restarted. With this patch
it does.
To avoid restarting when it is not possible to do work, we call
into the
i.e. one or more drives can be added and the array will re-stripe
while on-line.
Most of the interesting work was already done for raid5.
This just extends it to raid6.
mdadm newer than 2.6 is needed for complete safety, however any
version of mdadm which support raid5 reshape will do a good
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-out
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
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 returns
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
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
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
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
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
### 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 +++---
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
[PATCH 002
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
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
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
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
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
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 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
---
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
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
---
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 file
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 | 10
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]
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
---
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
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
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 file
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
---
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
---
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
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(+)
diff
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: Neil
1 - 100 of 328 matches
Mail list logo