phk
069191fcbf
Simplify the GEOM OAM api: Drop the request type, and let everything
...
hinge on the "verb" parameter which the class gets to interpret as
it sees fit.
Move the entire request into the kernel and move changed parameters
back when done.
2003-06-01 13:47:51 +00:00
phk
5a2388f470
constify g_sanity()
2003-06-01 13:30:39 +00:00
phk
305dd90d00
Use bcmp() to compare hash strings.
2003-06-01 09:18:49 +00:00
phk
cd37433ef9
Remove unused variable.
...
Remove unneeded return;
Found by: FlexeLint
2003-05-31 19:41:33 +00:00
phk
70af1dfe88
Remove unused variables.
...
Found by: FlexeLint
2003-05-31 19:40:43 +00:00
phk
dcb3c04301
Remove unused variables.
...
Rename struct h0h0 to g_hh01 in order to make it unique over files.
Found by: FlexeLint
2003-05-31 19:37:21 +00:00
phk
23436c40b9
Remove unused variables.
...
Remove #ifdef notyet which will never become.
Found by: FlexeLint
2003-05-31 19:30:52 +00:00
phk
f0f1321766
Remove unused variable.
...
Remove unneeded return.
Found by: FlexeLint
2003-05-31 19:29:38 +00:00
phk
ef00c86fce
Remove unused variable.
...
Found by: FlexeLint
2003-05-31 19:28:53 +00:00
phk
926fff03bf
Add a destroy_geom method to the slice "library".
...
If a slice class has no destroy_geom method, use this one.
This should allow all slicers to kldload.
2003-05-31 19:25:05 +00:00
phk
48e54f8060
Don't use & in front of arrays.
...
Found by: FlexeLint
2003-05-31 19:23:11 +00:00
phk
c48dbf1758
Remove unused variable.
...
Found by: FlexeLint
2003-05-31 19:08:23 +00:00
phk
b11f7951ec
Remove unused variable.
...
Found by: FlexeLint
2003-05-31 18:55:18 +00:00
phk
3325608f8f
Introduce a init and fini member functions on a class.
...
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
2003-05-31 18:13:07 +00:00
phk
e2298826ec
Remove the G_CLASS_INITIALIZER, we do not need it anymore.
2003-05-31 16:59:27 +00:00
phk
9c455f6a96
Use le_uuid_dec() since GPT UUID's are always in LE format.
...
Tested by: Marcel
2003-05-31 16:48:43 +00:00
phk
f716dc5d96
Don't do silly thing if the disk_create() event gets canceled.
...
Approved by: re/scottl
2003-05-25 16:57:10 +00:00
phk
8539560193
Return ENXIO if the softc pointer is NULL, in all likelyhood the
...
disk is in the process of disappearing.
Approved by: re/rwats*
2003-05-21 18:52:29 +00:00
phk
489ad07179
When a disk disappears, destroy the class from the event thread
...
to avoid race condtion.
Approved by: re/rwatson
2003-05-12 20:15:28 +00:00
phk
8ece7cbc43
When a GEOM (/dev-)device is closed and we find that I/O requests are
...
still outstanding, give them a chance to complete.
If after 10 seconds we still find outstanding I/O requests, complete
the close with a console warning that the system is likely to panic
later on.
This is a workaround for umount -f not quite doing the right thing.
Approved by: re/scottl
2003-05-09 21:25:28 +00:00
phk
4e002d7a93
Hide the "ENOMEM" notice messages behind bootverbose. They are still
...
a valuable debugging tool for certain kinds of problems.
Approved by: re/scottl
2003-05-07 05:37:31 +00:00
phk
3cc52c15ec
Fix the WARNING for wrong rawoffset, I tested incompatible units.
...
Approved by: re/jhb
2003-05-06 19:36:13 +00:00
phk
410334cfe0
Avoid double-free panic.
...
Tripped up: DougB
2003-05-05 15:52:11 +00:00
phk
3f2e0ad16d
Re-order the the initialization slightly to improve structure.
2003-05-05 08:58:12 +00:00
phk
d6ece911bb
Use a dedicated malloc(9) bucket for sector storage.
2003-05-05 08:37:07 +00:00
phk
0c30fa28a2
Don't warn if the rawoffset is zero, that is actually the best value it
...
could have.
2003-05-05 08:30:59 +00:00
phk
9f0560bebc
Turn the check that rawoffset == mbroffset into a warning instead.
2003-05-05 06:46:49 +00:00
phk
aac4aea759
Only accept a rawoffset if it is identical to the mbroffset.
2003-05-04 19:26:31 +00:00
phk
aa1b7d74da
Add a way to read the current mbroffset from a BSD label class.
2003-05-04 19:25:48 +00:00
phk
f1297dcac6
Add gctl_set_param() function.
2003-05-04 19:24:34 +00:00
phk
eb7e0cd5d2
Remove debugging printfs which should not have been committed.
2003-05-04 18:48:25 +00:00
phk
bbc021cef5
Add a OAM interface for changing the label and writing the boot code.
2003-05-03 08:01:34 +00:00
phk
3644496d4a
remove unused variables.
...
Spotted by: dougb
2003-05-03 07:12:15 +00:00
phk
2a47b08091
Make bsd_disklabel_le_enc calculate the checksum and fill it in.
...
(If there is a legitimate need to correctly encode and pack a
disklabel with an invalid checksum custom tools can be built for
that.)
Make bsd_disklabel_le_dec() validate the magics, number of partitions
(against a new parameter) and the checksum.
Vastly simplify the logic of the GEOM::BSD class implementation:
Let g_bsd_modify() always take a byte-stream label.
This simplifies all users, except the ioctl's which now have to
convert to a byte-stream first. Their loss.
g_bsd_modify() is called with topology held now, and it returns
with it held.
Always update the md5sum in g_bsd_modify(), otherwise the check
is no use after the first modification of the label. Make the
MD5 over the bytestream version of the label.
Move the rawoffset hack to g_bsd_modify() and remove all the
inram/ondisk conversions.
Don't configure hotspots in g_bsd_modify(), do it in taste instead,
we do not support moving the label to a different location on the
fly anyway.
This passes all current regression tests.
2003-05-02 22:46:13 +00:00
phk
3f52da0d28
Pull in bcopy() prototype from <string.h> when compiled in userland.
2003-05-02 19:53:55 +00:00
phk
d73072efd4
Considering that I did cast the arguments to (intmax_t) I must have
...
been sleepy since I used %qd instead of %jd.
2003-05-02 19:08:57 +00:00
phk
5ffbb6f148
Style improvement.
2003-05-02 12:57:40 +00:00
phk
3708ab2594
Use g_wither_geom() and plug memory leaks.
2003-05-02 12:52:51 +00:00
phk
637729fea0
Plug memory leaks.
2003-05-02 12:49:41 +00:00
phk
26f669a3c9
Use an uma-zone for allocation bio requests.
2003-05-02 12:36:12 +00:00
phk
94c69d48c9
Use g_slice_spoiled() instead of g_std_spoiled().
...
Add XXX comment about minor memory leak until I can fix it.
2003-05-02 08:33:26 +00:00
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