summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Be more insistent on destroying geoms at unload time. Still not perfect,phk2004-03-111-2/+8
| | | | | | | | 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.
* Rearrange some of the GEOM debugging tools to be more structured.phk2004-03-105-90/+71
| | | | | | | | | | | | | | | | | | 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.
* - Don't take sectorsize from first disk. Calculate it by findingpjd2004-03-091-19/+48
| | | | | | | 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.
* Print a space character between string given as a macro argument andpjd2004-03-091-0/+1
| | | | bio description.
* Don't panic on providers already withered when we wither a geom.phk2004-03-071-1/+2
|
* kthread_exit() no longer requires Giant, so don't force callers to acquirejhb2004-03-051-1/+0
| | | | | | Giant just to call kthread_exit(). Requested by: many
* Correct year in copyrights.pjd2004-03-042-2/+2
|
* - Remove d_valid field, we can use d_consumer field to check if diskpjd2004-03-032-10/+7
| | | | | is valid. - Use SYSCTL_DECL() instead of using own, ugly extern.
* Removed unused fields.pjd2004-03-011-2/+0
|
* We don't need d_length field.pjd2004-03-011-2/+0
|
* Even if we're sure that we can't be orphaned here, we have to definepjd2004-02-271-1/+2
| | | | | | | | | orphan field - we're enforcing it in GEOM. This will reach KASSERT in INVARIANTS case. Add missing space. Approved by: scottl (mentor)
* Remove unused field.pjd2004-02-271-1/+0
| | | | Approved by: scottl (mentor)
* Device megapatch 4/6:phk2004-02-212-1/+4
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Introduce CONCAT GEOM class for disk concatenation.pjd2004-02-192-0/+862
| | | | | | | It allows manual and automatic (based on on-disk metadata) concatenation. Reviewed by: phk, scottl Approved by: scottl (mentor)
* Change the disk(9) API in order to make device removal more robust.phk2004-02-182-25/+37
| | | | | | | | | | | | | | | | | | | | | | | | Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing. Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called. Unfortunately, this results in a ton of "s/\./->/" changes to device drivers. Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time: The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future. Manual page update to follow shortly.
* Do not check error code from closing ->access() calls, we know they succeed.phk2004-02-143-8/+9
|
* Add a KASSERT which checks that a class never fails a closing ->access()phk2004-02-141-0/+3
| | | | call.
* Remove the absolute count g_access_abs() function since experience hasphk2004-02-1216-69/+53
| | | | | | | | | | | | shown that it is not useful. Rename the relative count g_access_rel() function to g_access(), only the name has changed. Change all g_access_rel() calls in our CVS tree to call g_access() instead. Add an #ifndef BURN_BRIDGES #define of g_access_rel() for source code compatibility.
* Give both consumers and providers a {void *private, u_int index} whichphk2004-02-121-1/+8
| | | | the implementing class can use to hang internal info from.
* Added g_print_bio() function to print informations about given bio.pjd2004-02-112-0/+35
| | | | Approved by: phk, scottl (mentor)
* Now we have g_topology_assert_not(), so use it to detect deadlocks.pjd2004-02-101-1/+1
| | | | Approved by: phk, scottl (mentor)
* Added macro which will be used to assert, that the topology lock is not held.pjd2004-02-101-0/+6
| | | | Approved by: phk, scottl (mentor)
* don't call sbuf_clear() right after sbuf_new(), it is not necessary.phk2004-02-103-6/+0
|
* Polish the work/state engine in preparation for HW-crypto support.phk2004-02-081-64/+65
|
* Add a missing error case return.phk2004-02-081-0/+1
| | | | Problem reported by: Flemming Jacobsen <fj@batmule.dk>
* We don't need to hold Giant to create the worker kthread.phk2004-02-071-2/+0
|
* Allow decreasing access count even if there is no disk anymore.pjd2004-02-061-3/+11
| | | | | | This will allow closing disks that were removed while opened. Approved by: phk, scottl (mentor)
* Fix memory leak.le2004-02-061-1/+1
| | | | | | PR: kern/58634 Submitted by: le Approved by: phk
* Allow a GEOM class to unload if it has no geoms or a method function tophk2004-02-021-1/+6
| | | | | | get rid of them. Prodded by: pjd
* - Use proper names in KASSERTs.pjd2004-02-021-6/+6
| | | | | | - Typos. Approved by: phk, scottl (mentor)
* Check error return from g_clone_bio(). (netchild@)phk2004-02-021-6/+8
| | | | | | Rearrange code to avoid duplication (phk@) Submitted by: netchild@
* Don't mingle malloc/g_event flags.phk2004-02-021-5/+8
| | | | Spotted by: pjd@
* Bring back the geom_bioqueues, they _are_ a good idea.phk2004-01-281-0/+27
| | | | ATA will uses these RSN.
* Make sure to keep track of canceled events.phk2004-01-231-0/+2
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Add KASSERTS.phk2004-01-231-0/+11
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Plug an insignificant memoryleak.phk2004-01-231-0/+3
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Add missing newline in printf.phk2004-01-231-1/+1
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Remove the MD5_KEY debugging toolphk2004-01-231-33/+0
|
* Remove no longer necessary debug printfsphk2004-01-231-6/+0
|
* Print the correct pointer in a KASSERT.phk2004-01-111-1/+1
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* KASSERT against no-op access requests.phk2004-01-091-0/+1
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Prevent withering of the provider we're orphaning from happening untilphk2003-12-231-1/+7
| | | | | | we do it ourselves. Nailed by: Simon Heath <heath@cng.fr>
* Correct usage of mtx_init() API. This is not a functional change sincetruckman2003-12-072-3/+3
| | | | | | the code happened to work because MTX_DEF and NULL are both defined as 0. Reviewed by: phk
* KASSERT against multiple orphanings of providers.phk2003-12-072-0/+5
|
* Re-arrange and consolidate some random debugging stuffscottl2003-12-073-33/+1
|
* Call class->init() an class->fini() while the class is hooked up,phk2003-11-181-3/+5
| | | | | | | | | | | rather than right before and right after. This allows these routines to manipulate the mesh. KASSERT that nobody creates a geom on an alien class. Assert topology in g_valid_obj(). Approved by: re@
* Fix a harmless bug and add a ')' in a debugging printf.phk2003-11-181-2/+2
| | | | Submitted by: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
* This is a crude bandaid for 5.2 to protect against providers which disappearphk2003-11-151-0/+38
| | | | | while being tasted. I can moderately easy trigger this with atapi-cd, but I do not fully understand the circumstances.
* Make sure to return errors if we have any.phk2003-11-121-1/+1
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Close the right consumers if we run into trouble opening them all.phk2003-10-241-1/+1
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
OpenPOWER on IntegriCloud