summaryrefslogtreecommitdiffstats
path: root/sys/dev/md
Commit message (Collapse)AuthorAgeFilesLines
...
* Use bioq_takefirst()phk2004-09-071-3/+1
|
* Don't g_waitidle() when initializing a preloaded md. This fixes acperciva2004-08-301-1/+2
| | | | | | | | deadlock which otherwise occurs during the boot process. Reported by: kensmith MFC after: 3 days (assuming that re@ approves)
* When creating a new md, wait for geom's event queue to become emptycperciva2004-08-221-0/+1
| | | | | | | | | | before returning. Device nodes are created via the "taste" mechanism, so this is necessary in order to make sure that devfs entries are created before mdconfig(8) returns. This may be a MFC candidate for 5.3. Suggested by: phk
* Tag all geom classes in the tree with a version number.phk2004-08-081-0/+1
|
* Use a ->fini() from the geom class to destroy the control device.phk2004-08-081-40/+19
| | | | Use default initialization of geom methods.
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+1
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-3/+3
| | | | Bump __FreeBSD_version accordingly.
* Fix panic which occurs when given sector size for memory-backed devicepjd2004-05-181-2/+1
| | | | | | | is less than DEV_BSIZE (512) bytes. Reported by: Mike Bristow <mike@urgle.com> Approved by: phk
* Ooops, removed this acknowledgement bogusly.imp2004-04-091-0/+4
| | | | Eagle Eyes: bde
* Remove advertising clause from University of California Regent'simp2004-04-071-8/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* In some cases, sf_buf_alloc() should sleep with pri PCATCH; in others, italc2004-04-031-1/+1
| | | | | | | should not. Add a new parameter so that the caller can specify which is the case. Reported by: dillon
* Fix a bug with preloaded image -- for some reason [that i don'tluigi2004-03-311-14/+3
| | | | | | | | | completely understand], md_takeroot() runs before md_preloaded(), rendering both useless. As a fix, move the body (effectively one line!) of md_takeroot() into md_preloaded(), and get rid of the stuff that has become useless. Bug and fix reported 10 days ago on -current, no reply.
* - Remove some unused #includes.alc2004-03-191-72/+58
| | | | - Apply some style fixes to mdstart_swap().
* Utilize sf_buf_alloc() and sf_buf_free() to implement the ephemeralalc2004-03-181-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mappings required by mdstart_swap(). On i386, if the ephemeral mapping is already in the sf_buf mapping cache, a swap-backed md performs similarly to a malloc-backed md. Even if the ephemeral mapping is not cached, this implementation is still faster. On 64-bit platforms, this change has the effect of using the direct virtual-to-physical mapping, avoiding ephemeral mapping overheads, such as TLB shootdowns on SMPs. On a 2.4GHz, 400MHz FSB P4 Xeon configured with 64K sf_bufs and "mdmfs -S -o async -s 128m md /mnt" before: dd if=/dev/md0 of=/dev/null bs=64k 134217728 bytes transferred in 0.430923 secs (311465697 bytes/sec) after with cold sf_buf cache: dd if=/dev/md0 of=/dev/null bs=64k 134217728 bytes transferred in 0.367948 secs (364773576 bytes/sec) after with warm sf_buf cache: dd if=/dev/md0 of=/dev/null bs=64k 134217728 bytes transferred in 0.252826 secs (530870010 bytes/sec) malloc-backed md: dd if=/dev/md0 of=/dev/null bs=64k 134217728 bytes transferred in 0.253126 secs (530240978 bytes/sec)
* Allow swap-backed devices to run without Giant.alc2004-03-141-3/+1
|
* Fix a long-standing deadlock issue with vnode backed md(4) devices:phk2004-03-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | On vnode backed md(4) devices over a certain, currently undetermined size relative to the buffer cache our "lemming-syncer" can provoke a buffer starvation which puts the md thread to sleep on wdrain. This generally tends to grind the entire system to a stop because the event that is supposed to wake up the thread will not happen until a fair bit of the piled up I/O requests in the system finish, and since a lot of those are on a md(4) vnode backed device which is currently waiting on wdrain until a fair amount of the piled up ... you get the picture. The cure is to issue all VOP_WRITES on the vnode backing the device with IO_SYNC. In addition to more closely emulating a real disk device with a non-lying write-cache, this makes the writes exempt from rate-limited (there to avoid starving the buffer cache) and consequently prevents the deadlock. Unfortunately performance takes a hit. Add "async" option to give people who know what they are doing the old behaviour.
* kthread_exit() no longer requires Giant, so don't force callers to acquirejhb2004-03-051-2/+2
| | | | | | Giant just to call kthread_exit(). Requested by: many
* Make swapbacked md(4) devices respect the -x and -y emulation arguments.phk2004-03-021-0/+4
|
* Use DEV_BSIZE byte sectors instead of PAGE_SIZE byte sectors forcperciva2004-02-291-19/+49
| | | | | | | | | | | | | swap-backed memory disks. This reduces filesystem allocation overhead and makes swap-backed memory disks compatible with broken code (dd, for example) which expects to see 512 byte sectors. The size of a swap-backed memory disk must still be a multiple of the page size. When performing page-aligned operations, this change has zero performance impact. Reviewed by: phk Approved by: rwatson (mentor)
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Allow specification of a geometry for vnode backed devices as well asphk2004-01-121-0/+4
| | | | for malloc backed devices.
* Fix a locking problem with MD_ROOT_SIZE.phk2003-12-131-6/+3
| | | | Retire md(4)'s static major number.
* Use the class->init() to hitch up preload devices, rather than rely onphk2003-11-181-2/+6
| | | | | | | | | the "old" SYSINIT. This makes sure things happen in the right order. XXX: md(4) needs to be fully geom-ified and in particluar /dev/md.ctl should be abandonded for the GEOM OaM api. Approved by: re@
* Don't initialize unused bio_blkno field.phk2003-10-181-1/+0
|
* The present defaults for the open and close for device drivers whichphk2003-09-271-2/+0
| | | | | | | | | | | | | | provide no methods does not make any sense, and is not used by any driver. It is a pretty hard to come up with even a theoretical concept of a device driver which would always fail open and close with ENODEV. Change the defaults to be nullopen() and nullclose() which simply does nothing. Remove explicit initializations to these from the drivers which already used them.
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-08-071-4/+4
| | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c)
* Change the implementation of swap backing to use the VM system in normalphk2003-08-051-23/+59
| | | | ways, and drop the need for vm_pager_strategy().
* Add fdidx argument to vn_open() and vn_open_cred() and pass -1 throughout.phk2003-07-271-2/+2
|
* Remove 256 unit limit, there is no evil minor number encoding tophk2003-06-221-2/+0
| | | | | | deal with any more. Spotted by: "Darren Freestone" <df@cops.org>
* Remove the G_CLASS_INITIALIZER, we do not need it anymore.phk2003-05-311-1/+0
|
* The IO_NOWDRAIN and B_NOWDRAIN hacks are no longer needed to preventphk2003-05-311-3/+2
| | | | | | deadlocks with vnode backed md(4) devices because md now uses a kthread to run the bio requests instead of doing it directly from the bio down path.
* Use vm_object_deallocate(), not vm_pager_deallocate(), to destroy aalc2003-05-161-2/+2
| | | | | | | vm object. (vm_pager_deallocate() does not, in fact, destroy a vm object.) Approved by: re (scottl) Reviewed by: phk
* Call g_wither_geom(), instead of just setting the flag.phk2003-05-021-3/+13
|
* Add a couple of undocumented test options to MD(4) to aid in regressionphk2003-04-091-22/+33
| | | | testting of GEOM.
* Remove all references to BIO_SETATTR. We will not be using it.phk2003-04-031-1/+0
|
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-04-011-1/+1
| | | | | | | | Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate.
* Don't include <sys/disk.h>.phk2003-04-011-2/+0
|
* remove a blank line.phk2003-03-291-1/+0
|
* Allocate the toplevel indir with M_WAITOK to avoid complicating thingsphk2003-03-271-2/+6
| | | | | | needlessly. Detected by: rwatsons EvilMalloc(9)
* Change g_class initialization to sparse format.phk2003-03-241-3/+1
|
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-181-1/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-14/+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.
* Add a "-S sectorsize" option to enable Kirk to find a bug :-)phk2003-03-031-1/+7
|
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-10/+5
| | | | | | | | | | | | | 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)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Mark our provider with G_PF_CANDELETE in the cases where this is actuallyphk2003-02-111-8/+14
| | | | the case.
* NO_GEOM cleanup: unifdefphk2003-01-301-111/+0
|
* Implement MDIOCLIST which returns the unit numbers of configured md(4)phk2003-01-271-0/+11
| | | | | | | | devices. We use the md_pad[] array and if there are more units than its size the last returned unit number will be -1, but the number of units returned is correct.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* OK Ok, so I didn't check the NO_GEOM case for the final version...phk2003-01-131-3/+3
| | | | Stumbled on by: bde
OpenPOWER on IntegriCloud