aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vinum
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove an accidental #include.Greg Lehey2003-05-051-8/+30
| | | | | | | | | | | Maintain sector sizes for all objects, not just for drives. Some of this could do with improvement: in particular, we get an error if the components of an object have different sector sizes. Clean up some comments. Notes: svn path=/head/; revision=114717
* Implement DIOCGSECTORSIZE and DIOCGMEDIASIZE ioctls. It appears thatGreg Lehey2003-05-051-0/+24
| | | | | | | they are now necessary to use newfs(8). Notes: svn path=/head/; revision=114716
* Correct failed checkin. Only one of the hunks in the last checkinGreg Lehey2003-05-051-1/+1
| | | | | | | seems to have made it. Notes: svn path=/head/; revision=114708
* Clarify comments.Greg Lehey2003-05-051-2/+2
| | | | Notes: svn path=/head/; revision=114699
* Add "preferred" keyword.Greg Lehey2003-05-052-0/+7
| | | | Notes: svn path=/head/; revision=114698
* White space fixes.Greg Lehey2003-05-051-3/+4
| | | | Notes: svn path=/head/; revision=114697
* Remove DIOCGDINFO ioctl. This almost makes newfs work again withoutGreg Lehey2003-05-051-14/+41
| | | | | | | | | | | | | the -v option, though it's not clear that it won't bite us elsewhere. Forgotten by: phk Implement setreadpol() function for the VINUM_READPOL ioctl. Submitted by: Allan Saddi <allan@saddi.com> Notes: svn path=/head/; revision=114696
* vinum_scandisk: Make sure the config is locked before we mess aroundGreg Lehey2003-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. Notes: svn path=/head/; revision=114695
* Finally implement read policies. The previous "implementation" didn'tGreg Lehey2003-05-051-22/+52
| | | | | | | | | | | | | | | | | | | | | | | | 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 give_plex_to_volume: set preferred plex if specified on plex definition entry. This involves adding a parameter to the function to specify the preferred plex. config_plex: Implement preferred keyword. Notes: svn path=/head/; revision=114694
* free_vinum: Rearrange sequence of actions to avoid potential raceGreg Lehey2003-05-051-8/+7
| | | | | | | condition when shutting down. Notes: svn path=/head/; revision=114692
* Update declaration of vinum_scandisk (only one parameter).Greg Lehey2003-05-041-1/+1
| | | | Notes: svn path=/head/; revision=114640
* Rewrite of startup code:Greg Lehey2003-05-041-0/+18
| | | | | | | | | Add ioctl VINUM_READCONFIG which implements both the "read" and "start" commands in vinum(8). Aim for marginally better error messages when something goes wrong. Notes: svn path=/head/; revision=114639
* Rewrite of startup code:Greg Lehey2003-05-041-2/+3
| | | | | | | | Add ioctl VINUM_READCONFIG which implements both the "read" and "start" commands in vinum(8). Notes: svn path=/head/; revision=114638
* Rewrite of startup code:Greg Lehey2003-05-042-24/+83
| | | | | | | | | parse_config: Remove kw_read case. It's not used any more. parse_user_config: Remove check for failed read. Notes: svn path=/head/; revision=114637
* Rewrite of startup code:Greg Lehey2003-05-041-49/+8
| | | | | | | vinumattach: Move the startup code to vinum_scandisk. Notes: svn path=/head/; revision=114636
* check_drive: If we find an existing drive which is "up" or "down",Greg Lehey2003-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 Notes: svn path=/head/; revision=114494
* White space changes.Greg Lehey2003-05-021-11/+10
| | | | Notes: svn path=/head/; revision=114486
* Note when we issue a request to the disk driver, so that we canGreg Lehey2003-05-011-1/+2
| | | | | | | measure the time it spends. Notes: svn path=/head/; revision=114401
* Rewrite minor number decoding. Now we have only three types ofGreg Lehey2003-05-011-111/+52
| | | | | | | | | | object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Notes: svn path=/head/; revision=114362
* For consistency's sake, on command failure, throw 1, not -1.Greg Lehey2003-05-011-39/+36
| | | | | | | | | | | Rewrite minor number decoding. Now we have only three types of object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Notes: svn path=/head/; revision=114361
* Rewrite minor number decoding. Now we have only three types ofGreg Lehey2003-05-011-5/+5
| | | | | | | | | | | | | object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Correct formats for some error messages. Don't cast the value to match the format. Notes: svn path=/head/; revision=114360
* Rewrite minor number decoding. Now we have only three types ofGreg Lehey2003-05-011-31/+37
| | | | | | | | | | | | | | | | | | | | object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Tidy up comments. Check for null rqgs. This continue to be reported, though I can't work out why. Correct formats for some error messages. Don't cast the value to match the format. Use microtime, not getmicrotime, for timing debug entries. Notes: svn path=/head/; revision=114359
* Terminate a comment.Greg Lehey2003-05-011-2/+2
| | | | Notes: svn path=/head/; revision=114358
* Don't make definition of kw_debug dependent on VINUMDEBUG. InGreg Lehey2003-05-011-3/+1
| | | | | | | | userland, define the keyword even if the kernel module doesn't have debug code. Notes: svn path=/head/; revision=114357
* Use strrchr, not rindex. This is for compatibility with otherGreg Lehey2003-05-011-8/+8
| | | | | | | systems, and requires a #define. Notes: svn path=/head/; revision=114356
* #ifdef VINUMDEBUG, not #if VINUMDEBUG.Greg Lehey2003-05-011-2/+2
| | | | Notes: svn path=/head/; revision=114355
* Don't make definition of kw_debug dependent on VINUMDEBUG. It's onlyGreg Lehey2003-05-011-3/+1
| | | | | | | | an enum value, and dropping it can lead to some spectacular surprises in userland. Notes: svn path=/head/; revision=114354
* Rewrite minor number decoding. Now we have only three types ofGreg Lehey2003-05-011-325/+329
| | | | | | | | | | | | | | | | object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). As a result of the minor number changes, split out the superdevice handling into a separate function, vinum_super_ioctl. This was most of the code of vinumioctl. attachobject: Improve error checking. Notes: svn path=/head/; revision=114353
* Use microtime, not getmicrotime, for timing debug entries.Greg Lehey2003-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. Notes: svn path=/head/; revision=114352
* Remove "to do" comments.Greg Lehey2003-05-012-44/+46
| | | | | | | | | | | | | | | | get_emppty_drive: Fix a day one bug with strcpy parameters. Change name of find_drive_by_dev to the more descriptive find_drive_by_name. Rewrite minor number decoding. Now we have only three types of object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Notes: svn path=/head/; revision=114351
* Rewrite minor number decoding. Now we have only three types ofGreg Lehey2003-05-011-130/+110
| | | | | | | | | | | | | | | object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Remove an unnecessary goto. vinumopen: Return EINVAL, not ENXIO, on an attempt to open a referenced plex. Notes: svn path=/head/; revision=114350
* Keep the proc locked while we set PS_INMEM so that either of the proc lockJohn Baldwin2003-04-221-1/+1
| | | | | | | | | | | or sched_lock are sufficient to test this flag. XXX: vinum should really be using a kernel process via kthread_create() instead of this hack. I'm not even sure PS_INMEM can be clear at this point anyways. Notes: svn path=/head/; revision=113863
* Centralize the devstat handling for all GEOM disk device driversPoul-Henning Kamp2003-03-081-1/+0
| | | | | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again. Notes: svn path=/head/; revision=111979
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+9
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* Format the cdevsw like all other drivers do it for improved grepability.Poul-Henning Kamp2003-03-021-4/+13
| | | | Notes: svn path=/head/; revision=111740
* NO_GEOM cleanup:Poul-Henning Kamp2003-03-022-19/+1
| | | | | | | Remove cdevsw->d_psize() implementation. It is no longer needed. Notes: svn path=/head/; revision=111734
* - Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.Jeff Roberson2003-02-251-2/+2
| | | | | | | | | | | | | - Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking bufs on the clean/dirty queues. This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another BUF_LOCK with a LK_TIMEFAIL to a single lock. Reviewed by: arch, mckusick Notes: svn path=/head/; revision=111463
* NO_GEOM cleanup: unifdef -UNO_GEOMPoul-Henning Kamp2003-02-222-29/+0
| | | | Notes: svn path=/head/; revision=111248
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-192-2/+2
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove #include <sys/dkstat.h>Poul-Henning Kamp2003-02-161-1/+0
| | | | Notes: svn path=/head/; revision=111002
* Deregister the dev_clone event handler when unloading the module. BadJoerg Wunsch2003-02-111-1/+5
| | | | | | | | | things might happen otherwise. Noticed by: Michael Reifenberger <root@nihil.reifenberger.com> Notes: svn path=/head/; revision=110726
* Rename bio_linkage to the more obvious bio_parent.Poul-Henning Kamp2003-02-071-0/+1
| | | | | | | Add bio_t0 timestamp, and include <sys/time.h> where needed Notes: svn path=/head/; revision=110517
* Finally make vinum ready for the root filesystem in FreeBSD 5.x. (AJoerg Wunsch2003-02-053-22/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=110417
* Put use of DIOCWLABEL under #ifdef NO_GEOMPoul-Henning Kamp2003-01-262-1/+8
| | | | Notes: svn path=/head/; revision=109876
* Make the arguments to d_close() match the arguments to d_open(), sinceJoerg Wunsch2003-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 Notes: svn path=/head/; revision=109682
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-212-2/+2
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Make vinum disk-related devices readable by group "operator" to matchJoerg Wunsch2003-01-161-6/+6
| | | | | | | | | | | the configuration of any other disk-like devices. (This is the DEVFS-only part, so no need to MFC.) PR: bin/28294, bin/32588 Notes: svn path=/head/; revision=109397
* Remove unused second argument from DEV_STRATEGY().Poul-Henning Kamp2003-01-034-7/+7
| | | | Notes: svn path=/head/; revision=108586
* Back out revision 1.38. disklabel now understands vinum volumes again.Greg Lehey2002-12-181-5/+1
| | | | Notes: svn path=/head/; revision=108009
* Create raw plexes and subdisks, not the old volume-related ones. ThisGreg Lehey2002-12-131-2/+2
| | | | | | | | | | crept in in the transition to devfs, and caused a number of "device not configured" errors. Approved by: re (rwatson) Notes: svn path=/head/; revision=107803