summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom.h
Commit message (Collapse)AuthorAgeFilesLines
* Add g_retaste(), which given a class will present all non-open providersmarcel2008-03-231-0/+1
| | | | | | | | | | to it for tasting. This is useful when the class, through means outside the scope of GEOM, can claim providers previously unclaimed. The g_retaste() function posts an event which is handled by the g_retaste_event(). Event suggested by: phk
* Implement g_delete_data() similar to g_read_data() and g_write_data().pjd2007-05-051-0/+1
| | | | OK'ed by: phk
* - Implement helper g_handleattr_str() function for string attributespjd2007-05-051-0/+1
| | | | | | | handling. - Extend g_handleattr() to treat attribute as string when len=0. OK'ed by: phk
* Add a new I/O request - BIO_FLUSH, which basically tells providers below topjd2006-10-311-0/+1
| | | | | | | flush their caches. For now will mostly be used by disks to flush their write cache. Sponsored by: home.pl
* Add __printflike() to gctl_error().pjd2006-09-161-1/+1
| | | | | Approved by: phk MFC after: 1 week
* Add 'show geom [addr]' ddb(4) command, which prints entire GEOM topology ifpjd2006-09-151-1/+3
| | | | | | | no additional argument is given or details about the given GEOM object (class, geom, provider or consumer). Approved by: phk
* Only check if we're freeing a valid object if we hold the topology lock.pjd2006-07-121-4/+7
| | | | This prevents panic under heavy load with DIAGNOSTIC compiled in.
* Add g_duplicate_bio() function which does the same thing what g_clone_bio()pjd2006-06-051-0/+1
| | | | is doing, but g_duplicate_bio() allocates new bio with M_WAITOK flag.
* Add g_wither_provider() to abstract the details of destroying amarcel2006-04-101-0/+1
| | | | | | particular provider. Use this function where g_orphan_provider() is being called so that the flags are updated correctly and g_orphan_provider() is called only when allowed.
* Change gctl_set_param() to return an error instead of setting anmarcel2006-04-071-1/+2
| | | | | | | | | | | error on the request. Add a wrapper, gctl_set_param_err(), that sets the error on the request from the error returned by gctl_set_param() and update current callers of gctl_set_param() to call gctl_set_param_err() instead. This makes gctl_set_param() much more usable in situations where the caller knows better what to do with certain (apparent) error conditions and setting an error on the request is not one of the things that need to be done.
* Typo.phk2005-09-031-1/+1
|
* 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.
OpenPOWER on IntegriCloud