summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_dev.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-04-291-1/+1
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* Properly handle races between open/close and orphan.phk2003-04-021-10/+34
| | | | | | | KASSERT the race between close and strategy, it is an error in the upper echelons if this happens, Add XXX: comment explaining why the ioctl/orphan race is not closed.
* Premptively change initializations of struct g_class to use C99phk2003-03-241-3/+2
| | | | | sparse struct initializations before we extend the struct with new OAM related member functions.
* 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
|
* 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.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-14/+9
| | | | | | | | | | | | | 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.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Advertise MAXPHYS upwards, we will split as necessary before we get to thephk2003-02-111-1/+1
| | | | bottom of things.
* 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.
* Use the SI_CANDELETE flag on the dev_t rather than the D_CANFREE flagphk2003-02-111-1/+3
| | | | on the cdevsw to determine ability to handle the BIO_DELETE request.
* Move the g_stat struct to its own .h file, we will export it to other code.phk2003-02-081-1/+2
| | | | | | | | | | | | | | | | | | 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.
* Move #defines of major/minor to internal header file so other bits canphk2003-02-081-4/+2
| | | | share and coordinate with geom_dev.
* Commit the correct copy of the g_stat structure.phk2003-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Now that we have non-geom_disk based drivers, we need to cover for those,phk2003-01-141-3/+4
| | | | | | in case they return EOPNOTSUPP on an ioctl. Found by: jhb
* Always issue ioctls as BIO_GEATTR requests. The direction of data copies onphk2003-01-131-4/+6
| | | | | | | ioctls are no reliable indication of the ioctls "set" or "get" nature or if such simplistic categories can even be applied. MFC candidate: boot0cfg issue.
* Remove g_silence(). It does not do anything anymore.phk2003-01-131-2/+0
|
* Update si_bsize_phys on open.phk2003-01-021-0/+1
| | | | MFC candidate.
* Add an XXX comment to explain the predicament.phk2002-12-261-1/+7
|
* Add a couple of KASSERTS, just in case.phk2002-12-131-0/+4
|
* Add KASSERT for bio_cmd validity here as well. Various hacks stillphk2002-11-011-0/+4
| | | | bypass specfs.
* Add a g_dev_print() function which prints all the /dev entries GEOMphk2002-10-251-0/+14
| | | | know about.
* Loose the g_dev_clone() noise.phk2002-10-251-1/+0
|
* Now that the sectorsize and mediasize are properties of the provider,phk2002-10-201-9/+5
| | | | | | | | | | | don't take the detour over the I/O path to discover them using getattr(), we can just pick them out directly. Do note though, that for now they are only valid after the first open of the underlying disk device due compatibility with the old disk_create() API. This will change in the future so they will always be valid. Sponsored by: DARPA & NAI Labs.
* Use %jd instead of %lld now that we have it.phk2002-10-201-5/+6
|
* The argument to the DIOCGMEDIASIZE ioctl() is an off_t, not an u_int.tmm2002-10-191-1/+1
| | | | Reviewed by: phk
* Return an error if the drive reports heads/sectors that do not make sense.njl2002-10-151-0/+8
| | | | | | This fixes a divide by zero in fdisk(8) Reviewed by: phk
* Copyin and copyout are only possible from a process-native thread,phk2002-10-071-18/+10
| | | | | | | | | | | | | | | and therefore we need a way for ioctl handlers to run in that thread in GEOM. Rather than invent a complicated registration system to recognize which ioctl handler to use for a given ioctl, we still schedule all ioctls down the tree as bio transactions but add a special return code that means "call me directly" and have the geom_dev layer do that. Use this for all ioctls that make it as far as a diskdriver to avoid any backwards compatibility problems. Requested by: scottl Sponsored by: DARPA & NAI Labs
* Properly isolate the locking domains of sysctl from the topology lockphk2002-10-041-0/+4
| | | | | | for the sysctls which report the configuration. Sponsored by: DARPA & NAI Labs.
* Put some failing ioctl related printfs under a suitable debug flag.phk2002-10-021-12/+14
| | | | Sponsored by: DARPA & NAI Labs.
* Use the canonical root:operator 0640 for GEOM disk devices.phk2002-10-011-1/+1
| | | | | Spotted by: brooks Sponsored by: DARPA & NAI Labs.
* Style, whitespace and lint fixes.phk2002-09-281-14/+15
| | | | Sponsored by: DARPA & NAI Labs.
* Various no-ops:phk2002-09-271-1/+1
| | | | | | | | | | | Add a __unused. Make the 2byte decoder functions return 16 bits for the benefits of picky lints. No need to grab giant around a tsleep() when we have a timeout. Sponsored by: DARPA & NAI Labs.
* Retire now unused DIOCGDVIRGIN kludge.phk2002-09-201-5/+0
| | | | Sponsored by: DARPA & NAI Labs.
* Don't respect the O_EXCL flag, we don't get it back on close so we cannotphk2002-09-061-0/+8
| | | | | | | correctly track it. Spotted by: peter Sponsored by: DARPA & NAI Labs.
* Improve some on the naming.phk2002-06-091-6/+6
| | | | Submitted by: iedowse
* Remove the "-class" suffix from classes, they will not be ambiguous.phk2002-05-211-2/+2
| | | | Sponsored by: DARPA & NAI Labs.
* Don't grab Giant around malloc(9) and free(9).phk2002-05-201-40/+26
| | | | | | | | Don't grab Giant around wakeup(9). Don't print verbose messages about each device found in geom_dev. Various cleanups. Sponsored by: DARPA & NAI Labs.
* Implement the GEOMGETCONF ioctl which returns vital stats for thephk2002-04-231-1/+17
| | | | | | current device in XML in an sbuf. Sponsored by: DARPA & NAI Labs
* Make kernel dumps work with GEOM.phk2002-04-191-0/+19
| | | | | | | | | | Notice that if the device on which the dump is set is destroyed for any reason, the dump setting is lost. This in particular will happen in the case of spoilage. For instance if you set dump on ad0s1b and open ad0 for writing, ad0s* will be spoilt and the dump setting lost. See geom(4) for more about spoiling. Sponsored by: DARPA & NAI Labs.
* Implement DIOCGFRONTSTUFF ioctl which reports how many bytes from the startphk2002-04-091-1/+4
| | | | | | of the device magic stuff might occupy. Sponsored by: DARPA & NAI Labs.
* Various stylistic nit picking.phk2002-04-091-2/+2
| | | | Sponsored by: DARPA & NAI Labs.
* In reverence of the 3rd X11 development rule:phk2002-04-081-3/+0
| | | | | | | | | | 3.The only thing worse than generalizing from one example is generalizing from no examples at all. Remove the fwcylinders attribute before anybody gets the idea that we alone have squared the circle. Sponsored by: DARPA & NAI Labs.
* Move access and orphan member functions from class to geom.phk2002-04-041-2/+1
| | | | Sponsored by: DARPA & NAI Labs
* In the absense of any smarter way to do this, cast various printfphk2002-03-281-2/+3
| | | | arguments to silence printf format warnings.
* Eliminate some thread pointers which do not make sense anymore.phk2002-03-261-12/+12
| | | | | Split private parts of geom.h into geom_int.h. The latter should never be included in class implemtations.
* Cave in to tradition and rename "methods" to "classes".phk2002-03-261-8/+8
|
OpenPOWER on IntegriCloud