summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement g_topology_try_lock().pjd2004-12-211-0/+2
| | | | No objection from: phk
* Pass the file->flags down to geom ioctl handlers.phk2004-12-121-2/+3
| | | | | | | | Reject certain ioctls if write permission is not indicated. Bump geom API version. Reported by: Ruben de Groot <mail25@bzerk.org>
* Introduce g_waitidlelock() function which is simlar to g_waitidle(),pjd2004-11-091-0/+1
| | | | | | | but should be called with the topology lock held and returns with the topology lock held and empty event queue. Approved by: phk (sometime ago)
* Add g_wither_geom_close() function.phk2004-10-291-0/+1
|
* Move the prototype for g_waitidle() to a more visible place.phk2004-10-231-1/+0
|
* Introduce g_alloc_bio() as a waiting variant of g_new_bio().phk2004-08-271-0/+1
| | | | | | | Use in places where we can sleep and where we previously failed to check for a NULL pointer. MT5 candidate.
* Give classes a version number and refuse to touch classes which are notphk2004-08-081-0/+13
| | | | | | | | understood. This makes room for additional binary compatibility in the future. Put fields in the class for the geom's methods and initialize the methods of a new geom from these fields. This saves some code in all classes.
* Kill g_access_rel() already now before we send it down 5-stablephk2004-06-211-3/+0
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-1/+2
| | | | Bump __FreeBSD_version accordingly.
* Rearrange some of the GEOM debugging tools to be more structured.phk2004-03-101-8/+22
| | | | | | | | | | | | | | | | | | 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.
* Remove the absolute count g_access_abs() function since experience hasphk2004-02-121-2/+4
| | | | | | | | | | | | 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-111-0/+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)
* KASSERT against multiple orphanings of providers.phk2003-12-071-0/+1
|
* Re-arrange and consolidate some random debugging stuffscottl2003-12-071-1/+0
|
* Introduce a per provider wither flagphk2003-10-061-0/+1
|
* Simplify the ioctl handling in GEOM.phk2003-09-011-16/+3
| | | | | | | | | | | | | | | This replaces the current ioctl processing with a direct call path from geom_dev() where the ioctl arrives (from SPECFS) to any directly connected GEOM class. The inverse of the above is no longer supported. This is the situation were you have one or more intervening GEOM classes, for instance a BSDlabel on top of a MBR or PC98. If you want to issue MBR or PC98 specific ioctls, you will need to issue them on a MBR or PC98 providers. This paves the way for inviting CD's, FD's and other special cases inside GEOM.
* Add the new g_dev_getprovider() function, the swap_pager needs it now.phk2003-08-301-0/+1
| | | | Spotted by: mr
* Improve the root-dev prompt facility for printing devices which couldphk2003-06-071-1/+1
| | | | possibly be a root filesystem.
* Drop a memory-corruption debugging test-tool.phk2003-06-071-4/+0
|
* Introduce g_provider_by_name() function, and use it.phk2003-06-041-0/+1
|
* Simplify the GEOM OAM api: Drop the request type, and let everythingphk2003-06-011-3/+7
| | | | | | | | hinge on the "verb" parameter which the class gets to interpret as it sees fit. Move the entire request into the kernel and move changed parameters back when done.
* constify g_sanity()phk2003-06-011-1/+1
|
* Introduce a init and fini member functions on a class.phk2003-05-311-13/+12
| | | | | | | | | 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
* Remove the G_CLASS_INITIALIZER, we do not need it anymore.phk2003-05-311-8/+2
|
* Add gctl_set_param() function.phk2003-05-041-0/+1
|
* Rework the "withering" mechanism:phk2003-05-021-0/+1
| | | | Introduce g_wither_geom() to do the work in one single place.
* Remove the now obsolete geomidorname hack.phk2003-05-011-24/+0
|
* Introduce a g_waitfor_event() function which posts an event and waits forphk2003-04-231-0/+1
| | | | it to be run (or cancelled) and use this instead of home-rolled versions.
* Rename g_call_me() to g_post_event(), and give it a flagphk2003-04-231-2/+2
| | | | argument to determine if we can M_WAITOK in malloc.
* Make gctl_error() take printfline varargs.phk2003-04-231-1/+2
|
* Remove unused event pointers in object structures.phk2003-04-231-6/+0
| | | | Remove KASSERTS which checked that they were unused.
* Implement handling of CONFIG_GEOM OAM request.phk2003-04-221-0/+2
|
* Time has run from the "run GEOM in userland" harness, and the new regressionphk2003-04-131-8/+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.
* Remove all references to BIO_SETATTR. We will not be using it.phk2003-04-031-1/+0
|
* Remove geom_enc.c, a superset of these functions are now available inphk2003-04-031-10/+0
| | | | <sys/endian.h>
* Add handling for cancelled events in the g_call_me() methods.phk2003-04-021-0/+2
|
* Change events to have an array of "void *" references, and give thephk2003-04-021-2/+2
| | | | | | | | | | | 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.
* Remove the old config interface, the new OAM is sufficiently functionalphk2003-04-011-88/+0
| | | | now.
* Run a revision on the OAM api.phk2003-03-271-0/+9
| | | | | | | Use prefix gctl_ systematically. Add flag with access perms for each argument. Add ro/rw versions of argument building functions. General cleanup.
* Remove unuse g_insert_geom().phk2003-03-251-1/+0
|
* Premptively change initializations of struct g_class to use C99phk2003-03-241-1/+5
| | | | | sparse struct initializations before we extend the struct with new OAM related member functions.
* Retire the GEOM private statistics code and use devstat instead.phk2003-03-181-2/+2
|
* Add u_int nstart, nend counters to consumer and providers so we will notphk2003-03-091-0/+2
| | | | | | | | | have to examine the stats structure to tell if we have outstanding I/O requests. Making them u_int improves the chance of atomic updates to them, but risks roll-over. Since the only interesting property is if they are equal or not, this is not an issue.
* Better names for struct disk elements: d_maxsize, d_stripeoffsetphk2003-02-111-0/+2
| | | | | | | | | | | and d_stripesisze; Introduce si_stripesize and si_stripeoffset in struct cdev so we can make the visible to clustering code. Add stripesize and stripeoffset to providers. DTRT with stripesize and stripeoffset in various places in GEOM.
* Introduce flag field and G_PF_CANDELETE field on providers.phk2003-02-111-0/+2
|
* Move the g_stat struct to its own .h file, we will export it to other code.phk2003-02-081-24/+3
| | | | | | | | | | | | | | | | | | 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-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add the new statistics structure, put one in consumers and providers.phk2003-02-071-0/+26
| | | | include <sys/time.h> as necessary.
OpenPOWER on IntegriCloud