aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vinum
Commit message (Collapse)AuthorAgeFilesLines
...
* revive_block: If we have an I/O error, don't forget to drop the stripe lock.Greg Lehey2002-12-121-2/+4
| | | | | | | Approved by: re (jhb) Notes: svn path=/head/; revision=107763
* Implement DIOCGDINFO for volumes. newfs will no longer build a fileGreg Lehey2002-12-021-0/+4
| | | | | | | | | system on a volume without a disk label. Approved by: re (rwatson) Notes: svn path=/head/; revision=107536
* Don't blindly call make_dev when configuring an object: the deviceGreg Lehey2002-12-021-23/+24
| | | | | | | | | | | | could already exist, and this triggers a booby trap panic in make_dev. remove_plex_entry: Don't remove the stripe mutex here, it gets done in free_plex. Approved by: re (rwatson) Notes: svn path=/head/; revision=107535
* Explicitly cast daddr_t's to long long's when printing them since daddr_tJohn Baldwin2002-11-074-13/+13
| | | | | | | | | is not long long on all archs. (They happen to be long's on 64-bit arch's and gcc considers that significant enough to warn about it.) These should probably be uintmax_t but I didn't feel like adding all the extra includes. Notes: svn path=/head/; revision=106583
* Get Vinum up and running with GEOM:Robert Watson2002-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 Notes: svn path=/head/; revision=104501
* Refinement on previous fix for mutex destruction: make sure we don'tRobert Watson2002-10-051-4/+3
| | | | | | | | | release the mutex multiple times for multi-plex volumes. Following further consultation with: grog Notes: svn path=/head/; revision=104500
* Remove a panic on vinum module unload: make sure to destroy all mutexesRobert Watson2002-10-051-1/+4
| | | | | | | | | | | before freeing so that WITNESS doesn't dereference mutex data pointers and page fault. It's now possible to unload vinum.ko with a GENERIC kernel on 5.0-CURRENT without panic. Debugged/fixed with the aid of: jake, grog Notes: svn path=/head/; revision=104499
* Reduce <sys/disklabel.h> poisoning a bit.Poul-Henning Kamp2002-09-202-1/+1
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103698
* Retire now unused DIOCGDVIRGIN kludge.Poul-Henning Kamp2002-09-201-3/+0
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103670
* Don't use "NULL" when "0" is really meant.Archie Cobbs2002-08-212-2/+2
| | | | Notes: svn path=/head/; revision=102241
* Implement the DIOCGSECTORSIZE and DIOCGMEDIASIZE ioctls, and renameJoerg Wunsch2002-08-141-1/+9
| | | | | | | | | | the DIOCGDINFO ioctl into DIOCGDVIRGIN. This allows the newfs(8) to work on vinum volumes without the now removed -v option. Approved by: grog Notes: svn path=/head/; revision=101860
* "Fixed" printf format errors (64-bit daddr_t casualties; should use %jxBruce Evans2002-05-251-4/+4
| | | | | | | | | | | | instead of %llx when %j is available). Changed nearby output formats from %x to %#x so that it is obvious that the numbers are in hex (vinum mostly uses 0x%x elsewhere). Didn't fix nearby format printf errors (long lines). Notes: svn path=/head/; revision=97273
* Fix new compiler unhappiness.Peter Wemm2002-05-244-1/+4
| | | | Notes: svn path=/head/; revision=97217
* More s/file system/filesystem/gTom Rhodes2002-05-163-4/+4
| | | | Notes: svn path=/head/; revision=96755
* Retire the bogus uses of the disklabel field d_sbsize and begin toPoul-Henning Kamp2002-05-122-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. Notes: svn path=/head/; revision=96475
* vinum_open: recognize twed device.Greg Lehey2002-04-261-1/+4
| | | | | | | | | | Submitted by: Holger Kipp <holger.kipp@alogis.com> PR: 37458 MFC after: 5 days (to get 4.6 code freeze) Notes: svn path=/head/; revision=95484
* Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.Poul-Henning Kamp2002-04-081-0/+1
| | | | | | | Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=94182
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-1/+1
| | | | | | | | | | 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 Notes: svn path=/head/; revision=93818
* Retire the bogus ioctl DIOCGPART in toto.Poul-Henning Kamp2002-04-022-12/+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. Notes: svn path=/head/; revision=93657
* Stop using the bogus DIOCGPART ioctl, use DIOCGSECTORSIZE andPoul-Henning Kamp2002-04-022-7/+19
| | | | | | | | | | 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. Notes: svn path=/head/; revision=93655
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-1/+1
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* Remove bogus vinumdump(), if you can't dump, say so with nodump().Poul-Henning Kamp2002-03-292-9/+1
| | | | Notes: svn path=/head/; revision=93396
* Remove unused include.Jeff Roberson2002-03-201-1/+0
| | | | Notes: svn path=/head/; revision=92780
* Introduce the new 64-bit size disk block, daddr64_t. ChangeKirk McKusick2002-03-154-12/+12
| | | | | | | | | | | | | | | the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses. Notes: svn path=/head/; revision=92363
* GC: BIO_ORDERED going away.Poul-Henning Kamp2002-02-222-2/+2
| | | | Notes: svn path=/head/; revision=91062
* Grr. The last commit contained update conflicts. It just goes toGreg Lehey2002-01-291-5/+0
| | | | | | | | | show that you should check the code even for a forced commit. Spotted by: dd Notes: svn path=/head/; revision=89941
* Forced commit. The previous commit log was garbled and didn't evenGreg Lehey2002-01-291-0/+5
| | | | | | | | | | | | apply to this file. The correct message is: throw_rude_remark: Make sure we're holding the config lock before proceeding. There's no reason to assume that this has ever happened, but the alternative might be a double fault. Notes: svn path=/head/; revision=89939
* vinumioctl: Fix a double fault caused by calling setjmp() without holding ↵Greg Lehey2002-01-272-3/+2
| | | | | | | the config lock. The call was in fact superfluous. Notes: svn path=/head/; revision=89842
* Don't call cdevsw_{add,remove}().Poul-Henning Kamp2001-11-041-3/+0
| | | | Notes: svn path=/head/; revision=86019
* allocrqg: Don't ever try to write to a NULL pointer.Greg Lehey2001-11-031-1/+1
| | | | | | | Reported by: Jeff Roberson <jeff@midstream.com> Notes: svn path=/head/; revision=85939
* attachobject: Return correct status after successfully attaching aGreg Lehey2001-10-131-0/+1
| | | | | | | | | plex. Indirectly found by: Hendrik Scholz <hscholz@perikles.toppoint.de> Notes: svn path=/head/; revision=84875
* Add missing includes of sys/lock.h.John Baldwin2001-10-111-0/+1
| | | | Notes: svn path=/head/; revision=84811
* KSE Milestone 2Julian Elischer2001-09-125-16/+16
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=83366
* Remove an accidentally forgotten #ifdef. This could cause depletionGreg Lehey2001-09-041-2/+0
| | | | | | | of mutexes if a lot of plexes are created and destroyed. Notes: svn path=/head/; revision=82934
* open_device: Recognize ar device.Greg Lehey2001-08-011-0/+2
| | | | | | | Submitted by: Valery Kotchiev <valery@rudiment.dk> Notes: svn path=/head/; revision=80808
* The kernel *does* now define setjmp/longjmp. Dont duplicate it here.Peter Wemm2001-07-272-4/+0
| | | | | | | | | | | | In file included from ../../../dev/vinum/vinumhdr.h:77, from ../../../dev/vinum/vinum.c:44: ../../../dev/vinum/vinumext.h:165: warning: redundant redeclaration of `setjmp' in same scope ../../../sys/systm.h:96: warning: previous declaration of `setjmp' ../../../dev/vinum/vinummemory.c:44: warning: redundant redeclaration of `longjmp' in same scope ../../../sys/systm.h:97: warning: previous declaration of `longjmp' Notes: svn path=/head/; revision=80430
* Fix warnings:Peter Wemm2001-06-151-1/+0
| | | | | | | | | | | | vinumhdr.h:80: warning: redundant redeclaration of `vinum_cdevsw' vinumext.h:239: warning: previous declaration of `vinum_cdevsw' in each of the following files: vinum.c, vinumconfig.c, vinumdaemon.c, vinuminterrupt.c, vinumio.c, vinumioctl.c, vinumlock.c, vinummemory.c, vinumraid5.c, vinumrequest.c, vinumrevive.c, vinumstate.c, vinumutil.c Notes: svn path=/head/; revision=78237
* Change #if VINUMDEBUG to #ifdef VINUMDEBUG. This is a flag, not a variable.Greg Lehey2001-05-238-31/+27
| | | | Notes: svn path=/head/; revision=77100
* Move objflags from vinumvar.h to vinumobj.h in preparation forGreg Lehey2001-05-231-45/+1
| | | | | | | | | | requiring fewer header files for userland programs. Remove the gross debug device/non-debug device hack used to recognize whether the kernel module was in sync with the userland module. Notes: svn path=/head/; revision=77030
* Move objflags from vinumvar.h to vinumobj.h in preparation forGreg Lehey2001-05-231-2/+37
| | | | | | | requiring fewer header files for userland programs. Notes: svn path=/head/; revision=77029
* Move external declaration to vinumhdr.h.Greg Lehey2001-05-231-1/+2
| | | | Notes: svn path=/head/; revision=77028
* Set flag VF_HASDEBUG in vinum_conf to indicate that the module wasGreg Lehey2001-05-231-10/+6
| | | | | | | | | | | | | | | compiled with debug support. This can be used by userland programs to recognize which ioctls the module supports. As a result, remove the gross debug device/non-debug device hack used to recognize whether the kernel module was in sync with the userland module. Replace explicit references to major/minor numbers of vinum superdevice with the VINUM_SUPERDEV macro written for that purpose. Notes: svn path=/head/; revision=77027
* New header file.Greg Lehey2001-05-221-0/+54
| | | | | | | | | Missed by: Szilveszter Adam <sziszi@petra.hos.u-szeged.hu> David Wolfskill <david@catwhisker.org> Pointy hat to: grog Notes: svn path=/head/; revision=77018
* Remove Malloc definitions (now in vinumext.h)Greg Lehey2001-05-221-21/+2
| | | | Notes: svn path=/head/; revision=76975
* Add a field 'version' to vinum_conf. This field is a constant whichGreg Lehey2001-05-221-191/+30
| | | | | | | | | | | | | | | | gets incremented every time the kernel-userland interface changes. This enables vinum(8) to check for the correct kernel version and to produce a useful message if it doesn't match. Requested by: Too many to count. Move the definitions of struct drive, sd, plex and volume to vinumobj.h. Add a new debug flag, DEBUG_LOCKREQS, which logs only lock requests. Notes: svn path=/head/; revision=76964
* vinumstart: If a write request is for a RAID-[45] plex or a volumeGreg Lehey2001-05-221-13/+23
| | | | | | | | | | | | | | | | | | | | with more than one plex, the data will be accessed multiple times. During this time, userland code could potentially modify the buffer, thus causing data corruption. In the case of a multi-plexed volume this might be cosmetic, but in the case of a RAID-[45] plex it can cause severe data corruption which only becomes evident after a drive failure. Avoid this situation by making a copy of the data buffer before using it. Note that this solution does not guarantee any particular content of the buffer, just that it remains unchanged for the duration of the request. Suggested by: alfred Notes: svn path=/head/; revision=76963
* tokenize: Take third parameter specifying the maximum number ofGreg Lehey2001-05-221-6/+8
| | | | | | | | parameters to return. This code is used both in userland and in the kernel. Notes: svn path=/head/; revision=76962
* Cosmetics: wrap long lines to be < 80 characters.Greg Lehey2001-05-221-2/+4
| | | | Notes: svn path=/head/; revision=76961
* Add a new debug flag, DEBUG_LOCKREQS, which logs only lock requests.Greg Lehey2001-05-221-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use this instead of DEBUG_LASTREQS to decide whether to log lock requests. MFS: vinumlock: Catch a potential race condition where one process is waiting for a lock, and between the time it is woken and it retries the lock, another process gets it and places it in the first entry in the table. This problem has not been observed, but it's possible, and it's easy enough to fix. Submitted by: tegge vinumunlock: Catch a real bug capable of hanging a system. When releasing a lock, vinumunlock() called wakeup_one. This caused wakeups to sometimes get lost. After due consideration, we think that this is due to the fact that you can't guarantee that some other process is also waiting on the same address. This makes wakeup_one a very dangerous function to use. Notes: svn path=/head/; revision=76960
* Change ioctls to use the expurgated userland version of the VinumGreg Lehey2001-05-223-20/+22
| | | | | | | structures. Notes: svn path=/head/; revision=76959