Poul-Henning Kamp
6c87f8d5ea
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
Poul-Henning Kamp
f075585f67
Remove the G_CLASS_INITIALIZER, we do not need it anymore.
2003-05-31 16:59:27 +00:00
Poul-Henning Kamp
7e28a78f0e
Use le_uuid_dec() since GPT UUID's are always in LE format.
...
Tested by: Marcel
2003-05-31 16:48:43 +00:00
Poul-Henning Kamp
43f0db6cc5
Don't do silly thing if the disk_create() event gets canceled.
...
Approved by: re/scottl
2003-05-25 16:57:10 +00:00
Poul-Henning Kamp
67fd2837cd
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
Poul-Henning Kamp
3eb8c738fd
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
Poul-Henning Kamp
4da6e74ce4
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
Poul-Henning Kamp
2cc9686e52
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
Poul-Henning Kamp
c9e629297a
Fix the WARNING for wrong rawoffset, I tested incompatible units.
...
Approved by: re/jhb
2003-05-06 19:36:13 +00:00
Poul-Henning Kamp
af3e2db5de
Avoid double-free panic.
...
Tripped up: DougB
2003-05-05 15:52:11 +00:00
Poul-Henning Kamp
c0c393a2aa
Re-order the the initialization slightly to improve structure.
2003-05-05 08:58:12 +00:00
Poul-Henning Kamp
0195276f54
Use a dedicated malloc(9) bucket for sector storage.
2003-05-05 08:37:07 +00:00
Poul-Henning Kamp
3fd530f7ec
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
Poul-Henning Kamp
b9275c8fc6
Turn the check that rawoffset == mbroffset into a warning instead.
2003-05-05 06:46:49 +00:00
Poul-Henning Kamp
b624374de8
Only accept a rawoffset if it is identical to the mbroffset.
2003-05-04 19:26:31 +00:00
Poul-Henning Kamp
7f9e81b703
Add a way to read the current mbroffset from a BSD label class.
2003-05-04 19:25:48 +00:00
Poul-Henning Kamp
1ee055e692
Add gctl_set_param() function.
2003-05-04 19:24:34 +00:00
Poul-Henning Kamp
ce40bcd0d1
Remove debugging printfs which should not have been committed.
2003-05-04 18:48:25 +00:00
Poul-Henning Kamp
a767c3daa3
Add a OAM interface for changing the label and writing the boot code.
2003-05-03 08:01:34 +00:00
Poul-Henning Kamp
951fd0d157
remove unused variables.
...
Spotted by: dougb
2003-05-03 07:12:15 +00:00
Poul-Henning Kamp
56dde750d5
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
Poul-Henning Kamp
81377a3f17
Pull in bcopy() prototype from <string.h> when compiled in userland.
2003-05-02 19:53:55 +00:00
Poul-Henning Kamp
039b4cba75
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
Poul-Henning Kamp
3daf7274a1
Style improvement.
2003-05-02 12:57:40 +00:00
Poul-Henning Kamp
3110102a73
Use g_wither_geom() and plug memory leaks.
2003-05-02 12:52:51 +00:00
Poul-Henning Kamp
3e7b7bb1cb
Plug memory leaks.
2003-05-02 12:49:41 +00:00
Poul-Henning Kamp
5ffb2c8bfd
Use an uma-zone for allocation bio requests.
2003-05-02 12:36:12 +00:00
Poul-Henning Kamp
c9c29450f5
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
Poul-Henning Kamp
7da144d91c
Use g_slice_spoiled() instead of g_std_spoiled().
2003-05-02 08:21:02 +00:00
Poul-Henning Kamp
a0c89548a3
Use g_slice_spoiled().
...
Free buffer from g_read_data().
2003-05-02 08:13:03 +00:00
Poul-Henning Kamp
c4da4e46b2
Back out all the stuff that didn't belong in the last commit.
2003-05-02 06:42:59 +00:00
Poul-Henning Kamp
e65ab0f83f
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
Poul-Henning Kamp
4f806d2428
Use g_slice_spoiled() not g_std_spoiled()
2003-05-02 06:34:51 +00:00
Poul-Henning Kamp
28ce9efcef
Use g_slice_spoiled() rather than g_std_spoiled()
2003-05-02 06:33:59 +00:00
Poul-Henning Kamp
afec8eb8ad
Use g_slice_spoiled() rather than g_std_spoiled().
2003-05-02 06:33:26 +00:00
Poul-Henning Kamp
15649213a6
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
Poul-Henning Kamp
3ddef7422c
Style improvement.
2003-05-02 06:22:48 +00:00
Poul-Henning Kamp
03af3a23dd
Use g_wither_geom() for cleanup.
2003-05-02 06:22:32 +00:00
Poul-Henning Kamp
d6227ae71f
Rework the "withering" mechanism:
...
Introduce g_wither_geom() to do the work in one single place.
2003-05-02 06:15:27 +00:00
Poul-Henning Kamp
82b53b8dc8
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
Poul-Henning Kamp
516b02faf7
style improvement.
2003-05-02 05:26:47 +00:00
Poul-Henning Kamp
9dfffbc959
Get rid of trivial function g_destroy_event().
2003-05-02 05:26:19 +00:00
Poul-Henning Kamp
6a543b1031
Plug some memory-leaks.
2003-05-01 21:07:08 +00:00
Poul-Henning Kamp
606402511a
Remove the now obsolete geomidorname hack.
2003-05-01 20:32:24 +00:00
Poul-Henning Kamp
c8589ad169
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
Poul-Henning Kamp
2ab31b05ba
When events on a reference is cancelled, check our doorstep first,
...
it might be an orphan.
2003-05-01 19:24:00 +00:00
Poul-Henning Kamp
e931331eaa
Remove now unneeded special case for "geom.ctl".
2003-05-01 18:18:14 +00:00
Yoshihiro Takahashi
4b4582a84c
Remove DIOCGPC98 ioctl.
2003-05-01 14:40:16 +00:00
Yoshihiro Takahashi
50cf98ed97
- Move decoding pc98_partition function into geom_pc98_enc.c.
...
- Add encoding pc98_partition function.
2003-05-01 13:44:24 +00:00
Marcel Moolenaar
b52e9eb6b6
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