Commit Graph

692 Commits

Author SHA1 Message Date
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
pjd
6f00e1b72e Close some small wakeup<->msleep races. 2004-05-05 12:30:41 +00:00
pjd
f8606822ff Fix compilation on 64-bit architectures.
Noticed by:	Tinderbox
2004-05-04 07:45:39 +00:00
pjd
2a2290a736 Turn off debugging by default. 2004-05-03 21:11:54 +00:00
pjd
33d1430a62 Prefer signed type over unsigned to be able to assert negative
reference count.
2004-05-03 21:02:02 +00:00
pjd
3a548ca143 - Hold g_gate_list_mtx lock while generating/checking unit number.
Found by:	mtx_assert() g_gate.c:273
- Set command before returning to userland with ENOMEM error value.
	Found by:	assert() ggatel.c:108
2004-05-03 18:06:24 +00:00
pjd
ffc1c33f15 Make it compile on 64-bit architectures.
The biggest issue was that 16-bit atomic operations aren't supported
on all architectures.
2004-05-02 17:57:49 +00:00
pjd
7992868cbb Kernel bits of GEOM Gate. 2004-04-30 16:08:12 +00:00
marcel
55e79a3a58 Allow disks with a GPT to be used on big-endian machines. The GPT is
little-endian by definition and needs byte-swap operations for any
multi-byte field. While here fix indentation.
2004-04-30 05:05:39 +00:00
pjd
39b39ae544 - Don't check if 'gp' is non-NULL, it always is and GEOM wants to
dump geom configuration when 'pp' and 'cp' are NULL.
- Use tabs instead of spaces.
2004-04-20 17:07:55 +00:00
pjd
37382454e0 Calculate bio_completed properly or die!
Approved by:	phk
2004-04-04 20:37:28 +00:00
grehan
1101a7ee87 Move the name attribute to the end of the conftxt line to simplify
libdisk parsing (the name may be empty, or contain spaces).

Submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
2004-04-01 01:33:37 +00:00
pjd
5fae899223 Move "is consumer attached?" check before G_VALID_PROVIDER() check,
because if consumer is not attached, its provider never will be valid,
so we never reach this check.

Approved by:	phk
2004-03-18 07:17:10 +00:00
phk
8940a1c435 Be more insistent on destroying geoms at unload time. Still not perfect,
but it will do (better) for now.

KASSERT that to have providers a class must have an access method.

Tag the new_provider event with the geom as well.
2004-03-11 08:16:23 +00:00
phk
9a7074f4cb Rearrange some of the GEOM debugging tools to be more structured.
Retire g_sanity() and corresponding debugflag (0x8)

  Retire g_{stall,release}_events().

  Under #ifdef DIAGNOSTIC:

    Make g_valid_obj() an official function and have it return an an
    non-zero integer which indicates the kind of object when found.

    Implement G_VALID_{CLASS,GEOM,CONSUMER,PROVIDER}() macros based
    on g_valid_obj().

    Sprinkle calls to these macros liberally over the infrastructure.

    Always check that we do not free a live object.
2004-03-10 08:49:08 +00:00
pjd
e213a22583 - Don't take sectorsize from first disk. Calculate it by finding
least common multiple of all disks sector sizes.
  This will allow to safely concatenate disks with different sector sizes.
- Mark unused function arguments.
- Other minor cleanups.
2004-03-09 11:18:53 +00:00
pjd
635aabbaa2 Print a space character between string given as a macro argument and
bio description.
2004-03-09 11:00:24 +00:00
phk
4b105bbf3a Don't panic on providers already withered when we wither a geom. 2004-03-07 17:33:15 +00:00
jhb
2642ed4029 kthread_exit() no longer requires Giant, so don't force callers to acquire
Giant just to call kthread_exit().

Requested by:	many
2004-03-05 22:42:17 +00:00
pjd
104959c8ef Correct year in copyrights. 2004-03-04 10:22:42 +00:00
pjd
a9cc917261 - Remove d_valid field, we can use d_consumer field to check if disk
is valid.
- Use SYSCTL_DECL() instead of using own, ugly extern.
2004-03-03 22:29:24 +00:00