aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_subr.c
Commit message (Collapse)AuthorAgeFilesLines
* Time has run from the "run GEOM in userland" harness, and the new regressionPoul-Henning Kamp2003-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. Notes: svn path=/head/; revision=113432
* If we hit access ahead of a spoil event, we should have negativePoul-Henning Kamp2003-04-121-7/+3
| | | | | | | delta access-counts and proceed. Notes: svn path=/head/; revision=113411
* Change events to have an array of "void *" references, and give thePoul-Henning Kamp2003-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. Notes: svn path=/head/; revision=112988
* Only orphan things if the open/close actually succeeded.Poul-Henning Kamp2003-04-021-11/+10
| | | | Notes: svn path=/head/; revision=112979
* g_class_by_name() was unused too.Poul-Henning Kamp2003-03-251-13/+0
| | | | Notes: svn path=/head/; revision=112596
* Remove unuse g_insert_geom().Poul-Henning Kamp2003-03-251-38/+0
| | | | Notes: svn path=/head/; revision=112595
* Introduce g_cancel_events() and use it a couple of places where it makesPoul-Henning Kamp2003-03-231-0/+3
| | | | | | | sense. Notes: svn path=/head/; revision=112518
* Retire the GEOM private statistics code and use devstat instead.Poul-Henning Kamp2003-03-181-4/+7
| | | | Notes: svn path=/head/; revision=112370
* Including <sys/stdint.h> is (almost?) universally only to be able to usePoul-Henning Kamp2003-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. Notes: svn path=/head/; revision=112367
* Remove unneeded #include of geom_stats.hPoul-Henning Kamp2003-03-091-1/+0
| | | | Notes: svn path=/head/; revision=112030
* Don't use statistics counters to detect outstanding I/O.Poul-Henning Kamp2003-03-091-1/+1
| | | | Notes: svn path=/head/; revision=112028
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-7/+7
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Implement a handle for efficient implementation of perforations inPoul-Henning Kamp2003-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. Notes: svn path=/head/; revision=110759
* Move the g_stat struct to its own .h file, we will export it to other code.Poul-Henning Kamp2003-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. Notes: svn path=/head/; revision=110541
* Commit the correct copy of the g_stat structure.Poul-Henning Kamp2003-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. Notes: svn path=/head/; revision=110523
* Rename bio_linkage to the more obvious bio_parent.Poul-Henning Kamp2003-02-071-1/+1
| | | | | | | Add bio_t0 timestamp, and include <sys/time.h> where needed Notes: svn path=/head/; revision=110517
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-7/+7
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* We should not need to hold Giant for sbuf operations any more.Poul-Henning Kamp2002-12-261-4/+0
| | | | Notes: svn path=/head/; revision=108295
* Constification and some s/int/u_int/ changes.Poul-Henning Kamp2002-12-161-7/+7
| | | | Notes: svn path=/head/; revision=107953
* Straighten up the geom.ctl config interface definitions.Poul-Henning Kamp2002-11-061-1/+1
| | | | | | | Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=106518
* Polish a bit here and there.Poul-Henning Kamp2002-11-041-3/+5
| | | | | | | | | Reenable the geom.ctl device so people can play with gbde. Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=106408
* Use a better test to prevent tasting geom.ctl so we don't screw thePoul-Henning Kamp2002-10-241-1/+1
| | | | | | | regression tests. Notes: svn path=/head/; revision=105897
* Don't taste the first provider, it's /dev/geom.ctl and it's not goingPoul-Henning Kamp2002-10-241-1/+2
| | | | | | | to taste like anything we like anyway. Notes: svn path=/head/; revision=105892
* The g_id*() functions are not needed in the userland test-suite soPoul-Henning Kamp2002-10-201-0/+2
| | | | | | | | | #ifdef _KERNEL them rather than deal with a copyin simulation. Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=105550
* Use %jd instead of %lld now that we have it.Poul-Henning Kamp2002-10-201-2/+3
| | | | Notes: svn path=/head/; revision=105540
* Implement the GEOMCONFIGGEOM ioctl which can be used to manually createPoul-Henning Kamp2002-10-141-37/+82
| | | | | | | | | and configure an instance of a class on a give provider. Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=105092
* Add support g_clone_bio() and g_std_done() to spawn multiple childrenPoul-Henning Kamp2002-10-091-4/+6
| | | | | | | | | of a bio and correctly gather status when done. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104701
* Retire g_io_fail() and let g_io_deliver() take an error argument instead.Poul-Henning Kamp2002-09-301-4/+4
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104195
* Disable the g_sanity() check unless people ask for it in the debugflags.Poul-Henning Kamp2002-09-301-0/+2
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104191
* Remove "magicspace". It looks good on paper, it doesn't work in practice.Poul-Henning Kamp2002-09-061-44/+0
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103009
* Improve some on the naming.Poul-Henning Kamp2002-06-091-15/+15
| | | | | | | Submitted by: iedowse Notes: svn path=/head/; revision=98066
* Change the registration of magic spaces so it does its own memory management.Poul-Henning Kamp2002-06-051-19/+30
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=97887
* Introduce the concept of "magic spaces", and implement them in most ofPoul-Henning Kamp2002-05-211-0/+33
| | | | | | | | | | | | | | | | | | | the relevant classes. Some methods may implement various "magic spaces", this is reserved or magic areas on the disk, set a side for various and sundry purposes. A good example is the BSD disklabel and boot code on i386 which occupies a total of four magic spaces: boot1, the disklabel, the padding behind the disklabel and boot2. The reason we don't simply tell people to write the appropriate stuff on the underlying device is that (some of) the magic spaces might be real-time modifiable. It is for instance possible to change a disklabel while partitions are open, provided the open partitions do not get trampled in the process. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=97078
* Fix a {} bug which doesn't have any effect yet.Poul-Henning Kamp2002-04-271-2/+1
| | | | | | | Spotted by: jake Notes: svn path=/head/; revision=95550
* Introduce some serious paranoia to try to catch a memory overwrite problemPoul-Henning Kamp2002-04-231-2/+46
| | | | | | | | | as early as possible. Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=95310
* Introduce the convenience function g_getattr() and make it DWIM.Poul-Henning Kamp2002-04-091-0/+13
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=94284
* Move access and orphan member functions from class to geom.Poul-Henning Kamp2002-04-041-4/+5
| | | | | | | Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=93776
* s/classs/classes/ to fixup grammer after the previous global renaming.Poul-Henning Kamp2002-04-041-3/+3
| | | | | | | Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=93774
* In the absense of any smarter way to do this, cast various printfPoul-Henning Kamp2002-03-281-1/+2
| | | | | | | arguments to silence printf format warnings. Notes: svn path=/head/; revision=93326
* Eliminate some thread pointers which do not make sense anymore.Poul-Henning Kamp2002-03-261-2/+3
| | | | | | | | Split private parts of geom.h into geom_int.h. The latter should never be included in class implemtations. Notes: svn path=/head/; revision=93250
* Cave in to tradition and rename "methods" to "classes".Poul-Henning Kamp2002-03-261-25/+25
| | | | Notes: svn path=/head/; revision=93248
* First commit of the GEOM subsystem to make it easier for people toPoul-Henning Kamp2002-03-111-0/+639
test and play with this. This is not yet production quality and should be run only on dedicated test boxes. For people who want to develop transformations for GEOM there exist a set of shims to run geom in userland (ask phk@freebsd.org). Reports of all kinds to: phk@freebsd.org Please include in report: dmesg sysctl debug.geomdot sysctl debug.geomconf Known significant limitations: no kernel dump facility. ioctls severely restricted. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=92108