Commit Graph

712 Commits

Author SHA1 Message Date
pjd
9b7cadd593 Remove unused macro. 2004-07-13 12:01:29 +00:00
pjd
8d2fee9da1 Decrease log level of one debug message, so there is no hole (level 2
wasn't used at all).
2004-07-13 12:01:11 +00:00
pjd
c684a2d6ed Minor sysctl description fixes.
Submitted by:	simon
2004-07-13 11:23:31 +00:00
pjd
227209a4da Implement "FAST" mode for GEOM_STRIPE class and turn it on by default.
In this mode you can setup even very small stripe size and you can be
sure that only one I/O request will be send to every disks in stripe.
It consumes some more memory, but if allocation fails, it will fall
back to "ECONOMIC" mode.

It is about 10 times faster for small stripe size than "ECONOMIC" mode
and other RAID0 implementations. It is even recommended to use this
mode and small stripe size, so our requests are always splitted.

One can still use "ECONOMIC" mode by setting kern.geom.stripe.fast to 0.
It is also possible to setup maximum memory which "FAST" mode can consume,
by setting kern.geom.stripe.maxmem from /boot/loader.conf.
2004-07-09 14:30:09 +00:00
phk
5be6baa85c Only detach consumers which are attached when we wither stuff away.
Pointed out by:	pjd
2004-07-09 14:06:17 +00:00
phk
042d10f8ef Make withering water tight.
When we orphan/wither a provider, an attached geom+consumer could
end up being withered as a result and it may be in front of us in
the normal object scanning order so we need to do multi-pass.  On
the other hand, there may be withering stuff we can't get rid off
(yet), so we need to keep track of both the existence of withering
stuff and if there is more we can do at this time.
2004-07-08 16:17:14 +00:00
phk
a0a0195602 Fail normally rather than KASSERT if attempt to open a spoiled consumer. 2004-07-08 10:34:09 +00:00
pjd
28129f07e4 Add missing argument. 2004-07-06 17:06:54 +00:00
pjd
67f23990b6 Properly free resources if g_access() fails. 2004-07-06 16:29:32 +00:00
pjd
7822814115 - Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous.
- Update manual pages and extend examples.
- Bump versions.
2004-07-05 21:16:37 +00:00
pjd
c3fce26a1f g_clone_bio() can fail, be ready for this.
Approved by:	le
2004-07-05 13:24:22 +00:00
phk
0b5402fc6b We only need to check for overlaps if we increasing access counts. 2004-07-04 13:44:48 +00:00
pjd
7f4ea6942f Introduce GEOM_LABEL class.
This class is used for detecting volume labels on file systems:
UFS, MSDOSFS (FAT12, FAT16, FAT32) and ISO9660.
It also provide native labelization (there is no need for file system).

g_label_ufs.c is based on geom_vol_ffs from Gordon Tetlow.
g_label_msdos.c and g_label_iso9660.c are probably hacks, I just found
where volume labels are stored and I use those offsets here,
but with this class it should be easy to do it as it should be done by
someone who know how.
Implementing volume labels detection for other file systems also should
be trivial.

New providers are created in those directories:
/dev/ufs/ (UFS1, UFS2)
/dev/msdosfs/ (FAT12, FAT16, FAT32)
/dev/iso9660/ (ISO9660)
/dev/label/ (native labels, configured with glabel(8))

Manual page cleanups and some comments inside were submitted by
Simon L. Nielsen, who was, as always, very helpful. Thanks!
2004-07-02 19:40:36 +00:00
pjd
3c23c61888 Remove unused argument for good. 2004-07-01 15:42:03 +00:00
pjd
0d5a48eb8a Free only if pointer isn't NULL. 2004-07-01 12:42:13 +00:00
phk
474032642a Fix regression in last commit. 2004-06-29 08:33:58 +00:00
phk
949e8d87fe Make sure to kill the devstat entry for disappearing disks.
PR:	68074
Submitted by:	Hendrik Scholz <hscholz@raisdorf.net>
2004-06-27 20:53:20 +00:00
pjd
8395a82f93 Introduce a hack that will make geom_gate to work with read-only mounts.
Now, when trying to mount file system in read-only mode it tries to
opened a device for writting to be able to update to read-write mode
latter. Ehh.

Discussed with:	phk
2004-06-27 12:56:11 +00:00
rwatson
ddb1bad6a3 The g_up and g_down threads use a local 'mymutex' mutex to allow WITNESS
to warn about attempts to sleep in the I/O path.  This change pushes the
definition and use of 'mymutex' behind #ifdef WITNESS to avoid the cost
in non-debugging cases.  This results in a clear .22% performance win for
512 byte and 1k I/O tests on my SMP test box.  Not much, but every bit
counts.
2004-06-26 23:27:42 +00:00
le
d754d951b9 Mark a plex as 'newborn' when it is created. This is used to indicate
that new RAID5 plexes need to be initialized first.
2004-06-25 18:04:33 +00:00
pjd
3483cf5337 Don't force class to give a valid softc to g_slice_new(), it is not always
needed.

Approved by:	phk
2004-06-24 10:50:20 +00:00
csjp
7e172b8cb6 Currently, if the drives specified for volume creation are
not active GEOM providers, it will result in a kernel panic.

If the GEOM provider or disk goes away before the volume
configuration data gets written to the disk, it will result
in another kernel panic.

o Make sure that the drives specified for volume creation
  are active GEOM providers.

o When writing out volume configuration data to associated drives,
  make sure that the GEOM provider is active, otherwise continue
  to the next drive in the volume.

Approved by:	le, bmilekic (mentor)
2004-06-24 02:40:34 +00:00
le
9eb205c8da Add a function to clean up RAID5 packets and use it when I/O has
finished or when building the complete packet fails.
2004-06-23 23:52:55 +00:00
le
b6dc252aa6 Remove two debugging printfs that are currently rather disturbing
than helpful.
2004-06-23 22:32:01 +00:00
le
6c59c5fae6 Accept "sd len 0" and auto-size the subdisk correctly.
Spotted by: csjp
2004-06-23 21:15:55 +00:00
le
e2e28b4745 No need to free the softc, because it wasn't allocated. 2004-06-22 18:13:43 +00:00
le
853033de65 Don't sleep in the g_down path. More error checks to come. 2004-06-22 14:54:31 +00:00
phk
d0b5788749 Kill g_access_rel() already now before we send it down 5-stable 2004-06-21 20:31:49 +00:00
pjd
78f7239eef Don't hold topology lock while calling g_gate_release().
Found by:	KASSERT()
2004-06-21 09:12:08 +00:00
phk
07d9a77b87 Duplicate the securelevel check from spec_vnops.c here. 2004-06-19 09:00:53 +00:00
le
b7f1bee2cf Clean up allocated ressources when destroying the main vinum geom. 2004-06-18 19:53:33 +00:00
phk
7dd1d04ac0 Reduce the thaumaturgical level of root filesystem mounts: Instead of using
an otherwise redundant clone routine in geom_disk.c, mount a temporary
DEVFS and do a proper lookup.

Submitted by:	thomas
2004-06-17 21:24:13 +00:00
phk
40dd98a3bd Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
le
c2c39c8956 Handle dead disks in a somewhat sane way. 2004-06-16 14:41:04 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
le
69fc473ab3 Fix several bugs related to subdisk drive_offset calculation. 2004-06-15 20:56:25 +00:00
le
7429d59ed6 Don't free a VINUMDRIVE softc when it's orphaned or spoiled. All
allocated ressouces should be ultimately freed in gv_destroy_geom()
(when unloading the module and not earlier), but I need to look at this
more closely.
2004-06-14 17:12:32 +00:00
le
57fad3e864 Correctly calculate subdisk offset in RAID5 plexes. 2004-06-14 17:06:55 +00:00
le
cf31d52b42 Add a first version of a GEOMified vinum. 2004-06-12 21:16:10 +00:00
phk
e6a8fb50df Make the sysctl kern.geom.collectstats more granular.
Bit 0 controls statistics collection on GEOM providers.
Bit 1 controls statistics collection on GEOM consumers.

Default value is 1.

Prodded by:	scottl
2004-06-09 19:44:44 +00:00
pjd
cffa6fd685 Fix format string. 2004-06-07 13:40:40 +00:00
pjd
3b62f6e040 Don't allow for duplicated entries creation. 2004-06-07 13:33:09 +00:00
joerg
b2404db737 Add SVR4-compatible VTOC-style elements to the Sun label. The
FreeBSD kernel doesn't use them but sunlabel(8) shortly will,
and both these files are used by sunlabel(8).
2004-06-01 20:18:25 +00:00
phk
623c8fe8d0 Zap a redundant NULL 2004-05-30 18:04:06 +00:00
pjd
4a04a3b007 Dump some more informations:
- device state
	- list of used providers
	- total number of disks
	- number of disks online

Prodded by:	Alex Deiter <tiamat@komi.mts.ru>
2004-05-26 11:36:27 +00:00
pjd
b400b04c05 - Change command name from 'config' to 'configure'.
- Bump version number.
2004-05-21 15:23:48 +00:00
pjd
f44a01349d - Teach CONCAT class how to talk with geom(8).
- Remove provider if any disk was lost.
- Dump CONCAT version.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:40:18 +00:00
pjd
86dae1fb27 Introduce STRIPE GEOM class. It implements RAID0 transformation and it
is intend to be fast. Just like CONCAT class it provides manual and
auto configuration methods.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:20:49 +00:00
pjd
90c2eca016 Introduce NOP GEOM class. This is totally transparent GEOM class, but
it is very useful for tests. One is able to destroy its provider
forcibly if wants to test how other class handle such events.
One is also able to specify failure probability to check how other
classes handle I/O errors.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:15:53 +00:00
sos
492da9f785 Dont try to finish devstat's if the disk pointer is NULL, this can happen
when a disk has been destroyed but still has outstanding bio's.

Reviewed by:	phk
2004-05-11 13:17:40 +00:00