summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum/vinumio.c
Commit message (Collapse)AuthorAgeFilesLines
* Initalize buffer headers correctly for current version of bio subsystem.grog2003-11-241-0/+1
| | | | | | | Not mentioned by: phk Approved by: re (scottl) This makes Vinum work again, at least in my testing.
* Fix vinum by correctly setting the b_offset bio filed when doing I/O.scottl2003-11-231-0/+1
| | | | Submitted by: grog
* #ifdef __i386__ the "int slice" definition that became i386-only withrwatson2003-08-151-0/+2
| | | | | | | recent Vinum changes. Fixes non-i386 build on vinumio.c. Accidental oversight of: grog Fix hopefully not minded by: grog
* vinum_scandisk:grog2003-08-151-1/+5
| | | | | | | | | | Correctly handle additional disks without BIOS partition tables. Previously, vinum_scandisk stopped scanning additional disks for native partitions after any good partition was found. This applies to all platforms, but was a particular problem on systems without BIOS partition tables. Submitted by: harti
* Drop Giant when calling the disk drivers directly, and reacquiregrog2003-08-151-4/+13
| | | | | | afterwards. This fixes the Vinum breakage in -CURRENT. Breakage explained by: phk
* Check compatibility partitions on all archs. This makes vinumharti2003-06-231-2/+0
| | | | | | | work on sparc64 again, because on sparc i386-compatibility partitions just happen to have the same name as sparc native partitions. Okay-ed by: grog@
* check_drive: If the partition isn't a Vinum drive, release it againgrog2003-06-151-35/+35
| | | | | | | | | | | | | | | and return NULL. vinum_scandisk: Don't handle NULL device pointers. Only look at compatibility partition for i386. This is a kludge which should go away once I have adequate documentation for the New World Order. Together, these fixes remove occasional error messages about non-existent drives. They may also fix a number of problems that have been reported without a PR. PRs: None
* Remove write_volume_label, the implementation of VINUM_LABEL ioctl.grog2003-06-121-50/+1
| | | | | | | It has been deprecated since December 1998, and recent changes broke it altogether. Prompted by: phk
* print_config:grog2003-05-191-6/+14
| | | | | | | | | Change config format slightly to save plex preferences correctly. vinum_scandisk: reinitialise volatile pointer after function call. This is the "deafc0de" bug. Approved by: re (scottl)
* vinum_scandisk: Make sure the config is locked before we mess aroundgrog2003-05-051-15/+22
| | | | | | | | | | | | | | | | | | | | | with it. Finally implement read policies. The previous "implementation" didn't work because it referred to plexes which were almost invariably when referred to. Instead, deprecate the "prefer" keyword for volumes (though it's still there for the moment) and add a keyword "preferred" to the plex definition. The relationship is like this: Old: vol foo ... prefer foo.p3 New: plex foo.p3 volume foo preferred print_config: Print "preferred" where appropriate. No longer print "prefer" on volume config entries.
* Rewrite of startup code:grog2003-05-041-17/+82
| | | | | | parse_config: Remove kw_read case. It's not used any more. parse_user_config: Remove check for failed read.
* check_drive: If we find an existing drive which is "up" or "down",grog2003-05-021-2/+4
| | | | | | | | | just return it. Don't try to reinitialize it. This should fix a number of inconsistencies that some people encountered with "vinum start". PR: 30588 PR: 43475
* Use microtime, not getmicrotime, for timing debug entries.grog2003-05-011-63/+49
| | | | | | | | | | init_drive: Rephrase error message text. Remove dead code (inside #if 0). Change name of find_drive_by_dev to the more descriptive find_drive_by_name. Tidy up comments.
* NO_GEOM cleanup: unifdef -UNO_GEOMphk2003-02-221-19/+0
|
* Finally make vinum ready for the root filesystem in FreeBSD 5.x. (Ajoerg2003-02-051-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | similar patch has been in 4.x for a while, but is more hacky there.) For this to work, vinum has to be loaded early (e. g. from boot/loader), for obvious reasons. If the kernel env variable (aka. loader variable) "vinum.autostart" is set, vinum then asks the sysctl kern.disks for all available disks in the system, and scans them for possible vinum headers. For statically compiled kernels, this behaviour can be obtained even without boot/loader by using "options VINUM_AUTOSTART" (though this is not the recommended way). Alternatively, the 4.x way to specify "vinum.drives" is also supported. No further hacks (like the 4.x "vinum.root" variable) are needed, since in 5.x, mountroot() asks back at the drivers to have them resolve the name of the root FS into a dev_t (using the dev_clone eventhandler). (The MFC reminder below is for a partial MFC for vinum.autostart, the rest is already there in 4.x.) Timed out on: grog MFC after: 2 weeks
* Put use of DIOCWLABEL under #ifdef NO_GEOMphk2003-01-261-0/+6
|
* Make the arguments to d_close() match the arguments to d_open(), sincejoerg2003-01-221-1/+1
| | | | | | | | | otherwise the close operation is void, and the underlying device remains marked as being busy. Thanks to phk for finding this. MFC after: 3 days
* Remove unused second argument from DEV_STRATEGY().phk2003-01-031-2/+2
|
* Get Vinum up and running with GEOM:rwatson2002-10-051-86/+21
| | | | | | | | | | | | | | | | | | | | | | | (1) Use namei() and devfs to discover devices rather than a hard-coded MAKEDEV implementation. Once rootfs is in place, this will allow Vinum to be used for the root file system partition. (2) Pass FREAD to device opens so that GEOM will return sector size rather than an error on attempts to read label data. (3) Avoid clobbering return values from close_drive() and masking this failure, resulting in a later divide by zero due to not having updated the Vinum-cached sector size. (4) Ignore failures from DIOCWLABEL as that appears not to be required in the GEOM environment. We've done testing in simple Vinum environments, but those with more complex environments might want to give this a spin in DP2 and make sure everything is up to speed. Fixes in collaboration with: iedowse Reviewed by: grog
* Don't use "NULL" when "0" is really meant.archie2002-08-211-1/+1
|
* More s/file system/filesystem/gtrhodes2002-05-161-1/+1
|
* Retire the bogus uses of the disklabel field d_sbsize and begin tophk2002-05-121-1/+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.
* vinum_open: recognize twed device.grog2002-04-261-1/+4
| | | | | | | Submitted by: Holger Kipp <holger.kipp@alogis.com> PR: 37458 MFC after: 5 days (to get 4.6 code freeze)
* Stop using the bogus DIOCGPART ioctl, use DIOCGSECTORSIZE andphk2002-04-021-6/+17
| | | | | | | DIOCGMEDIASIZE instead. The partition type check has been XXX'ed out since we cannot expect that a BSD disklabel with a type field be available on all platforms.
* Remove unused include.jeff2002-03-201-1/+0
|
* KSE Milestone 2julian2001-09-121-5/+5
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* open_device: Recognize ar device.grog2001-08-011-0/+2
| | | | Submitted by: Valery Kotchiev <valery@rudiment.dk>
* Change #if VINUMDEBUG to #ifdef VINUMDEBUG. This is a flag, not a variable.grog2001-05-231-2/+2
|
* format_config: Replace long format lines.grog2001-05-221-18/+28
| | | | | | | | | | | | | | Requested by: bde Add retryerrors keyword. vinum_scandisk: Print a different message if an inadvertent start command did not find any additional drives. The previous message "no drives found" confused and worried many people. MFS: vinum_open: Recognize Mylex devices as storage devices.
* Correct check for partition c. Previously the check was for drive 2,grog2001-01-201-1/+1
| | | | | | which did not exactly have the desired result. Submitted by: Akira Watanabe <akira@myaw.ei.meisei-u.ac.jp>
* format_config: If a subdisk loses its drive (due to a bug which hasgrog2001-01-141-12/+25
| | | | | | | | | | | | | | | not yet been caught), don't save the config with a null drive name (which causes the drive to be renamed "plex" on the next start), put in the text "*invalid*" instead. This is damage control, not a fix. Experienced by: peter Break some long format strings so that they fit in style(9)-sized lines. Remove some "outdentation".
* open_drive: Refuse to open partition c of a disk device.grog2001-01-101-5/+9
| | | | | | | | This should eliminate one case of foot shooting . vinum_scandisk: If a drive in the partition table is downed, free it. This duplicates code for the compatibility partition, which for some reason was omitted here.
* open_drive: Add support for more than 32 devices of a particular kind.grog2000-12-201-6/+11
| | | | | | | | | | | | Requested by: Bernd Walter <ticso@cicely8.cicely.de> Cor Bosman <cor@xs4all.net> Kai Storbeck <kai@xs4all.net> Joe Greco <jgreco@ns.sol.net> Add support for Compaq SMART-2 RAID (idad) as storage device for Vinum subdisks. Reported by: Aaron Hill <hillaa@hotmail.com>
* open_drive:grog2000-08-161-16/+21
| | | | | | | | | | | | | Add support for AMD RAID controllers as "disks". Requested-by: Marius Bendiksen <mbendiks@eunet.no> Remove potential panic when attempting to open non-existent drivers. init_drive: Return error codes correctly. Previously it would occasionally return 0. The error was redetected elsewhere, but this was causing a number of confusing error messages.
* open_drive: Recognize "wd" device type. This is going away, but it'sgrog2000-06-021-7/+6
| | | | | | | | | | | not gone yet. format_config: print correct text when a volume has a preferred plex. This is still broken, but not quite as badly. Reported-by: Phil Regnauld <regnauld@ftf.net> Change a rather silly comment.
* vinum_scandisk: Correct error recovery if a configuration is munged.grog2000-05-111-3/+3
|
* remove_drive: correctly obliterate the magic number.grog2000-05-041-7/+15
| | | | Reported-by: phk
* s/biowait/bufwait/gphk2000-04-291-2/+2
| | | | Prodded by: several.
* open_drive: Add kludges for vn and md.grog2000-04-061-0/+4
| | | | | Submitted-by: dillon (vn) Requested-by: phk (md)
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-021-2/+2
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Rename the existing BUF_STRATEGY() to DEV_STRATEGY()phk2000-03-201-2/+2
| | | | | | | | substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo) substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo) This patch is machine generated except for the ccd.c and buf.h parts.
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-201-2/+3
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Fix a problem with device number parsing, which caused da10 to map togrog2000-03-021-5/+5
| | | | | | | | da1, and da11 to da2. Reported by: Dan Nelson <dnelson@emsphone.com> Implicitly-approved-by: jkh
* open_drive: open drives directly rather than going via namei andgrog2000-02-291-198/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vn_open. This is necessary in order to be able to open drives before the root file system is mounted. This also involves restructuring the drive struct, which no longer contains a vnode pointer. Instead, open_drive sets an open flag. It's a horrible kludge, and I'll gladly borrow a Danish axe and hack it in little pieces when devfs comes. read_drive, write_drive, drive_io_done: Replace with driveio. The function names are now macros. driveio: Fix horrible, embarrassing breakage which was the reason why read_drive and write_drive existed in the first place. Code-torn-to-shreds-by: dillon format_config: Don't save config of objects in referenced state. They get rebuilt automatically. Change checks for striped or RAID-5 plexes to a macro 'isstriped', which now also includes RAID-4. Change checks for RAID-5 plexes to a macro 'isparity', which now also includes RAID-4. Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively. vinum_scandisk: Don't free memory twice on error, once is enough. Approved-by: jkh
* Give vn_isdisk() a second argument where it can return a suitable errno.phk2000-01-101-4/+3
| | | | Suggested by: bde
* Add missing header file.grog2000-01-051-0/+1
| | | | Not-reported-by: peter
* Explicitly type large scalar parameters to avoid compilation warningsgrog2000-01-051-8/+6
| | | | | | | | | | | | | | on alpha. Submitted-by: Bernd Walter <ticso@cicely.de> Remove #include of vm/vm_zone.h. Submitted-by: Someone, I'm sure, but I seem to have lost the attribution. Sorry. Get the check for disk devices correct, and return an appropriate message if the check fails.
* Introduce NDFREE (and remove VOP_ABORTOP)eivind1999-12-151-0/+4
|
* Look for disk devices rather than bdevs.phk1999-12-121-2/+2
| | | | Approved by: grog
* Fix another instance of vinum_scandisk giving a request to the daemongrog1999-10-131-10/+10
| | | | | | | | | | | | and then doing it itself, resulting in a panic downed drives. Sleuth-work-by: Christopher Masto <chris@netmonger.net> Remove dummy function initsd, which is now (implemented) in vinumrevive.c vinum_scandisk: Check that a drive is up before reading from it. This is probably excessive paranoia.
OpenPOWER on IntegriCloud