summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Don't use the static thread.. it is going away.julian2002-06-291-2/+2
|
* Add two new submodes to the AES encryption method.phk2002-06-281-11/+121
| | | | | | This method is now suitable for encrypting swap spaces. Sponsored by: DARPA & NAI Labs.
* Put geom_gpt.c under the GEOM option instead of having a special GEOM_GPTphk2002-06-101-3/+1
| | | | option for it.
* Improve some on the naming.phk2002-06-0912-53/+55
| | | | Submitted by: iedowse
* Change the registration of magic spaces so it does its own memory management.phk2002-06-055-36/+43
| | | | Sponsored by: DARPA & NAI Labs.
* Add compile time asserts for the size of struct gpt_hdr and structmarcel2002-05-301-0/+3
| | | | gpt_ent. Use offsetof() for struct gpt_hdr to exclude padding.
* Add one copy of crc32() and crc32_tab[] in libkern, and remove it two otherphk2002-05-291-65/+0
| | | | | | | places. Comment out crc32 related definitions in zlib.h, we don't seem to have the corresponding code in our kernel.
* Add support to GEOM for GUID Partition Tables (GPTs). The supportmarcel2002-05-282-0/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is currently conditional on both the GEOM and GEOM_GPT options to avoid getting GPT by default and having the MBR and GPT classes clash. The correct behaviour of the MBR class would be to back-off (reject) a MBR if it's a Protective MBR (a MBR with a single partition of type 0xEE that spans the whole disk (as far as the MBR is concerned). The correct behaviour if the GPT class would be to back-off (reject) a GPT if there's a MBR that's not a Protective MBR. At this stage it's inconvenient to destroy a good MBR when working with GPTs that it's more convenient to have the MBR class back-off when it detects the GPT signature on disk and have the GPT class ignore the MBR. In sys/gpt.h UUIDs (GUIDs) for the following FreeBSD partitions have been defined: GPT_ENT_TYPE_FREEBSD FreeBSD slice with disklabel. This is the equivalent of the well-known FreeBSD MBR partition type. GPT_ENT_TYPE_FREEBSD_{SWAP|UFS|UFS2|VINUM} FreeBSD partitions in the context of disklabel. This is speculating on the idea to use the GPT to hold partitions instead if slices and removing the fixed (and low) limits we have on the number of partitions. This commit lacks a GPT image for the regression suite.
* Add a proof-of-concept encryption class.phk2002-05-261-0/+274
| | | | | | | | | | | | | | | | "The only hard problem in cryptography is key-management." All sectors are encrypted with AES in CBC mode using a constant key, currently compiled in and all zero. To activate this module, write the magic header on the partition: echo "<<FreeBSD-GEOM-AES>>" | dd conv=sync of=/dev/md98 The encrypted device will be one sector shorter and have ".aes" appended to its name. Sponsored by: DARPA & NAI Labs.
* Give the closet-dev_t we hand to the diskdrivers a name.phk2002-05-261-0/+1
|
* Only clear the spoiled flag if the class had no spoiled method, the spoiledphk2002-05-261-1/+2
| | | | | | | method may have deallocated the consumer already and modifying free()'ed memory is bad style. Sponsored by: DARPA & NAI Labs.
* Fixed printf format errors. Most of them are 64-bit daddr_t casualties.bde2002-05-251-4/+6
| | | | | | | | | | | | Printing daddr_t's using %d format was always an error, but gcc's warning about it was ignored for supported 64-bit arches and not printed for supported 32-bit arches. Hundreds if not thousands thousands of previously "fixed" daddr_t printings are now broken on 32-bit machines by casting daddr_t's to longs. daddr_t's should be printed using %jd format, but this fix uses %lld since %j is not implemented in the kernel yet. Fixed some nearby format printf errors (style bugs).
* Introduce the concept of "magic spaces", and implement them in most ofphk2002-05-216-3/+108
| | | | | | | | | | | | | | | | the relevant classes. Some methods may implement various "magic spaces", this is reserved or magic areas on the disk, set a side for various and sundry purposes. A good example is the BSD disklabel and boot code on i386 which occupies a total of four magic spaces: boot1, the disklabel, the padding behind the disklabel and boot2. The reason we don't simply tell people to write the appropriate stuff on the underlying device is that (some of) the magic spaces might be real-time modifiable. It is for instance possible to change a disklabel while partitions are open, provided the open partitions do not get trampled in the process. Sponsored by: DARPA & NAI Labs.
* Remove the "-class" suffix from classes, they will not be ambiguous.phk2002-05-216-8/+8
| | | | Sponsored by: DARPA & NAI Labs.
* Don't grab Giant around malloc(9) and free(9).phk2002-05-204-59/+44
| | | | | | | | Don't grab Giant around wakeup(9). Don't print verbose messages about each device found in geom_dev. Various cleanups. Sponsored by: DARPA & NAI Labs.
* Generalize a bit: we don't need separate functions to find the i386 andphk2002-05-191-33/+9
| | | | | | alpha disklabels, just one function which is told where to look. Sponsored by: DARPA & NAI Labs.
* Include needed #include for regression tests.phk2002-05-191-2/+1
| | | | Sponsored by: DARPA & NAI Labs.
* Retire the bogus uses of the disklabel field d_sbsize and begin tophk2002-05-121-2/+1
| | | | | | | initialize it to zero so we don't have to have everbody and their aunt including FFS specific header files. Sponsored by: DARPA & NAI Labs.
* Fix a {} bug which doesn't have any effect yet.phk2002-04-271-2/+1
| | | | Spotted by: jake
* Improve the cross-references in the XML output.phk2002-04-241-12/+9
| | | | | Explained by: des Sponsored by: DARPA & NAI Labs.
* Make specific provisions for the kernel simulator used in the regressionphk2002-04-241-1/+1
| | | | | | tests, other userland programs may need to include <geom/geom.h>. Sponsored by: DARPA & NAI Labs.
* Implement the GEOMGETCONF ioctl which returns vital stats for thephk2002-04-234-14/+43
| | | | | | current device in XML in an sbuf. Sponsored by: DARPA & NAI Labs
* All in a days work: make a function static.phk2002-04-232-2/+1
|
* Introduce some serious paranoia to try to catch a memory overwrite problemphk2002-04-235-6/+63
| | | | | | as early as possible. Sponsored by: DARPA & NAI Labs
* Protect against multitple #includes of this file.phk2002-04-221-0/+4
|
* Make kernel dumps work with GEOM.phk2002-04-194-0/+53
| | | | | | | | | | Notice that if the device on which the dump is set is destroyed for any reason, the dump setting is lost. This in particular will happen in the case of spoilage. For instance if you set dump on ad0s1b and open ad0 for writing, ad0s* will be spoilt and the dump setting lost. See geom(4) for more about spoiling. Sponsored by: DARPA & NAI Labs.
* Make life easier for reference-vector generatorts in tools/regression/geomphk2002-04-191-0/+3
| | | | | | by including a FreeBSD friendly CVS identifier in the XML output. Sponsored by: DARPA & NAI Labs.
* Implement DIOCGFRONTSTUFF ioctl which reports how many bytes from the startphk2002-04-098-43/+87
| | | | | | of the device magic stuff might occupy. Sponsored by: DARPA & NAI Labs.
* Various stylistic nit picking.phk2002-04-093-16/+16
| | | | Sponsored by: DARPA & NAI Labs.
* Introduce the convenience function g_getattr() and make it DWIM.phk2002-04-092-0/+15
| | | | Sponsored by: DARPA & NAI Labs.
* Constifixation of attribute argument to g_io_[gs]etattr()phk2002-04-092-4/+4
| | | | Sponsored by: DARPA & NAI Labs
* Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.phk2002-04-081-1/+1
| | | | Sponsored by: DARPA & NAI Labs
* In reverence of the 3rd X11 development rule:phk2002-04-082-6/+0
| | | | | | | | | | 3.The only thing worse than generalizing from one example is generalizing from no examples at all. Remove the fwcylinders attribute before anybody gets the idea that we alone have squared the circle. Sponsored by: DARPA & NAI Labs.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-042-2/+2
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Centralize EOF handling and improve access controls for bio scheduling.phk2002-04-044-44/+71
| | | | Sponsored by: DARPA & NAI Labs
* Move access and orphan member functions from class to geom.phk2002-04-0411-36/+31
| | | | Sponsored by: DARPA & NAI Labs
* s/classs/classes/ to fixup grammer after the previous global renaming.phk2002-04-044-8/+8
| | | | Sponsored by: DARPA & NAI Labs
* Retire the bogus ioctl DIOCGPART in toto.phk2002-04-022-20/+0
| | | | | | | Once again we can notice that badly thought out hacks ferment and infect far more code than initially expected. Sponsored by: DARPA and NAI Labs.
* One less user of the bogus DIOCGPART ioctl.phk2002-04-021-12/+16
|
* Initialize a field to cater for ata-raidphk2002-04-021-0/+1
|
* Here follows the new kernel dumping infrastructure.phk2002-03-311-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caveats: The new savecore program is not complete in the sense that it emulates enough of the old savecores features to do the job, but implements none of the options yet. I would appreciate if a userland hacker could help me out getting savecore to do what we want it to do from a users point of view, compression, email-notification, space reservation etc etc. (send me email if you are interested). Currently, savecore will scan all devices marked as "swap" or "dump" in /etc/fstab _or_ any devices specified on the command-line. All architectures but i386 lack an implementation of dumpsys(), but looking at the i386 version it should be trivial for anybody familiar with the platform(s) to provide this function. Documentation is quite sparse at this time, more to come. Details: ATA and SCSI drivers should work as the dump formatting code has been removed. The IDA, TWE and AAC have not yet been converted. Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set the device as dumpdev. To implement the "off" argument, /dev/null is used as the device. Savecore will fail if handed any options since they are not (yet) implemented. All devices marked "dump" or "swap" in /etc/fstab will be scanned and dumps found will be saved to diskfiles named from the MD5 hash of the header record. The header record is dumped in readable format in the .info file. The kernel is not saved. Only complete dumps will be saved. All maintainer rights for this code are disclaimed: feel free to improve and extend. Sponsored by: DARPA, NAI Labs
* Remove bogus ccddump() function in favour of the standard nodump.phk2002-03-291-10/+1
|
* Complete an incomplete cut&paste operation.phk2002-03-281-3/+3
|
* Add preliminary PC98 class to GEOM.phk2002-03-281-0/+189
| | | | | | | | I have not been able to find very much information about the PC98 extended partition layout so this is gleaned from the source in our pc98 architecture. Corrections and patched very welcome. Sponsored by: DARPA and NAI Labs.
* In the absense of any smarter way to do this, cast various printfphk2002-03-286-13/+15
| | | | arguments to silence printf format warnings.
* Calculate the checksum the right place for alpha. The fact that thisphk2002-03-271-1/+1
| | | | | worked for the beast disklabel only goes to show how weak a simple parity really is.
* Eliminate some thread pointers which do not make sense anymore.phk2002-03-2614-90/+140
| | | | | Split private parts of geom.h into geom_int.h. The latter should never be included in class implemtations.
* Cave in to tradition and rename "methods" to "classes".phk2002-03-2612-122/+122
|
* Push BIO_FORMAT into a local hack inside the floppy drivers wherephk2002-03-261-1/+0
| | | | it belongs.
* Make the BSD method width/endian agnostic and support alphaphk2002-03-241-11/+187
| | | | | | architecture labels as well. Sponsored by: DARPA, NAI Labs.
OpenPOWER on IntegriCloud