phk
cce4827569
KASSERT against no-op access requests.
...
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2004-01-09 16:10:32 +00:00
phk
fe692735bf
Prevent withering of the provider we're orphaning from happening until
...
we do it ourselves.
Nailed by: Simon Heath <heath@cng.fr>
2003-12-23 11:37:05 +00:00
truckman
87a37b565f
Correct usage of mtx_init() API. This is not a functional change since
...
the code happened to work because MTX_DEF and NULL are both defined as 0.
Reviewed by: phk
2003-12-07 23:20:53 +00:00
phk
888f0e51c6
KASSERT against multiple orphanings of providers.
2003-12-07 10:04:43 +00:00
scottl
2b68e67c6d
Re-arrange and consolidate some random debugging stuff
2003-12-07 05:04:49 +00:00
phk
d7fc6b258d
Call class->init() an class->fini() while the class is hooked up,
...
rather than right before and right after. This allows these routines
to manipulate the mesh.
KASSERT that nobody creates a geom on an alien class.
Assert topology in g_valid_obj().
Approved by: re@
2003-11-18 18:17:39 +00:00
phk
aeb3231da5
Fix a harmless bug and add a ')' in a debugging printf.
...
Submitted by: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
2003-11-18 07:54:12 +00:00
phk
06ab707e79
This is a crude bandaid for 5.2 to protect against providers which disappear
...
while being tasted. I can moderately easy trigger this with atapi-cd, but
I do not fully understand the circumstances.
2003-11-15 18:44:43 +00:00
phk
01e9462fd6
Make sure to return errors if we have any.
...
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-11-12 09:46:54 +00:00
phk
a42d01d036
Close the right consumers if we run into trouble opening them all.
...
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-10-24 18:47:31 +00:00
phk
1fd6c526e3
Fix two old/new consumer confusions.
...
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-10-24 18:46:23 +00:00
phk
d7e0132261
Fix a braino memory leak.
...
Found by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-10-22 20:28:46 +00:00
phk
5a35d3b764
Forgotten commit: If a provider has zero sectorsize, it is an
...
indication of lack of media.
Tripped up: peter
2003-10-22 06:32:20 +00:00
phk
b7c9250fa7
Remove KASSERT check for negative bio_offsets, add "normal" EIO
...
error return for same.
2003-10-19 19:06:54 +00:00
phk
b3eb57c5d4
Retire bio_blkno entirely.
...
bio_offset is the field drivers should use.
bio_pblkno remains as a convenient place to store the number of
the device drivers.
2003-10-18 17:53:34 +00:00
phk
9d23a3014f
Assume that bp->bio_offset is correctly initialized.
...
This fixes non-power-of-2 blocksize GEOM I/O.
2003-10-12 11:35:55 +00:00
phk
ed350390ed
Destroy providers maked with G_PF_WITHER when the last consumer has detached.
2003-10-12 11:34:35 +00:00
phk
a7b8d85b93
Interior decoration changes.
2003-10-07 09:28:07 +00:00
phk
c7d1762ad7
Allow our bio tools to be used for local bio-chopping by not mandating
...
a bio_from value. bio_to is still mandated (mostly for debuggign) and
shall be copied from the parent bio.
2003-10-06 09:07:35 +00:00
phk
dc1586f843
Introduce a per provider wither flag
2003-10-06 09:05:44 +00:00
phk
9e3e052c16
Return ENODEV in case the driver has no dump routine.
2003-09-29 07:44:23 +00:00
phk
7099deadda
The present defaults for the open and close for device drivers which
...
provide no methods does not make any sense, and is not used by any
driver.
It is a pretty hard to come up with even a theoretical concept of
a device driver which would always fail open and close with ENODEV.
Change the defaults to be nullopen() and nullclose() which simply
does nothing.
Remove explicit initializations to these from the drivers which
already used them.
2003-09-27 12:01:01 +00:00
phk
4b80280a92
Add more KASSERTS().
2003-09-26 20:52:46 +00:00
phk
ac7d8771f0
Be more careful in dumpconf: softc may be NULL for departing devices.
...
Allow drivers to initialize the d_devstat if they want magic params.
2003-09-23 07:53:59 +00:00
phk
99d28702f5
Reorder a couple of KASSERTS to give more sensible messages.
...
Found by: GEOM 101 class of '03
2003-09-11 00:49:02 +00:00
phk
bab9696ceb
Correct bzero length so we clear the entire key structure.
2003-09-08 18:35:26 +00:00
phk
db461ec795
Bzero the right number of bytes.
...
Found by: Juergen Buchmueller <pullmoll@stop1984.com>
2003-09-06 18:37:17 +00:00
phk
862461d8b4
Make sure to return ENOIOCTL if the ioctl is not handled.
2003-09-04 21:23:46 +00:00
phk
38290a3baa
Simplify the ioctl handling in GEOM.
...
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.
2003-09-01 20:45:32 +00:00
phk
9958b55dce
Try to close the race between disk_destroy() and a subsequent disk_create().
2003-09-01 12:03:13 +00:00
phk
a802e42c5a
Add the new g_dev_getprovider() function, the swap_pager needs it now.
...
Spotted by: mr
2003-08-30 18:33:55 +00:00
ps
3f7f2a4cfc
Change the the size fields to daddr_t to support greater than 2TB ccd volumes.
...
Reviewed by: phk
2003-08-22 11:21:06 +00:00
phk
57ee24a70a
Make CCD unloadable.
2003-08-22 11:04:47 +00:00
phk
ec0641f616
Don't panic over the fact that unloading failed if we already knew that.
2003-08-22 11:00:54 +00:00
phk
0955331370
Block all GETATTR calls hitting the CCD, we wouldn't know which child
...
device should handle them.
This prevents for instance GEOM::ioctl requests from reaching a
lower BSDlabel node, which ps@ found would confuse newfs(8).
2003-08-22 10:28:19 +00:00
phk
d2368e58de
Check for null softc pointers, these happens when a ccd is withering.
...
Found by: David Schultz <dschultz@OCF.Berkeley.EDU>
2003-08-22 10:22:46 +00:00
phk
b43271d3a4
Replace a panic with a .1Hz retry loop.
...
Not a perfect solution, but far cheaper than one.
2003-08-13 12:35:25 +00:00
phk
b35539c7d2
In case we encounter a zero sectorsize provider in g_io_check(), fail
...
the request with a printf rather than a divide by zero error.
2003-08-13 06:42:56 +00:00
phk
4a97de3d53
Kick Giant compatibility one layer up.
2003-08-02 10:11:58 +00:00
phk
f1458a1700
Fix a memory leak in CCD's mirror code.
2003-07-29 20:04:06 +00:00
phk
2d9e322722
Implement DOSPTYP_EXTLBA more completely: loop until we find no more
...
partitions.
Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz>
PR: 53719
2003-07-29 10:09:13 +00:00
phk
47a98bb53f
Handle geoms which are withering away specially in the dump functions.
2003-07-08 21:12:40 +00:00
phk
cee4a6c39a
Only dump 512 bytes of debugging.
...
Always wait for things to settle before returning.
2003-07-02 08:07:07 +00:00
phk
57f7d6f488
Sleep on "-" in our normal state to simplify debugging.
2003-06-18 10:33:09 +00:00
phk
84a309987c
Add "GEOM_FOX", a class which detects and selects between multiple
...
redundant paths to the same device.
This class reacts to a label in the first sector of the device,
which is created the following way:
# "0123456789abcdef012345..."
# "<----magic-----><-id-...>
echo "GEOM::FOX someid" | dd of=/dev/da0 conv=sync
NB: Since the fact that multiple disk devices are in fact the same
device is not known to GEOM, the geom taste/spoil process cannot
fully catch all corner cases and this module can therefore be
confused if you do the right wrong things.
NB: The disk level drivers need to do the right thing for this to
be useful, and that is not by definition currently the case.
2003-06-18 09:29:28 +00:00
obrien
40ee2bd5c8
Use __FBSDID().
...
Approved by: phk
2003-06-11 06:49:16 +00:00
phk
96300d6f8f
Fix error handling for ENOMEM style issues.
2003-06-09 19:12:19 +00:00
phk
8d105bca1c
Improve the root-dev prompt facility for printing devices which could
...
possibly be a root filesystem.
2003-06-07 15:46:53 +00:00
phk
c9fca2ba58
Wait for everything to settle before we try to print the list of
...
geom devices.
2003-06-07 15:32:09 +00:00
phk
01274259b9
Make sure we return an error message if the geom parameter is not
...
located.
2003-06-07 15:31:44 +00:00