summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix two old/new consumer confusions.phk2003-10-241-2/+2
| | | | Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Fix a braino memory leak.phk2003-10-221-1/+1
| | | | Found by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
* Forgotten commit: If a provider has zero sectorsize, it is anphk2003-10-221-6/+3
| | | | | | indication of lack of media. Tripped up: peter
* Remove KASSERT check for negative bio_offsets, add "normal" EIOphk2003-10-192-4/+3
| | | | error return for same.
* Retire bio_blkno entirely.phk2003-10-181-1/+0
| | | | | | bio_offset is the field drivers should use. bio_pblkno remains as a convenient place to store the number of the device drivers.
* Assume that bp->bio_offset is correctly initialized.phk2003-10-121-1/+0
| | | | This fixes non-power-of-2 blocksize GEOM I/O.
* Destroy providers maked with G_PF_WITHER when the last consumer has detached.phk2003-10-121-0/+2
|
* Interior decoration changes.phk2003-10-072-42/+39
|
* Allow our bio tools to be used for local bio-chopping by not mandatingphk2003-10-061-2/+7
| | | | | a bio_from value. bio_to is still mandated (mostly for debuggign) and shall be copied from the parent bio.
* Introduce a per provider wither flagphk2003-10-062-0/+3
|
* Return ENODEV in case the driver has no dump routine.phk2003-09-291-0/+4
|
* The present defaults for the open and close for device drivers whichphk2003-09-271-2/+0
| | | | | | | | | | | | | | provide no methods does not make any sense, and is not used by any driver. It is a pretty hard to come up with even a theoretical concept of a device driver which would always fail open and close with ENODEV. Change the defaults to be nullopen() and nullclose() which simply does nothing. Remove explicit initializations to these from the drivers which already used them.
* Add more KASSERTS().phk2003-09-261-0/+6
|
* Be more careful in dumpconf: softc may be NULL for departing devices.phk2003-09-231-3/+6
| | | | Allow drivers to initialize the d_devstat if they want magic params.
OpenPOWER on IntegriCloud