summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not do the ``swap generic'' behaviour if rootdev != NODEV when enteringmiod2008-03-301-2/+2
| | | | | setroot(), as this neuters RAIDframe autoconfiguration; found the hard way by naddy@
* setroot() is supposed to be safe in all cases, so kill the special casesderaadt2008-03-231-4/+1
| | | | for RB_DFLTROOT; ok miod
* protect the disk statistics with a mutex.dlg2007-12-231-3/+9
| | | | ok tedu@ kettenis@
* panic on negative blkno or size; ok kettenis@ deraadt@otto2007-12-161-1/+4
|
* Make disklabel aware of NTFS.jsing2007-11-091-1/+6
| | | | ok miod@ krw@
* Use M_ZERO in a few more places to shave bytes from the kernel.art2007-09-071-6/+4
| | | | eyeballed and ok dlg@
* Move some printf's about disklabel disksize and RAW_PART size/offsetkrw2007-08-051-15/+13
| | | | | | | under #ifdef DEBUG. Adjust the verbiage. Some minor tweaks while in the area. ok deraadt@
* Use d_partitions[DISKPART(dev)] rather that d_partitions +krw2007-08-051-2/+2
| | | | | | DISKPART(dev). Thus making the idiom the same everywhere. pointed out by deraadt@
* use daddr64_t for size in bounds_check_with_label(); prompted by miod@;otto2007-06-251-2/+2
| | | | ok deraadt@
* b_cylinder does not need to be set on the callpath down into drivers.deraadt2007-06-201-19/+6
| | | | cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
* significantly simplified disklabel infrastructure. MBR handling becomes MIderaadt2007-06-171-44/+350
| | | | | | | | to support hotplug media on most architectures. disklabel setup and verification done using new helper functions. Disklabels must *always* have a correct checksum now. Same code paths are used to learn on-disk location disklabels, to avoid new errors sneaking in. Tested on almost all cases, testing help from todd, kettenis, krw, otto, dlg, robert, gwk, drahn
* when we change fields in the label to version 1, fix the checksum (but onlyderaadt2007-06-101-4/+15
| | | | if it was ok beforehands)
* blocks/sectors != blocks/blocks. Fix calculation of b_cylinder inkrw2007-06-091-8/+6
| | | | | bounds_check_with_label(). Tweak error path to eliminate duplicate code.
* The differences in the last non-homogeneous bounds_check_with_label()krw2007-06-091-1/+47
| | | | | | | | routines (alpha, vax) prove to be not worth keeping. Move bounds_check_with_label() into the MI world. Eliminate unreliable and almost certainly useless checks for overwriting a disklabel. After discussion with deraadt@
* silently whack wrong-sized C partitionsderaadt2007-06-091-6/+3
|
* handle C non-0 start after doing v1 converstion.. sighderaadt2007-06-091-8/+8
|
* by hand i carefully found that all the differences in setdisklabel()deraadt2007-06-091-1/+55
| | | | | implimentations were simply either missing code, or spacing and such. setdisklabel() can become MI now.
* be even more forceful with RAW_PART (and note this is the wrong, and temporary, placederaadt2007-06-091-2/+6
|
* push RAW_PART to 0 if it is non-zero, and bitchderaadt2007-06-091-1/+6
|
* fix format strings for block #'s now that they are 64 bit; ok tedu (whoderaadt2007-06-061-3/+4
| | | | also spotted one more)
* now that all partition size/offsets are potentially 64-bit, change thederaadt2007-06-061-6/+6
| | | | | | | type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
* oopsderaadt2007-06-061-2/+2
|
* even more problems with disk size consistancy checksderaadt2007-06-061-2/+2
|
* use six new macros to access & store the 48-bit disklabel fields relatedderaadt2007-06-051-13/+16
| | | | | to size. tested on almost all machines, double checked by miod and krw next comes the type handling surrounding these values
* disable a part of the label validation because some Sun systemsderaadt2007-06-041-2/+5
| | | | have contradictory information in their cyl-based labels
* Rename cvtdisklabelv1 -> disklabeltokernlabel. It does more than justkrw2007-06-021-3/+5
| | | | | | | | convert version 0 to version 1 disklabels. Suggested by deraadt@. ok deraadt@ otto@
* Add two constraints to V1 disklabels:krw2007-06-011-15/+28
| | | | | | | | | | 1) All partitions must start before the end of the disk. 2) All partitions must end at or before the end of the disk. Partitions not satisfying these constraints will be truncated and marked FS_UNUSED. ok otto@ deraadt@
* Updated disklabel format to support larger disks and partitions. Weotto2007-05-291-1/+26
| | | | | | | | | | | free room in struct partition by packing fragment size and fragments/block more tighlty and use the resulting space to make offset and size 48 bits. For the disk part we use spare fields in struct disklabel. Kernel converts in-mem copy of the on-disk label if needed, disklabel(8) writes new version. We are careful to only change fields not used by bootloaders. Conception of basic scheme by deraadt. ok deraadt@ krw@
* Dont write to the string passed to parsedisk(), ok deraadt@drahn2007-05-181-8/+8
|
* in case of pre-configured nfs, we must assume that the bootdv is the rootdvderaadt2007-05-181-1/+2
|
* now that setroot() prints nice things like:deraadt2007-05-151-1/+3
| | | | | | | root on sd0a swap on sd0b dump on sd0b we can skip printing: rootdev=0x400 rrootdev=0xd00 rawdev=0xd02 ok miod, no objections from other lazy slackers
* also print where (primary) swap and dumps are; ok miodderaadt2007-05-101-4/+13
|
* Kill disk_find and disk_resetstat that noone uses. If you ever needart2007-05-051-45/+1
| | | | them, they are still in cvs.
* when we are in ramdisk mode, we must also disable any previous mountrootderaadt2007-05-041-1/+2
| | | | | setting that pre-setroot() code did (for instance a network boot) found by phessler, tested by reyk
* make findblkmajor() and findblkname() MI; ok miodderaadt2007-05-041-1/+26
|
* setroot() was a ugly mix of MI and MD code, with different bugs on differentderaadt2007-05-041-1/+266
| | | | | | machines. Instead -- build one solid clean MI version, and thenchange all the architectures to use it. ok various people, tested on almost all cases. (it is a 10094 line diff..)
* replace lockmgr locks with rwlocks. these are no longer recursive, but theydlg2007-03-301-5/+4
| | | | | | weren't used recursively anyway. tested by hsoexer@ fkr@ ok pedro@
* Remove an #ifdef LFS chunk from dk_mountroot();thib2007-03-271-9/+1
| | | | ok pedro@
* One more (!foo & BAR) bogus test.miod2006-05-111-2/+2
|
* ansi and deregister. No binary change.jsg2005-12-091-37/+20
|
* Remove unnecessary lockmgr() archaism that was costing too much in termspedro2005-11-191-5/+3
| | | | | | of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-3/+2
| | | | no change in compiler assembly output.
* check for malloc() in bufq_default_alloc(), ok tedu@pedro2004-11-011-1/+4
|
* remove dead 'ifdef tahoe' code, ok millert@ deraadt@pedro2004-10-251-4/+1
|
* This moves access to wall and uptime variables in MI code,tholo2004-06-241-17/+6
| | | | | | | | | | | | | | encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
* new arg to disk_unbusy, to record separate read/write statistics.tedu2004-02-151-8/+16
| | | | | looked at by various, testing henning@ mcbride@ dan weeks mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>
* dynamic bufq support. basically a nullop. ok grange@tedu2004-01-211-1/+21
|
* implement new means of manipulating buf queues, bufq.tedu2003-06-251-1/+36
| | | | | | | | | | | | accessed with BUFQ macros, bufq structs support extensible, potentially changable algorithms and queue formats. the current default scheme should support nice priority based queuing, but is missing some vfs_bio.c support. only on wd.c for now, other drivers are easy converts. as a side bonus, this makes the driver code look cleaner. idea for the name comes from netbsd, but this scheme is incompatible. thanks to various people for testing. ok grange@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* First round of __P removal in sysmillert2002-03-141-8/+8
|