summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_subr.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-121-21/+3
| | | | | | | | | | | | 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.
* 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)
* 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>
* 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>
* 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@
* 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.
* Introduce a per provider wither flagphk2003-10-061-0/+2
|
* Don't panic over the fact that unloading failed if we already knew that.phk2003-08-221-3/+5
|
* Use __FBSDID().obrien2003-06-111-2/+2
| | | | Approved by: phk
* Drop a memory-corruption debugging test-tool.phk2003-06-071-13/+0
|
* Add missing va_end() calls.phk2003-06-071-2/+4
| | | | Noticed by: tmm
* Introduce g_provider_by_name() function, and use it.phk2003-06-041-0/+17
|
* Add a KASSERT to prevent the same GEOM class from being processed loadedphk2003-06-041-0/+6
| | | | | | twice. Enforce that classes should have different names while we are here.
* constify g_sanity()phk2003-06-011-1/+1
|
* Introduce a init and fini member functions on a class.phk2003-05-311-22/+100
| | | | | | | | | Use ->init() and ->fini() to handle the mutex in geom_disk.c Remove the g_add_class() function and replace it with a standardized g_modevent() function. This adds the basic infrastructure for loading/unloading GEOM classes
* Back out all the stuff that didn't belong in the last commit.phk2003-05-021-9/+12
|
* Use g_slice_spoiled() rather than g_std_spoiled().phk2003-05-021-12/+9
| | | | Remember to free the buffer we got from g_read_data().
* Rework the "withering" mechanism:phk2003-05-021-17/+46
| | | | Introduce g_wither_geom() to do the work in one single place.
* Remove the now obsolete geomidorname hack.phk2003-05-011-83/+0
|
* Remove now unneeded special case for "geom.ctl".phk2003-05-011-2/+0
|
* Rename g_call_me() to g_post_event(), and give it a flagphk2003-04-231-4/+5
| | | | argument to determine if we can M_WAITOK in malloc.
* Turn EV_NEW_PROVIDER into a g_call_me() event.phk2003-04-231-2/+31
|
* Convert EV_SPOILED event to use g_call_me().phk2003-04-231-1/+23
|
* Turn the hardwired NEW_CLASS event into a g_call_me() event.phk2003-04-231-2/+33
|
* Remove unused event pointers in object structures.phk2003-04-231-3/+0
| | | | Remove KASSERTS which checked that they were unused.
* Time has run from the "run GEOM in userland" harness, and the new regressionphk2003-04-131-11/+0
| | | | | | | test is built to test GEOM as running in the kernel. This commit is basically "unifdef -D_KERNEL" to remove the mainly #include related code to support the userland-harness.
* If we hit access ahead of a spoil event, we should have negativephk2003-04-121-7/+3
| | | | delta access-counts and proceed.
* Change events to have an array of "void *" references, and give thephk2003-04-021-7/+7
| | | | | | | | | | | event posting functions varargs to fill these. Attribute g_call_me() to appropriate g_geom's where necessary. Add a flag argument to g_call_me() methods which will be used to signal cancellation of events in the future. This commit should be a no-op.
* Only orphan things if the open/close actually succeeded.phk2003-04-021-11/+10
|
* g_class_by_name() was unused too.phk2003-03-251-13/+0
|
* Remove unuse g_insert_geom().phk2003-03-251-38/+0
|
* Introduce g_cancel_events() and use it a couple of places where it makesphk2003-03-231-0/+3
| | | | sense.
* Retire the GEOM private statistics code and use devstat instead.phk2003-03-181-4/+7
|
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-181-1/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* Remove unneeded #include of geom_stats.hphk2003-03-091-1/+0
|
* Don't use statistics counters to detect outstanding I/O.phk2003-03-091-1/+1
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-7/+7
| | | | Approved by: trb
* Implement a handle for efficient implementation of perforations inphk2003-02-121-3/+6
| | | | | | | | | | | | | lower extremities. Setting bit 4 in debugflags (sysctl kern.geom.debugflags=16) will allow any open to succeed on rank#1 providers. This will generally correspond to the physical disk devices: ad0, da0, md0 etc. This fundamentally violates the mechanics of GEOMs autoconfiguration, and is only provided as a debugging facility, so obviously error reports on GEOM where this bit is or has been set will not be accepted.
* Move the g_stat struct to its own .h file, we will export it to other code.phk2003-02-081-3/+7
| | | | | | | | | | | | | | | | | | Insted of embedding a struct g_stat in consumers and providers, merely include a pointer. Remove a couple of <sys/time.h> includes now unneeded. Add a special allocator for struct g_stat. This allocator will allocate entire pages and hand out g_stat functions from there. The "id" field indicates free/used status. Add "/dev/geom.stats" device driver whic exports the pages from the allocator to userland with mmap(2) in read-only mode. This mmap(2) interface should be considered a non-public interface and the functions in libgeom (not yet committed) should be used to access the statistics data.
* Commit the correct copy of the g_stat structure.phk2003-02-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add debug.sizeof.g_stat sysctl. Set the id field of the g_stat when we create consumers and providers. Remove biocount from consumer, we will use the counters in the g_stat structure instead. Replace one field which will need to be atomically manipulated with two fields which will not (stat.nop and stat.nend). Change add companion field to bio_children: bio_inbed for the exact same reason. Don't output the biocount in the confdot output. Fix KASSERT in g_io_request(). Add sysctl kern.geom.collectstats defaulting to off. Collect the following raw statistics conditioned on this sysctl: for each consumer and provider { total number of operations started. total number of operations completed. time last operation completed. sum of idle-time. for each of BIO_READ, BIO_WRITE and BIO_DELETE { number of operations completed. number of bytes completed. number of ENOMEM errors. number of other errors. sum of transaction time. } } API for getting hold of these statistics data not included yet.
* Rename bio_linkage to the more obvious bio_parent.phk2003-02-071-1/+1
| | | | Add bio_t0 timestamp, and include <sys/time.h> where needed
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-7/+7
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* We should not need to hold Giant for sbuf operations any more.phk2002-12-261-4/+0
|
* Constification and some s/int/u_int/ changes.phk2002-12-161-7/+7
|
* Straighten up the geom.ctl config interface definitions.phk2002-11-061-1/+1
| | | | Sponsored by: DARPA & NAI Labs
* Polish a bit here and there.phk2002-11-041-3/+5
| | | | | | Reenable the geom.ctl device so people can play with gbde. Sponsored by: DARPA & NAI Labs
OpenPOWER on IntegriCloud