Pawel Jakub Dawidek
dd12956ac7
Geoms without softc are geoms which are initialized, so wait for them.
2004-10-06 18:47:15 +00:00
Pawel Jakub Dawidek
18d2addc23
Look out for geoms without softc.
...
Reported by: tegge
2004-10-06 14:15:47 +00:00
Pawel Jakub Dawidek
59883b3b34
Before root file system is mounted, wait for mirrors in degraded state.
2004-10-05 11:17:08 +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
Pawel Jakub Dawidek
c7e17f4bbe
Unlock g_gate_list_mtx mutex when we cannot allocate unit number.
...
MT5 candidate.
PR: kern/72253
Submitted by: Ivan Voras <ivoras@fer.hr>
2004-10-02 15:03:26 +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
Poul-Henning Kamp
19fa21aa50
Protect the start/end counts on consumers and providers with the up/down
...
mutexes.
Make it possible to also protect the disk statistics (at a minor cost in
performance) by setting bit 2 of kern.geom.collectstats.
2004-09-28 11:56:37 +00:00
Pawel Jakub Dawidek
8dd5480d29
- Set maximum request size to MAXPHYS (128kB), instead of DFLPHYS (64kB).
...
- Set minimum request size to sectorsize, instead of 512 bytes.
Approved by: phk (some time ago)
2004-09-28 08:34:27 +00:00
Pawel Jakub Dawidek
604fce4f60
Just use MAXPHYS as maximum I/O request size, instead of using my own
...
#define for this purpose.
No functional change.
2004-09-28 07:33:37 +00:00
Pawel Jakub Dawidek
e5e7825cc3
Decrease kern.geom.raid3.timeout to 4, so it is smaller than
...
vfs.root.mountdelay by default.
2004-09-27 22:12:14 +00:00
Pawel Jakub Dawidek
6c25233782
Deny invalid I/O requests which comes from userland here, because later
...
we'll get a panic.
MT5 candidate.
Reviewed by: phk
2004-09-27 22:10:01 +00:00
Pawel Jakub Dawidek
d2fb9c62e2
Avoid race while synchronizing components. It is very hard to bump into,
...
but it is possible:
1. Read data from good component for synchronization.
2. Write data to the same area.
3. Write synchronization data, which are now stale.
Found by: tegge (for gmirror)
2004-09-27 20:32:35 +00:00
Pawel Jakub Dawidek
829c0864cb
Minor, but very important condition fix. The current one can never be true.
2004-09-27 19:32:26 +00:00
Pawel Jakub Dawidek
cf41526bdc
Decrease kern.geom.mirror.timeout to 4, so it is smaller than
...
vfs.root.mountdelay by default.
2004-09-27 13:47:37 +00:00
Pawel Jakub Dawidek
0217ba9893
Forgot to commit addition of ds_resync field.
2004-09-26 20:42:35 +00:00
Pawel Jakub Dawidek
e8adbe4499
Avoid race while synchronizing components. It is very hard to bump into,
...
but it is possible:
1. Read data from good component for synchronization.
2. Write data to the same area.
3. Write synchronization data, which are now stale.
Found by: tegge
2004-09-26 20:41:07 +00:00
Pawel Jakub Dawidek
31522023f9
Simplify code a bit.
2004-09-26 20:30:15 +00:00
Poul-Henning Kamp
a7830346e2
Assert topology is held in g_dev_getprovider().
...
Don't call devsw(). It is not necessary, and we do not need to hold dev_lock
to compare the devsw pointer to our own since we do not dereference it.
2004-09-24 06:43:20 +00:00
Pawel Jakub Dawidek
201dfcf143
This is not needed anymore, it is forced in GEOM now.
...
Actually, it can even cause some problems, because GEOM requires sectorsize
to be more than 0 on first access, not on provider creation, so we can skip
valid providers by doing this check here.
Reported by: Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Sven Willenberger <sven@dmv.com>
2004-09-20 17:26:25 +00:00
Max Khon
9cf3607da2
Use correct malloc type when freeing memory allocated by g_read_data.
...
PR: 71431
Submitted by: daichi
2004-09-19 10:27:46 +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
Max Khon
b3f05a2e9e
g_nop_create: destroy newly created provider in case of errors.
2004-09-16 15:28:48 +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
Pawel Jakub Dawidek
7e8ca741ca
Make kern.geom.debugflags sysctl tunable from /boot/loader.conf.
...
It will help to debug problems when booting.
Approved by: phk
2004-09-13 14:58:27 +00:00
Poul-Henning Kamp
4090065137
Fix a problem that shows up if less than the full complement of
...
lock sectors are defined ("number_of_keys" argument to gbde init being
less than 4 in the default compile).
2004-09-11 17:58:53 +00:00
Poul-Henning Kamp
cbca0b53e5
Respect that G_BDE_MAXKEYS is a compile time variable.
2004-09-11 17:57:51 +00:00
Max Khon
51eb0765c6
Do not compile in zlib.c. Add a dependency on module instead.
2004-09-08 17:27:31 +00:00
Pawel Jakub Dawidek
f7b4d339ac
Show current status of mirror device directly.
...
Suggested by: Krzysztof Ciep³ucha <kris@home.pl>
2004-09-08 16:37:22 +00:00
Poul-Henning Kamp
5ae652c0ed
For removable devices without media we set a zero mediasize but a non-zero
...
sectorsize in order to avoid a lot of checks around various divisions etc.
Enforce the sectorsize being > 0 with a KASSERT on successful open.
Fix scsi_cd.c to return 2k sectors when no media inserted.
2004-09-05 21:15:58 +00:00
Pawel Jakub Dawidek
6d7b8aecd3
Allow to configure debug level from /boot/loader.conf.
2004-08-30 18:50:06 +00:00
Poul-Henning Kamp
dcbd0fe5aa
Add more KASSERTS and checks.
2004-08-30 09:33:06 +00:00
Pawel Jakub Dawidek
45d5e85a40
GCC, ehh.
2004-08-29 14:29:30 +00:00
Pawel Jakub Dawidek
c0d68b6ef2
Use sc->sc_mediasize instead of sc->sc_provider->mediasize which contains
...
exactly the same value, but is shorter.
2004-08-28 02:35:43 +00:00
Pawel Jakub Dawidek
08249e9e6e
Warn the user if we are not going to use whole provider space.
...
Requested by: Michael Handler <handler@grendel.net>
2004-08-28 02:34:10 +00:00
Pawel Jakub Dawidek
16ebaa0793
Don't allow to insert providers, which are too small.
...
Reported by: Michael Handler <handler@grendel.net>
2004-08-28 02:02:48 +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
Poul-Henning Kamp
a2033c9615
Introduce g_alloc_bio() as a waiting variant of g_new_bio().
...
Use in places where we can sleep and where we previously failed to check
for a NULL pointer.
MT5 candidate.
2004-08-27 14:43:11 +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
Pawel Jakub Dawidek
29c78ab315
Skip providers with not defined sector size.
...
Reported by: kuriyama
2004-08-26 12:42:47 +00:00
Pawel Jakub Dawidek
4cf67afe37
Log verification errors at level 1.
2004-08-25 19:18:07 +00:00
Pawel Jakub Dawidek
f0c8658d4e
Dump disk number.
2004-08-25 12:14:44 +00:00
Pawel Jakub Dawidek
c8b906bcbe
Allow to set kern.geom.mirror.timeout from /boot/loader.conf.
2004-08-23 20:42:34 +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
Pawel Jakub Dawidek
dba915cfee
Implementation of 'verify reading' algorithm, which uses parity data for
...
verification of regular data when device is in complete state.
On verification error, EIO error is returned for the bio and sysctl
kern.geom.raid3.stat.parity_mismatch is increased.
Suggested by: phk
2004-08-22 16:21:12 +00:00