summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert r184136. Instead, push the check for crashdumpmap overflow into thekib2008-10-311-1/+1
| | | | | | | | MD i386 and amd64 dump code. Requested by: jhb Retested by: pho MFC after: 3 days (+ 176304 + 184136)
* Do not overflow crashdumpmap.kib2008-10-211-1/+1
| | | | | | Reported and tested by: pho Reviewed by: jhb MFC after: 1 week
* Add sbuf_new_auto as a shortcut for the very common case of creating ades2008-08-091-1/+1
| | | | | | | completely dynamic sbuf. Obtained from: Varnish MFC after: 2 weeks
* Teach the dump and minidump code to respect the maxioszie attribute ofscottl2008-02-151-0/+1
| | | | the disk; the hard-coded assumption of 64K doesn't work in all cases.
* Allow to use ':' in d_ident, which is quite handy character.pjd2007-05-051-1/+2
|
* Because there are many strange hardware out there, allow to use onlypjd2007-05-051-0/+39
| | | | [a-zA-Z0-9-_@#%.] characters in d_ident field.
* - Extend disk structure to allow to store disk's serial number, which can bepjd2007-05-051-1/+3
| | | | | | | retrieved via GEOM::ident attribute. - Bump disk(9) ABI version. OK'ed by: phk
* Reduce the noise when plugging in (USB) mass storage devices, like a 4 portn_hibma2007-02-211-1/+1
| | | | | | | | | flash card reader. Also remove an 'Opened da0 -> <random number>' which is not needed on a daily basis (available through bootverbose). Reviewed by: phk, ken MFC after: 1 week
* Add a new disk flag - DISKFLAG_CANFLUSHCACHE, which indicates that the diskpjd2006-10-311-1/+21
| | | | | | can handle BIO_FLUSH requests. Sponsored by: home.pl
* Add g_wither_provider() to abstract the details of destroying amarcel2006-04-101-1/+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.
* Fix a bug that caused some /dev entries to continue to exist afterjdp2005-11-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | the underlying drive had been hot-unplugged from the system. Here is a specific example. Filesystem code had opened /dev/da1s1e. Subsequently, the drive was hot-unplugged. This (correctly) caused all of the associated /dev/da1* entries to be deleted. When the filesystem later realized that the drive was gone it closed the device, reducing the write-access counts to 0 on the geom providers for da1s1e, da1s1, and da1. This caused geom to re-taste the providers, resulting in the devices being created again. When the drive was hot-plugged back in, it resulted in duplicate /dev entries for da1s1e, da1s1, and da1. This fix adds a new disk_gone() function which is called by CAM when a drive goes away. It orphans all of the providers associated with the drive, setting an error condition of ENXIO in each one. In addition, we prevent a re-taste on last close for writing if an error condition has been set in the provider. Sponsored by: Isilon Systems Reviewed by: phk MFC after: 1 week
* Move some devstat collection to below where large IO operations are choppedtegge2005-09-301-3/+3
| | | | | | | up. This make iostat report operations passed down to the device driver instead of operations passed down to GEOM disk. The transfer size limit imposed by the device driver is no longer hidden, improving the correlation between iostat output and device driver workload.
* After rejecting the bio request early, return instead of panicing.phk2005-03-181-1/+3
| | | | Found by: Coverity (ID#450)
* 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.
OpenPOWER on IntegriCloud