Lukas Ertl
df5175af0f
Shuffle around the order in which the components are compiled.
...
This way, the VINUMDRIVE class is loaded before the VINUM class,
but since geom does the tasting for newly arrived classes
last-in-first-out, the VINUM class tastes first.
This removes the need to call gv_parse_config() in the drive
taste path.
2005-08-26 14:40:32 +00:00
Lukas Ertl
fdb9eda84f
Correct the check if a plex is accessible in case it is not up.
...
This makes degraded RAID5 plexes actually work.
2005-08-22 23:24:26 +00:00
Lukas Ertl
664a97517f
Make it possible to remove stale, left-over subdisks.
2005-08-16 15:12:44 +00:00
Lukas Ertl
8cc5eb98ad
Fix a stupid logic bug introduced in geom_vinum_drive.c rev 1.18:
...
When a drive is newly created, it's state is initially set to 'down',
so it won't allow saving the config to it (thus it will never know of
itself being created). Work around this by adding a new flag, that's
also checked when saving the config to a drive.
2005-08-15 17:07:47 +00:00
Lukas Ertl
7ad68986b8
*) Implement round-robin reads for multiplex volumes.
...
*) Plug a possible memory leak. [1]
[1] obtained from: pjd@.
2005-07-15 13:38:06 +00:00
Lukas Ertl
0164489c96
When a drive dies, don't call g_wither_geom() directly, but instead
...
post an event to the geom event queue that will take care of it,
letting outstanding bios finish, and closing the consumers.
Plus some cosmetic clean ups.
2005-05-17 16:38:30 +00:00
Lukas Ertl
bc2d4d6784
Only allow RAID5 plexes to be parity checked.
...
PR: kern/80427
Submitty by: Stijn Hoop <stijn@win.tue.nl>
2005-04-28 13:09:00 +00:00
Lukas Ertl
cf01c54cda
Remove test for zero sectorsize when tasting. This check doesn't
...
seem to be necessary anymore, and it prevents tasting a valid drive
when booting with geom_vinum already loaded, since SCSI disks set their
sectorsize not until first opening them.
2005-03-07 19:58:58 +00:00
Lukas Ertl
9954331c23
Don't allow to synchronize a plex that is already sychronizing.
...
Reset the 'syncing' flag in case of errors, too.
Some cosmetics.
2005-03-04 16:43:40 +00:00
Lukas Ertl
d8688e1117
Correctly calculate what to do and how to retry a request to a plex when
...
the previous one failed and there are more than one plex in the volume.
This could have led to a flood of error messages on the console and
probably a deadlock in certain situations.
2005-02-23 14:59:14 +00:00
Lukas Ertl
3608f72533
In case of drive errors, don't close the associated consumer and
...
detach it, but instead let the geom wither away.
Bump copyright year.
2005-02-17 16:08:36 +00:00
Lukas Ertl
f9b7569c09
Only report state changes of subdisks and plexes when there's
...
really a state change.
Reword the info a bit.
2005-01-21 18:27:23 +00:00
Lukas Ertl
0d93122102
Don't initialize error with ENXIO as we might end up here when
...
the plex has no more consumers (e.g. orphaning).
2005-01-21 18:24:20 +00:00
Lukas Ertl
eba5b9dfce
Rename synchronization and initialization threads and prefix them
...
with 'gv_' for consistency.
2005-01-19 14:49:26 +00:00
Lukas Ertl
f11c507c45
Although an object may already be known in the configuration, it's
...
worker thread may have been destroyed (e.g. during orphaning).
Make sure that objects get back their worker threads when they get a
new geom.
2005-01-19 14:08:16 +00:00
Lukas Ertl
3b6cdf438a
Reset object flags after killing off an object's worker thread.
2005-01-19 13:57:09 +00:00
Warner Losh
fa521b0366
/* -> /*- for copyright notices, minor format tweaks as necessary
2005-01-06 18:27:30 +00:00
Lukas Ertl
997337fd20
Implement 'setstate' to allow setting the state of drives and subdisks
...
for debugging and emergency purposes.
2004-11-26 12:31:36 +00:00
Lukas Ertl
fb5885af37
Implement checkparity/rebuildparity.
2004-11-26 12:01:00 +00:00
Lukas Ertl
fb4e65d035
Move RAID5 offset calculation into a separate function to avoid
...
code duplication.
2004-11-15 13:04:55 +00:00
Lukas Ertl
94175098f1
Share gv_roughlength() between kernel and userland, as we will need it
...
there later.
2004-11-15 12:30:59 +00:00
Lukas Ertl
6c39d46363
Give each plex a separate queue where held back bios are put on.
...
This lowers the CPU usage of the worker thread and prevents a
possible live lock on non-SMP machines.
MFC candidate.
2004-10-26 21:01:42 +00:00
Lukas Ertl
4cb1b18827
Don't allow to create a drive that already exists.
2004-10-02 20:50:21 +00:00
Lukas Ertl
d9d3a74c87
Correctly skip the '/dev/' part when creating new drives and prefix
...
a drive's provider with '/dev/' when printing the config.
Reported by: will@
2004-10-02 20:12:20 +00:00
Lukas Ertl
c3aadfb9d6
Make it possible to rebuild degraded RAID5 plexes. Note that it is
...
currently not possible to do this while the volume is mounted.
MFC in: 1 week
2004-09-30 12:57:35 +00:00
Lukas Ertl
b916fcec4d
Single concat or striped plexes don't need no special initialization
...
if their subdisks are all available, so let them be brought up.
2004-09-18 18:03:20 +00:00
Lukas Ertl
67e3ab6ee5
Re-vamp how I/O is handled in volumes and plexes.
...
Analogous to the drive level, give each volume and plex a worker thread
that picks up and processes incoming and completed BIOs.
This should fix the data corruption issues that have come up a few
weeks ago and improve performance, especially of RAID5 plexes.
The volume level needs a little work, though.
2004-09-18 13:44:43 +00:00
Lukas Ertl
12653dec9d
Give the DRIVE geom a worker thread that picks up incoming bios,
...
sends them down, and takes care of the finished bios. This makes it
easier to handle I/O errors at drive level.
2004-09-13 21:01:36 +00:00
Lukas Ertl
fce2deb197
Rename gv_kill_thread() to gv_kill_plex_thread(), since there are more
...
threads to come.
2004-09-13 17:44:47 +00:00
Lukas Ertl
a0781b98f3
Save the config back to disk when a drive goes down.
2004-09-13 17:33:52 +00:00
Lukas Ertl
ea29a30466
Read a whole sector instead of GV_HDR_LEN, since a sector might be
...
bigger (i.e. on CD-ROMs).
2004-09-13 17:27:58 +00:00
Lukas Ertl
5bad268cdc
Move config_new_drive() to the correct place and rename it to
...
gv_config_new_drive().
2004-08-27 21:32:18 +00:00
Lukas Ertl
4328802ce9
When attaching a consumer from a volume to a plex, check if the
...
volume already has a plex attached and adjust the access counts
of the new consumer accordingly.
2004-08-26 21:04:41 +00:00
Lukas Ertl
a3423d4c6f
Compare the addresses of two RAID5 work packets directly instead
...
of the addresses of their related bios when locking one out, since
they could share a bio and this could lead to parity corruption.
2004-08-23 17:50:18 +00:00
Lukas Ertl
c4bdc6fc32
Implement the possibility to remove drives.
2004-08-22 17:07:55 +00:00
Lukas Ertl
45d0fdcda9
Add forgotten format specifier in a KASSERT and shut up the compiler.
...
Submitted by: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
2004-08-22 13:34:24 +00:00
Lukas Ertl
83bfcb1092
A volume can be up if it has a degraded RAID5 plex.
2004-08-19 12:03:27 +00:00
Lukas Ertl
9a8bd51965
Pretty print some informational messages.
2004-08-18 20:43:56 +00:00
Lukas Ertl
d30f29867e
Fix a stupid bug in the drive taste function: when checking if a
...
drive is known to the configuration check also if it already has a geom.
Without this check several needless geoms are created and valid
configuration data was overwritten.
This change obsoletes the need for a separate geom to taste an
offered provider and the consumer doesn't need to be opened with the
exclusive bit set.
2004-08-18 20:34:45 +00:00
Lukas Ertl
71fd4f60da
Make informational output look less like an accident.
2004-08-14 09:56:17 +00:00
Lukas Ertl
92f49a969d
If we kill the worklist thread of a RAID5 plex we can destroy
...
the worklist mutex at the same time, so move the mtx_destroy() call
to gv_kill_thread().
2004-08-10 20:51:48 +00:00
Lukas Ertl
ecffb8e64b
Lock the topology before calling gv_parse_config, not afterwards.
2004-08-10 20:15:12 +00:00
Poul-Henning Kamp
5721c9c76a
Tag all geom classes in the tree with a version number.
2004-08-08 07:57:53 +00:00
Lukas Ertl
4b017d0d93
Propagate size changes upwards.
2004-07-31 21:34:21 +00:00
Lukas Ertl
663e5a3311
Set the access counts of a subdisk correctly when attaching it
...
to a plex that already has subdisks.
2004-07-30 23:40:38 +00:00
Lukas Ertl
07c424cdaf
Shut up the compiler and temporarily '#if 0' gv_destroy_geom(),
...
until we need it again.
2004-07-29 11:32:09 +00:00
Lukas Ertl
d8a720f9ec
Save the vinum config back to disk after syncing two plexes.
2004-07-26 07:30:21 +00:00
Lukas Ertl
3242376072
There's a chance that the VINUMDRIVE class tastes before the
...
VINUM class, so let the VINUMDRIVE class parse the on-disk
configuration, too.
2004-07-25 23:01:09 +00:00
Lukas Ertl
c291a77678
Use a temporary geom when tasting vinumdrives and lock the 'real'
...
vinumdrive geom with an exclusive bit. This should fix the problem
when underlying partitions overlap (i.e. the 'a' partition is at
the same offset as the 'c' partition).
Ideas borrowed from pjd@, quite a bit of testing by
Matthias Schuendehuette <msch@snafu.de>.
2004-07-24 22:26:40 +00:00
Lukas Ertl
6db345b90e
Disable kldunloading of geom_vinum temporarily until I figured out
...
how to do it correctly.
2004-07-24 19:04:24 +00:00