Commit Graph

433 Commits

Author SHA1 Message Date
phk
ffdec08c2c Retire the DIOCGMBR ioctl before anybody starts to use it. 2003-04-03 19:37:40 +00:00
phk
cbe207a30e Remove all references to BIO_SETATTR. We will not be using it. 2003-04-03 19:19:36 +00:00
phk
aba0028d27 Update the initializer for GEOM_MBREXT, I overlooked it previously. 2003-04-03 19:05:03 +00:00
phk
3288c86f74 Add #define for DOSPTYP_PMBR, and use it. 2003-04-03 18:55:16 +00:00
phk
9e2f75eb24 #include <sys/endian.h> as needed. 2003-04-03 11:56:10 +00:00
phk
f14c63f8a8 Remove geom_enc.c, a superset of these functions are now available in
<sys/endian.h>
2003-04-03 11:40:06 +00:00
phk
25c7685ca9 Use <sys/endian.h> instead of geom_enc.c for endianess-agnostification. 2003-04-03 11:36:53 +00:00
phk
34a3abe946 Use sys/endian.h instead of geom_enc.c for endian-agnostfication. 2003-04-03 11:33:51 +00:00
phk
7d796a935a Make sure we don't ignore error codes. 2003-04-03 11:19:24 +00:00
phk
39cbb43bab Add handling for cancelled events in the g_call_me() methods. 2003-04-02 21:10:04 +00:00
phk
cedf04c475 Change events to have an array of "void *" references, and give the
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.
2003-04-02 20:41:18 +00:00
phk
a47b0e4a84 Only orphan things if the open/close actually succeeded. 2003-04-02 13:10:40 +00:00
phk
3cfb76c317 Properly handle races between open/close and orphan.
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.
2003-04-02 13:09:50 +00:00
phk
af778aa48a Include <geom/geom_disk.h> not <sys/disk.h> 2003-04-01 18:57:14 +00:00
phk
c235e25328 Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.

Spell bioq_disksort() consistently with the remaining bioq_*().

#include <geom/geom_disk.h> where this is more appropriate.
2003-04-01 15:06:26 +00:00
phk
8be523e927 Start to split the GEOM/diskdriver specific bits into geom/geom_disk.h 2003-04-01 13:19:14 +00:00
phk
80780d2ba2 Remove the old config interface, the new OAM is sufficiently functional
now.
2003-04-01 07:33:56 +00:00
phk
85edc96041 Remove the old config interface now that the new OAM is functional. 2003-04-01 07:33:17 +00:00
phk
5b75c05966 Remove some debugging in the new OAM[*] and add a debug flag for other
parts of it.

[*] I've been asked what "OAM" means:  It's an acronym used in the
telecom industry, "Operations And Maintenance", and there it covers
anything from a single unlabeled led on the frontpanel the the full
nightmare of CMIP for SS7.
2003-03-31 18:35:37 +00:00
phk
15c9ea202d Fix a bug in the ENOMEM pacing code which probably made it panic systems
after a lot of ENOMEM errors.
2003-03-29 22:34:37 +00:00
phk
cdc67e7072 Add create_geom and destroy_geom methods. 2003-03-29 22:14:21 +00:00
phk
2d56ed957a Run a revision on the OAM api.
Use prefix gctl_ systematically.
Add flag with access perms for each argument.
Add ro/rw versions of argument building functions.
General cleanup.
2003-03-27 14:35:00 +00:00
phk
5447a01760 Check return value of g_call_me() 2003-03-27 14:32:52 +00:00
phk
192c308033 g_class_by_name() was unused too. 2003-03-25 09:11:17 +00:00
phk
45e43ab0e8 Remove unuse g_insert_geom(). 2003-03-25 09:07:35 +00:00
phk
87ed6d02e4 Forward compatibility: NULL check the passed in meta argument. 2003-03-25 09:02:41 +00:00
phk
639a37daa0 Premptively change initializations of struct g_class to use C99
sparse struct initializations before we extend the struct with
new OAM related member functions.
2003-03-24 19:30:15 +00:00
phk
063b352331 Turn /dev/geom.ctl from a GEOM class into a plain character device driver
instead, it will never see a disk-I/O transaction, so this is a lot simpler.
2003-03-24 13:37:15 +00:00
phk
dc9d8429c2 Save a lock: Grab the stall_events SX lock exclusively so it also serialize
OAM reqests.
2003-03-24 13:35:06 +00:00
phk
8e76f1cefa Introduce g_cancel_events() and use it a couple of places where it makes
sense.
2003-03-23 23:01:40 +00:00
phk
3e8d794231 Introduce an SX lock which allows us to stall event processing
during OAM operations.
2003-03-23 21:58:09 +00:00
phk
0e60b8dd4b I forgot the evil ioctl census scripts: #include <geom/geom_ctl.h> 2003-03-23 11:05:44 +00:00
phk
35c6fd6e4d Marshalling stuff for OAM API. 2003-03-23 10:16:14 +00:00
phk
e6351bec2e A note about which #include files may be used where. 2003-03-23 10:08:13 +00:00
phk
3413b5f1fe Start leaking the AOM api into the tree. 2003-03-23 10:07:44 +00:00
phk
9dd05c47c0 Mitigate deadlock situation pending a more complete solution. 2003-03-21 22:05:33 +00:00
phk
abd9cc6d2b Retire the GEOM private statistics code and use devstat instead. 2003-03-18 09:42:33 +00:00
phk
e059b79437 Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
phk
127bfb5486 #ifdef notyet a bit of code which needs not yet committed refcounting to
work correctly.
2003-03-16 16:29:04 +00:00
phk
0e540e1b29 Use devstat_{start,end}_transaction_bio().
Remember to set bio_resid correctly first.
2003-03-15 10:49:26 +00:00
phk
29e1315705 If we run out of consumers while orphaning them, and the provider's geom
is withering, destroy the provider when done.

This was exposed by the recent change to geom_dev's orphaning logic.
2003-03-10 23:41:41 +00:00
phk
35dab36ffa Fix yet another fallout of our M_* song and dance. 2003-03-10 23:34:12 +00:00
phk
c4bc634fce Remove unneeded #include of geom_stats.h 2003-03-09 10:04:21 +00:00
phk
8da8aa2622 Stamp out Danglish. 2003-03-09 10:02:31 +00:00
phk
418634ed06 Don't use statistics counters to detect outstanding I/O. 2003-03-09 10:01:16 +00:00
phk
d2601e2480 Don't abuse the statistics counters for detecting if we have outstanding
I/O requests, instead use the new dedicated fields in the consumer and
provider to track this.
2003-03-09 09:59:48 +00:00
phk
b00bfcca9b Add u_int nstart, nend counters to consumer and providers so we will not
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.
2003-03-09 09:58:36 +00:00
phk
cdacd28664 When a DEV class consumer is orphan'ed we need to wait for all the
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.
2003-03-09 09:28:45 +00:00
phk
b454fc547a Allocate devstat structure with devstat_new_entry(). 2003-03-08 20:00:11 +00:00
phk
e01fc931cf Centralize the devstat handling for all GEOM disk device drivers
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.
2003-03-08 08:01:31 +00:00