summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Dont try to finish devstat's if the disk pointer is NULL, this can happensos2004-05-111-2/+2
| | | | | | when a disk has been destroyed but still has outstanding bio's. Reviewed by: phk
* Close some small wakeup<->msleep races.pjd2004-05-051-2/+4
|
* Fix compilation on 64-bit architectures.pjd2004-05-041-1/+2
| | | | Noticed by: Tinderbox
* Turn off debugging by default.pjd2004-05-031-1/+1
|
* Prefer signed type over unsigned to be able to assert negativepjd2004-05-031-1/+1
| | | | reference count.
* - Hold g_gate_list_mtx lock while generating/checking unit number.pjd2004-05-031-5/+9
| | | | | | Found by: mtx_assert() g_gate.c:273 - Set command before returning to userland with ENOMEM error value. Found by: assert() ggatel.c:108
* Make it compile on 64-bit architectures.pjd2004-05-022-26/+26
| | | | | The biggest issue was that 16-bit atomic operations aren't supported on all architectures.
* Kernel bits of GEOM Gate.pjd2004-04-302-0/+775
|
* Allow disks with a GPT to be used on big-endian machines. The GPT ismarcel2004-04-301-39/+48
| | | | | little-endian by definition and needs byte-swap operations for any multi-byte field. While here fix indentation.
* - Don't check if 'gp' is non-NULL, it always is and GEOM wants topjd2004-04-201-10/+10
| | | | | dump geom configuration when 'pp' and 'cp' are NULL. - Use tabs instead of spaces.
* Calculate bio_completed properly or die!pjd2004-04-041-0/+3
| | | | Approved by: phk
* Move the name attribute to the end of the conftxt line to simplifygrehan2004-04-011-4/+6
| | | | | | libdisk parsing (the name may be empty, or contain spaces). Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
* Move "is consumer attached?" check before G_VALID_PROVIDER() check,pjd2004-03-181-1/+1
| | | | | | | because if consumer is not attached, its provider never will be valid, so we never reach this check. Approved by: phk
* 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>
OpenPOWER on IntegriCloud