summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug in the ENOMEM pacing code which probably made it panic systemsphk2003-03-291-4/+4
| | | | after a lot of ENOMEM errors.
* Add create_geom and destroy_geom methods.phk2003-03-291-0/+159
|
* Run a revision on the OAM api.phk2003-03-274-87/+304
| | | | | | | Use prefix gctl_ systematically. Add flag with access perms for each argument. Add ro/rw versions of argument building functions. General cleanup.
* Check return value of g_call_me()phk2003-03-271-4/+5
|
* g_class_by_name() was unused too.phk2003-03-251-13/+0
|
* Remove unuse g_insert_geom().phk2003-03-252-39/+0
|
* Forward compatibility: NULL check the passed in meta argument.phk2003-03-251-1/+1
|
* Premptively change initializations of struct g_class to use C99phk2003-03-2413-37/+28
| | | | | sparse struct initializations before we extend the struct with new OAM related member functions.
* Turn /dev/geom.ctl from a GEOM class into a plain character device driverphk2003-03-243-94/+19
| | | | instead, it will never see a disk-I/O transaction, so this is a lot simpler.
* Save a lock: Grab the stall_events SX lock exclusively so it also serializephk2003-03-241-2/+2
| | | | OAM reqests.
* Introduce g_cancel_events() and use it a couple of places where it makesphk2003-03-233-0/+26
| | | | sense.
* Introduce an SX lock which allows us to stall event processingphk2003-03-232-0/+21
| | | | during OAM operations.
* I forgot the evil ioctl census scripts: #include <geom/geom_ctl.h>phk2003-03-231-0/+1
|
* Marshalling stuff for OAM API.phk2003-03-232-0/+187
|
* A note about which #include files may be used where.phk2003-03-231-0/+22
|
* Start leaking the AOM api into the tree.phk2003-03-232-0/+149
|
* Mitigate deadlock situation pending a more complete solution.phk2003-03-212-2/+7
|
* Retire the GEOM private statistics code and use devstat instead.phk2003-03-187-300/+16
|
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-1814-14/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* #ifdef notyet a bit of code which needs not yet committed refcounting tophk2003-03-161-0/+2
| | | | work correctly.
* Use devstat_{start,end}_transaction_bio().phk2003-03-151-10/+3
| | | | Remember to set bio_resid correctly first.
* If we run out of consumers while orphaning them, and the provider's geomphk2003-03-101-0/+5
| | | | | | is withering, destroy the provider when done. This was exposed by the recent change to geom_dev's orphaning logic.
* Fix yet another fallout of our M_* song and dance.phk2003-03-101-1/+1
|
* Remove unneeded #include of geom_stats.hphk2003-03-092-2/+0
|
* Stamp out Danglish.phk2003-03-091-1/+1
|
* Don't use statistics counters to detect outstanding I/O.phk2003-03-091-1/+1
|
* Don't abuse the statistics counters for detecting if we have outstandingphk2003-03-091-6/+10
| | | | | I/O requests, instead use the new dedicated fields in the consumer and provider to track this.
* 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.
* When a DEV class consumer is orphan'ed we need to wait for all thephk2003-03-091-11/+20
| | | | | | | | | | outstanding requests to return before we unravel the mesh. It is very important that the stuff below us plays nice and don't overlook a couple of outstanding bio's, because until they remember the geom event thread is blocked. At an expense in code here this could be made more robust, but I actually _want_ a robust failure in this case so any offending drivers can be fixed.
* Allocate devstat structure with devstat_new_entry().phk2003-03-081-2/+1
|
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-082-18/+30
| | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
* Limit our requests to DFLTPHYS, this is generally a good idea forphk2003-03-071-0/+5
| | | | | | memory-allocation purposes. Right now it is also a very good idea because we hit a Giant assertion in the free(9) processing if we free something larger than 64k.
* Initialize the second buffer for mirroring to point to itself and not itsphk2003-03-041-0/+1
| | | | partner.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-033-40/+19
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* NO_GEOM cleanup:phk2003-03-021-14/+1
| | | | Remove cdevsw->d_psize() implementation, we don't need it any more.
* NO_GEOM cleanup:phk2003-02-281-54/+10
| | | | | Retire the "dev_t" centric version of the disk mini-layer. Remove now unneeded linkage field in dev_t and struct disk.
* Cleanup of the d_mmap_t interface.mux2003-02-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386
* Drop down Apple Partition Map code that has been in use by somegrehan2003-02-231-84/+168
| | | | | | ppc developers for a while. OK'd by: phk
* NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"phk2003-02-211-5/+5
| | | | as "this" handle.
* NO_GEOM cleanup:phk2003-02-211-2/+2
| | | | | | | | | | | | | Retire the "d_dump_t" and use the "dumper_t" type instead. Dumper_t takes a void * as first arg which is more general than the dev_t taken by d_dump_t. (Remember: we could have net-dumpers if somebody wrote us one!) Define the convention for GEOM controlled disk devices to be that the first argument to the dumper function is the struct disk pointer. Change device drivers accordingly.
* NO_GEOM cleanup:phk2003-02-212-5/+3
| | | | | | | | Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns.
* Add M_WAITOKphk2003-02-191-2/+2
|
* Back out M_* changes, per decision of the TRB.imp2003-02-1912-32/+33
| | | | Approved by: trb
* Correctly set bio_data in cloned children when cutting up large requests.tegge2003-02-121-1/+1
|
* Implement a handle for efficient implementation of perforations inphk2003-02-122-7/+13
| | | | | | | | | | | | | 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.
* Implement a bio-taskqueue to reduce number of context switches inphk2003-02-112-21/+56
| | | | | | | | | | | | | | | | | | | | disk I/O processing. The intent is that the disk driver in its hardware interrupt routine will simply schedule the bio on the task queue with a routine to finish off whatever needs done. The g_up thread will then schedule this routine, the likely outcome of which is a biodone() which queues the bio on g_up's regular queue where it will be picked up and processed. Compared to the using the regular taskqueue, this saves one contextswitch. Change our scheduling of the g_up and g_down queues to be water-tight, at the cost of breaking the userland regression test-shims. Input and ideas from: scottl
* Announce our ability to do MAXPHYS transfers.phk2003-02-111-0/+1
|
* Advertise MAXPHYS upwards, we will split as necessary before we get to thephk2003-02-111-1/+1
| | | | bottom of things.
* Check disk->d_maxsize/dev->si_iosize_max at open time rather than in strategy.phk2003-02-111-10/+7
| | | | Printf a warning and use DFLTPHYS if the drive has not set a size.
* Make a mutex to stop the race coming into geom_disk's done routine.phk2003-02-111-25/+61
| | | | | | | | Cut up requests into smaller bits if they are longer than the drivers disk->d_maxsize or dev->si_iosize_max. Properly handle the race condition when using g_clone_bio() is used without having the single-threadedness of g_down/g_up secure locking.
OpenPOWER on IntegriCloud