summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.c
Commit message (Collapse)AuthorAgeFilesLines
* Make various random things staticphk2005-02-101-1/+1
|
* When dumping to a unpartitioned disk, make sure to chop thephk2005-01-291-0/+2
| | | | | | length of the dump area accordingly. Run into by: scottl
* CAM will sometimes remove a disk again even before it finished beingphk2005-01-141-2/+4
| | | | | initialized. We already cancel the pending events but we need to not dereference the geom pointer which never got set different from NULL.
* Pass the file->flags down to geom ioctl handlers.phk2004-12-121-2/+2
| | | | | | | | Reject certain ioctls if write permission is not indicated. Bump geom API version. Reported by: Ruben de Groot <mail25@bzerk.org>
* Tag all geom classes in the tree with a version number.phk2004-08-081-0/+1
|
* Use default method initialization on geoms.phk2004-08-081-4/+7
|
* Fix regression in last commit.phk2004-06-291-1/+1
|
* Make sure to kill the devstat entry for disappearing disks.phk2004-06-271-1/+3
| | | | | PR: 68074 Submitted by: Hendrik Scholz <hscholz@raisdorf.net>
* Zap a redundant NULLphk2004-05-301-1/+1
|
* Dont try to finish devstat's if the disk pointer is NULL, this can happensos2004-05-111-2/+2
| | | | | | when a disk has been destroyed but still has outstanding bio's. Reviewed by: phk
* Change the disk(9) API in order to make device removal more robust.phk2004-02-181-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing. Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called. Unfortunately, this results in a ton of "s/\./->/" changes to device drivers. Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time: The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future. Manual page update to follow shortly.
* don't call sbuf_clear() right after sbuf_new(), it is not necessary.phk2004-02-101-1/+0
|
* Allow decreasing access count even if there is no disk anymore.pjd2004-02-061-3/+11
| | | | | | This will allow closing disks that were removed while opened. Approved by: phk, scottl (mentor)
* Remove no longer necessary debug printfsphk2004-01-231-6/+0
|
* Correct usage of mtx_init() API. This is not a functional change sincetruckman2003-12-071-1/+1
| | | | | | the code happened to work because MTX_DEF and NULL are both defined as 0. Reviewed by: phk
* Retire bio_blkno entirely.phk2003-10-181-1/+0
| | | | | | bio_offset is the field drivers should use. bio_pblkno remains as a convenient place to store the number of the device drivers.
* Return ENODEV in case the driver has no dump routine.phk2003-09-291-0/+4
|
* Be more careful in dumpconf: softc may be NULL for departing devices.phk2003-09-231-3/+6
| | | | Allow drivers to initialize the d_devstat if they want magic params.
* Simplify the ioctl handling in GEOM.phk2003-09-011-10/+20
| | | | | | | | | | | | | | | 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.
* Try to close the race between disk_destroy() and a subsequent disk_create().phk2003-09-011-19/+17
|
* Use __FBSDID().obrien2003-06-111-2/+3
| | | | Approved by: phk
* Introduce a init and fini member functions on a class.phk2003-05-311-5/+14
| | | | | | | | | 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-1/+0
|
* Don't do silly thing if the disk_create() event gets canceled.phk2003-05-251-1/+3
| | | | Approved by: re/scottl
* Return ENXIO if the softc pointer is NULL, in all likelyhood thephk2003-05-211-0/+4
| | | | | | disk is in the process of disappearing. Approved by: re/rwats*
* When a disk disappears, destroy the class from the event threadphk2003-05-121-1/+10
| | | | | | to avoid race condtion. Approved by: re/rwatson
* Use g_wither_geom() for cleanup.phk2003-05-021-2/+1
|
* Introduce a g_waitfor_event() function which posts an event and waits forphk2003-04-231-5/+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-5/+4
| | | | argument to determine if we can M_WAITOK in malloc.
* Remove all references to BIO_SETATTR. We will not be using it.phk2003-04-031-3/+0
|
* Add handling for cancelled events in the g_call_me() methods.phk2003-04-021-2/+15
|
* Change events to have an array of "void *" references, and give thephk2003-04-021-4/+4
| | | | | | | | | | | 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.
* Include <geom/geom_disk.h> not <sys/disk.h>phk2003-04-011-1/+1
|
* Check return value of g_call_me()phk2003-03-271-4/+5
|
* Premptively change initializations of struct g_class to use C99phk2003-03-241-3/+1
| | | | | sparse struct initializations before we extend the struct with new OAM related member functions.
* Mitigate deadlock situation pending a more complete solution.phk2003-03-211-1/+3
|
* 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.
* Use devstat_{start,end}_transaction_bio().phk2003-03-151-10/+3
| | | | Remember to set bio_resid correctly first.
* Allocate devstat structure with devstat_new_entry().phk2003-03-081-2/+1
|
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-1/+29
| | | | | | | | 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.
* 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.
* 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-211-4/+2
| | | | | | | | 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.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Correctly set bio_data in cloned children when cutting up large requests.tegge2003-02-121-1/+1
|
* 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.
* 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.
* Propagate DISKFLAG_CANDELETE from struct disk to G_PF_CANDELETE on thephk2003-02-111-8/+11
| | | | provider.
* Check return value of g_clone_bio().phk2003-02-061-0/+4
|
OpenPOWER on IntegriCloud