Commit Graph

477 Commits

Author SHA1 Message Date
phk
da80cf8fcc Appearantly UFS no longer issues BIO_DELETE requests correctly, and
consequently trashes data.  Disable BIO_DELETE handling in gbde for now.
2003-04-26 21:39:33 +00:00
phk
876e7e7a6d Do an explicit retry after we have dumped the cache, rather than a
(potential) tail recursion.
2003-04-25 21:43:11 +00:00
phk
82e4f296ff If on a BIO_READ request, we failed to allocate the bio for reading
our key-sector, we would end up returning the read without an error,
despite the fact that the data was not correctly decrypted.

This would result in data corruption on read, but intact data still
on the media.
2003-04-25 21:28:28 +00:00
phk
017246b9b8 Fix a problem and slightly improve the ENOMEM handling:
Give up the entire bio as soon as we detect a problem.

When we detect a problem, give up the bio by contributing the
remainder with ENOMEM, rather than kicking the bio back right
away.

If we failed on a non-first iteration we previously could end up
modifying fields in the bio after we delivered it.  This could
account for memory corruption (none directly reported) on machines
with GBDE.
2003-04-25 21:20:57 +00:00
phk
e2ee68d54b Don't count a sector in the cache unless we manage to create it. 2003-04-25 20:56:27 +00:00
phk
b2fdd2cc0f Rename g_bde_release_sector() to g_bde_release_keysector() and pick up
the sector from the work item.
2003-04-25 20:35:34 +00:00
phk
5b6422dcef Rename g_bde_read_sector() to g_bde_read_keysector() pick up the offset
in the work structure.
2003-04-25 20:16:59 +00:00
phk
ffd04bfbdd Introduce a g_waitfor_event() function which posts an event and waits for
it to be run (or cancelled) and use this instead of home-rolled versions.
2003-04-23 21:28:27 +00:00
phk
7a7d406136 More of the event stuff can now be private to geom_event.c 2003-04-23 20:54:42 +00:00
phk
3bbfe9f43b Rename g_call_me() to g_post_event(), and give it a flag
argument to determine if we can M_WAITOK in malloc.
2003-04-23 20:46:12 +00:00
phk
b4c26d2e1a Remove the now unused hardcoded g_post_event() event support. 2003-04-23 20:25:33 +00:00
phk
7c462ceb2b Turn EV_NEW_PROVIDER into a g_call_me() event. 2003-04-23 20:16:13 +00:00
phk
67a31a6107 Convert EV_SPOILED event to use g_call_me(). 2003-04-23 20:06:38 +00:00
phk
16bcc257a6 Turn the hardwired NEW_CLASS event into a g_call_me() event. 2003-04-23 19:34:38 +00:00
phk
51e68a1f27 Move the shutdown eventhandler stuff to a more logical place. 2003-04-23 19:15:27 +00:00
phk
15a332bfd6 Implement CONFIG_GEOM verbs "write label" and "write bootcode". 2003-04-23 08:23:01 +00:00
phk
2d7e7620e8 Introduce gctl_get_paraml() which gets a parameter only if it has the
right length.
2003-04-23 08:03:47 +00:00
phk
90684346d6 Make gctl_error() take printfline varargs. 2003-04-23 07:50:01 +00:00
phk
ee10d53986 Remove unused event pointers in object structures.
Remove KASSERTS which checked that they were unused.
2003-04-23 06:54:44 +00:00
phk
1e2ee18100 Change the locking so that the _modify function is called with topology
held.

The only place where we want to not hold topology is when we read
(or write) the label to disk: in the case of a disk error with a
long recovery time, holding topology would prevent open/close of
any disk device.
2003-04-22 21:29:58 +00:00
phk
5d4dba6264 We don't need to have a slice->start() function. 2003-04-22 21:24:37 +00:00
phk
13d95d603f Do not mandate that slicers have a private ->start(), they may not need
one.  KASSERT() that they have one if G_SLICE_HOT_START is used.
2003-04-22 21:19:17 +00:00
phk
c5dae9372b Implement handling of CONFIG_GEOM OAM request. 2003-04-22 21:01:46 +00:00
phk
02c40a0b9d Add "CONFIG_GEOM" operation to the OAM API. 2003-04-22 21:00:49 +00:00
phk
817cb6ca1f Collapse meta arguments into regular arguments, the distinction is
more trouble than it is worth.
2003-04-22 19:42:05 +00:00
phk
c99d9e1424 Implement a hotspot for the sunlabel.
This means that you can no longer trash your opened partitions by writing to
the sunlabel through another partition.  This is similar to the semantics
implemented for BSD labels.
2003-04-21 20:14:36 +00:00
phk
78e84f94ed Update GEOM::SUN to use the decoding functions in geom_sunlabel_enc.c
and #defines from sys/sun_disklabel.h.
2003-04-21 19:54:11 +00:00
phk
d5b1803a96 Use #defines from <sys/sun_disklabel.h> instead of private ones. 2003-04-21 19:42:36 +00:00
phk
9e9aeab27a Functions to encode and decode Sun Microsystems disk partitioning data
structures.

Mostly by:	jake
2003-04-21 18:41:12 +00:00
phk
db4d21ffaf Make more of the "hotspot" stuff generic:
Give the class a way to specify the necessary action for read/delete/write:
ALLOW, DENY, START or CALL.

Update geom_bsd to use this.
2003-04-19 10:14:39 +00:00
phk
a41f716e91 Create a dedicated structure for holding hotspot information rather than
using slice structures for it.
2003-04-19 10:00:22 +00:00
phk
52a551e4c5 These two files fell off during my previous commit: put the encoding
decoding functions for struct disklabel in a separate .c file.
2003-04-17 08:41:08 +00:00
phk
c10cd4d964 More correct patch: Only call biofinish if we have not already sent
any children down the mesh.
2003-04-14 08:49:54 +00:00
phk
e27444e997 Call biofinish() also when we get a malloc() failure. 2003-04-14 08:08:17 +00:00
phk
03b1ca36ba Time has run from the "run GEOM in userland" harness, and the new regression
test is built to test GEOM as running in the kernel.

This commit is basically "unifdef -D_KERNEL" to remove the mainly #include
related code to support the userland-harness.
2003-04-13 09:02:06 +00:00
phk
2e8ebbf548 If we hit access ahead of a spoil event, we should have negative
delta access-counts and proceed.
2003-04-12 17:04:34 +00:00
phk
bef7fcb806 Fix a bug which resulted in orphanization getting confused every now
and then.
2003-04-12 16:36:19 +00:00
phk
708a319e8e Retire the experimental bio_taskqueue(), it was not quite as usable as
hoped.  It can be revived from here, should other drivers be able to
use it.
2003-04-12 09:13:01 +00:00
phk
b08878d5ab Retire the "frontstuff" record keeping, it was no match for the
in-band meta-data of BSD labels and a more complex solution will be needed.
2003-04-12 08:41:26 +00:00
phk
e9d1c65d22 Move the functions for encoding decoding struct dos_partition into
a separate .c file so they can be used from userland as well.
2003-04-12 08:34:40 +00:00
phk
4a8ff05f17 Only be verbose if (bootverbose) 2003-04-09 13:52:40 +00:00
phk
b62dc48437 With the magic sequence checks removed this class is downright dangerous
to have in your kernel since it indiscriminately attaches to anything
it is offered with a range of bogus partitions.

Stop this from happening by rejecting any label with negative numbers in
it.
2003-04-09 13:08:36 +00:00
phk
1cbd421154 Correctly split cyl/sects bytes when we print them. 2003-04-09 09:21:33 +00:00
phk
3faf153e04 Style issue: use do {...} while(0); for multi-exit section. 2003-04-09 08:56:26 +00:00
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