phk
7636503a41
Use g_slice_spoiled() instead of g_std_spoiled().
2003-05-02 08:21:02 +00:00
phk
d2b42c6620
Use g_slice_spoiled().
...
Free buffer from g_read_data().
2003-05-02 08:13:03 +00:00
phk
055cf65eb1
Back out all the stuff that didn't belong in the last commit.
2003-05-02 06:42:59 +00:00
phk
4c52a206d2
Use g_slice_spoiled() rather than g_std_spoiled().
...
Remember to free the buffer we got from g_read_data().
2003-05-02 06:36:14 +00:00
phk
6b0e95eef5
Use g_slice_spoiled() not g_std_spoiled()
2003-05-02 06:34:51 +00:00
phk
0a7a0e5019
Use g_slice_spoiled() rather than g_std_spoiled()
2003-05-02 06:33:59 +00:00
phk
077126a4be
Use g_slice_spoiled() rather than g_std_spoiled().
2003-05-02 06:33:26 +00:00
phk
4ac5216f83
Use a more tailored spoil routine for slices, and take advantage of
...
g_wither_geom() to do most of the work for us.
2003-05-02 06:29:33 +00:00
phk
dfdb8ebb84
Style improvement.
2003-05-02 06:22:48 +00:00
phk
e39be99d04
Use g_wither_geom() for cleanup.
2003-05-02 06:22:32 +00:00
phk
098143e63b
Rework the "withering" mechanism:
...
Introduce g_wither_geom() to do the work in one single place.
2003-05-02 06:15:27 +00:00
phk
cb4841eb7e
Rename g_slice_init() to the more appropriate g_slice_alloc() and give
...
it a g_slice_free() partner function.
2003-05-02 05:33:27 +00:00
phk
47865226a5
style improvement.
2003-05-02 05:26:47 +00:00
phk
a49f8acd23
Get rid of trivial function g_destroy_event().
2003-05-02 05:26:19 +00:00
phk
ea4d816aa1
Plug some memory-leaks.
2003-05-01 21:07:08 +00:00
phk
c51ae09b82
Remove the now obsolete geomidorname hack.
2003-05-01 20:32:24 +00:00
phk
26e81abf93
Add a new flag, EV_CANCELED, and use it to make g_waitfor_event() return
...
EAGAIN if an event got canceled.
2003-05-01 19:43:52 +00:00
phk
2ae9241429
When events on a reference is cancelled, check our doorstep first,
...
it might be an orphan.
2003-05-01 19:24:00 +00:00
phk
def0071c3d
Remove now unneeded special case for "geom.ctl".
2003-05-01 18:18:14 +00:00
nyan
0ecbcb89a3
Remove DIOCGPC98 ioctl.
2003-05-01 14:40:16 +00:00
nyan
313e553205
- Move decoding pc98_partition function into geom_pc98_enc.c.
...
- Add encoding pc98_partition function.
2003-05-01 13:44:24 +00:00
marcel
d39162a421
Don't emulate a MBR by handling the MBR::type attribute. It is
...
not needed at all. The BSD class will attach to a GPT class without
it.
2003-05-01 01:51:28 +00:00
markm
6cc289554b
Fix some easy, global, lint warnings. In most cases, this means
...
making some local variables static. In a couple of cases, this means
removing an unused variable.
2003-04-30 12:57:40 +00:00
phk
a43e2a0d8e
Fix an obscure fencepost error in GBDE's sector mapping code:
...
For certain combinations of sectorsize, mediasize and random numbers
(used to define the mapping), a multisector read or write would ignore
some subset of the sectors past the first sector in the request because
those sectors would be mapped past the end of the parent device, and
normal "end of media" truncation would zap that part of the request.
Rev 1.19+1.20 of g_bde_work.c added the check which should have alerted
me to this happening. This commit maps the request correctly and
adds KASSERTS to make sure things stay inside the parent device.
This does not change the on-disk layout of GBDE, there is no need to
backup/restore.
2003-04-29 19:46:42 +00:00
phk
df12452858
Typo in last commit: Do not press xZZ to leave vi(1).
2003-04-29 19:38:55 +00:00
phk
46e72efe59
When a bio comes back from below with a zero error code, check that
...
it wrote the full length. The only case where this should be able
to happen is if we try to read/write past the end and the request
is truncated. We obviously should never try to do that, so this
code should never activate.
2003-04-29 19:37:36 +00:00
kan
9468fdaf14
Deprecate machine/limits.h in favor of new sys/limits.h.
...
Change all in-tree consumers to include <sys/limits.h>
Discussed on: standards@
Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-04-29 13:36:06 +00:00
phk
647f79f459
I accidentally leaked this debugging tool in with my last commit.
...
Disable it with a direct warning.
2003-04-28 17:57:12 +00:00
phk
1b6624b999
Rename g_bde_get_sector() to g_bde_get_keysector() and pick up the
...
offset from the work packet.
2003-04-28 06:38:31 +00:00
phk
1adaf3d22c
Only attempt total cache-purge once in case of failure.
2003-04-28 06:19:41 +00:00
phk
5299f69145
Better criteria for skipping disk reading BIO_READ work packets.
2003-04-28 06:15:39 +00:00
phk
600f5cf898
Explicitly set the sector state to JUNK if we encounter a read-error.
2003-04-28 06:10:35 +00:00
phk
cd6350ca83
Bail as soon as the first write request has failed, there is no point
...
in trying the second write if the first one went nowhere.
2003-04-26 21:40:26 +00:00
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