04 Feb, 2006
3 commits
-
Sometimes it doesn't so make the code more like the version-0 code which
works.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- version-1 superblock
+ The default_bitmap_offset is in sectors, not bytes.
+ the 'size' field in the superblock is in sectors, not KB
- raid0_run should return a negative number on error, not '1'
- raid10_read_balance should not return a valid 'disk' number if
->rdev turned out to be NULL
- kmem_cache_destroy doesn't like being passed a NULL.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
mdu_array_info_t->size is 'int', which isn't big enough for the size (in KB of
each component in) some arrays.So rather than a random overflow, set size to -1 when it cannot be set
correctly.To update aspect on an array, userspace will sometimes:
get_array_info
change one field
set_array_infoin this case, we don't want the '-1' in 'size' to change to size, or look like
a size change at all. So test for that in update_array_info.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Feb, 2006
5 commits
-
This is a fix to the device-mapper-log-bitset-fix-endian patch that
switched to ext2_* versions of the set and clear bit functions. The
find_next_zero_bit function also has to be the ext2 one. Otherwise the
mirror target tries to recover non-existent regions beyond the end of
device.Signed-off-by: Stefan Bader
Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
.. just as we already have for raid5.
Signed-off-by: Neil Brown
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
While a read-only array doesn't not really need a bitmap, we should
not remove the bitmap when switching an array to read-only because
a/ There is no code to re-add the bitmap which switching to read-write,
b/ There is insufficient locking - the bitmap could be accessed while it is
being removed.Cc: Reuben Farrelly
Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
super_1_sync only updates fields in the superblock that might have changed.
'raid_disks' and 'size' could have changed, but this information doesn't get
updated.... until this patch.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
As 'array_size' is a 'sector_t', it may overflow inappropriately when shifted
10 bits. So We should cast it to a loff_t first.There are two places with this problem, but the second (in update_raid_disks)
isn't needed so just remove it:
The only personality that handles ->reshape currently is raid1,
and it doesn't change the size of the array.
When added for raid5/6, reshape again won't change the size of the array,
at least not straight away.
This code might be need for reshaping 'linear' but linear->shape,
if implemented, should probably do the i_size_write itself.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Feb, 2006
7 commits
-
drivers/md/dm-table.c:500: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The snapshot and origin targets are incapable of handling barriers and need to
indicate this.Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Record I/O timing statistics
The start time is added to struct dm_io, an existing structure allocated
privately internally within dm and attached to each incoming bio.We export disk_round_stats() from block/ll_rw_blk.c instead of creating a
private clone.Signed-off-by: Jun'ichi "Nick" Nomura
Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Record basic I/O statistics for mapped devices.
Signed-off-by: Kevin Corry
Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Reduce substantially the amount of code using PF_MEMALLOC, as envisaged in the
original FIXME.If you're using lvm2, for this patch to work correctly you should update to
lvm2 version 2.02.01 or later and device-mapper version 1.02.02 or later.Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Clean up the code responsible for the on-disk mirror logs by using the
set_le_bit test_le_bit functions of ext2. That makes the BE machines keep the
bitmap internally in LE order - it does mean you can't use any other type of
operations on the bitmap words but that looks to be OK in this instance. The
efficiency tradeoff is very minimal as you would expect for something that
ext2 uses.This allows us to remove bits_to_core(), bits_to_disk() and log->disk_bits.
Also increment the mirror log disk version transparently to avoid sharing with
older kernels that suffered from the 64-bit BE bug.Signed-off-by: Patrick Caulfield
Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Move snapshot metadata loading to happen when the table is created instead of
when the device is resumed. Writes to the origin device don't trigger
exceptions until each snapshot table becomes active when resume() is called on
each snapshot.If you're using lvm2, for this patch to work properly you should update to
lvm2 version 2.02.01 or later and device-mapper version 1.02.02 or later.Signed-off-by: Alasdair G Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Jan, 2006
1 commit
-
EDAC requires a way to scrub memory if an ECC error is found and the chipset
does not do the work automatically. That means rewriting memory locations
atomically with respect to all CPUs _and_ bus masters. That means we can't
use atomic_add(foo, 0) as it gets optimised for non-SMPThis adds a function to include/asm-foo/atomic.h for the platforms currently
supported which implements a scrub of a mapped block.It also adjusts a few other files include order where atomic.h is included
before types.h as this now causes an error as atomic_scrub uses u32.Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Jan, 2006
1 commit
-
The 'level' of an md array can be set as either a number of a string. When
one is set, the other must be marked 'undefined'. This wasn't being done
in one place: where new arrays are created.Result: if md1 is a raid1, it is stopped and a raid5 is created there, it
might still appear to be a raid1.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Jan, 2006
1 commit
-
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kbSigned-off-by: Arjan van de Ven
Signed-off-by: Ingo Molnar
Acked-by: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Jan, 2006
1 commit
-
e.g. The sx8 driver uses names like sx8/0.
This would make a md component dev name like
/sys/block/md0/md/dev-sx8/0
which is not allowed. So we change the '/' to '!' just like
fs/partitions/check.c(register_disk) does.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jan, 2006
2 commits
-
DM doesn't need to bounce bio's on its own, but the block layer defaults
to that in blk_queue_make_request(). The lower level drivers should
bounce ios themselves, that is what they need to do if not layered below
dm anyways.Signed-off-by: Jens Axboe
Signed-off-by: Linus Torvalds -
Decrease the number of pointer derefs in drivers/md/multipath.c
Benefits of the patch:
- Fewer pointer dereferences should make the code slightly faster.
- Size of generated code is smaller
- improved readabilitySigned-off-by: Jesper Juhl
Acked-by: Ingo Molnar
Cc: Alasdair G Kergon
Acked-by: NeilBrown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Jan, 2006
1 commit
-
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.Modified-by: Ingo Molnar
(finished the conversion)
Signed-off-by: Jes Sorensen
Signed-off-by: Ingo Molnar
09 Jan, 2006
2 commits
-
Remove various things which were checking for gcc-1.x and gcc-2.x compilers.
From: Adrian Bunk
Some documentation updates and removes some code paths for gcc < 3.2.
Acked-by: Russell King
Signed-off-by: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
HDIO_GETGEO is implemented in most block drivers, and all of them have to
duplicate the code to copy the structure to userspace, as well as getting
the start sector. This patch moves that to common code [1] and adds a
->getgeo method to fill out the raw kernel hd_geometry structure. For many
drivers this means ->ioctl can go away now.[1] the s390 block drivers are odd in this respect. xpram sets ->start
to 4 always which seems more than odd, and the dasd driver shifts
the start offset around, probably because of it's non-standard
sector size.Signed-off-by: Christoph Hellwig
Cc: Jens Axboe
Cc:
Cc: Jeff Dike
Cc: Paolo Giarrusso
Cc: Bartlomiej Zolnierkiewicz
Cc: Neil Brown
Cc: Markus Lidel
Cc: Russell King
Cc: David Woodhouse
Cc: Martin Schwidefsky
Cc: James Bottomley
Signed-off-by: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Jan, 2006
16 commits
-
Also export current (average) speed and status in sysfs.
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Writing major:minor to md/new_dev will bind that device to the array.
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
drivers/md/md.c: In function `offset_show':
drivers/md/md.c:1670: warning: long long unsigned int format, different type arg (arg 3)Cc: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This the role that a device has in an array can be viewed and set.
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Move the checks - that dev size is never less than array size - into
bind_rdev_to_array to make sure it always happens properly (there is one place
where currently it doesn't).Also reject any superblock which claims an array size smaller than the device
in question can hold.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
If array is active, try to reshape, else just set the value.
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Store this total in superblock (As appropriate), and make it available to
userspace via sysfs.Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Allow it to be set to a particular version, or 'none'.
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
... only before array is started of course.
Signed-off-by: Neil Brown
Acked-by: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When we do a user-requested check/repair, we lose count of the outstanding
requests...Also make sure that when anything is written to md/sync_action, the
RECOVERY_NEEDED flag is set and the thread is woken up so any changes take
effect.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When we update a page_cache page in the kernel, we need to flush_dache_page or
userspace might not see the change.Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make the needlessly global function md_new_event() static.
Signed-off-by: Adrian Bunk
Cc: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds