summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
Commit message (Collapse)AuthorAgeFilesLines
* swp_pager_async_iodone() no longer requires Giant. Modify bufdone()alc2004-02-071-1/+0
| | | | | | and swapgeom_done() to perform swp_pager_async_iodone() without Giant. Reviewed by: tegge
* Remove a variable that has been initialized but otherwise unused sincealc2003-12-201-2/+0
| | | | revision 1.315.
* Send B_PHYS out to pasture, it no longer serves any function.phk2003-11-151-9/+0
|
* - Remove the remaining now unnecessary checks for the buf's b_object beingalc2003-11-151-10/+4
| | | | | NULL. See revision 1.421 for more detail. - Remove GIANT_REQUIRED from vfs_unbusy_pages(). Discussed with: jeff
* Replace B_PHYS conditional assignment to bio_offset with KASSERT checkphk2003-11-121-2/+7
| | | | to see that the originating code already did it right.
* Update the statfs structure with 64-bit fields to allowmckusick2003-11-121-2/+2
| | | | | | | | | | | | | | | | | accurate reporting of multi-terabyte filesystem sizes. You should build and boot a new kernel BEFORE doing a `make world' as the new kernel will know about binaries using the old statfs structure, but an old kernel will not know about the new system calls that support the new statfs structure. Running an old kernel after a `make world' will cause programs such as `df' that do a statfs system call to fail with a bad system call. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Tim Robbins <tjr@freebsd.org> Reviewed by: Julian Elischer <julian@elischer.org> Reviewed by: the hoards of <arch@freebsd.org> Sponsored by: DARPA & NAI Labs.
* - Revision 1.469 of vfs_subr.c resulted in the buf's b_object field beingalc2003-11-111-14/+7
| | | | | | consistency initialized. Consequently, a number of conditionals that checked the validity of b_object before passing it to VM_OBJECT_LOCK() and VM_OBJECT_UNLOCK() are no longer needed.
* Allow the bufdaemon and update daemon processes to skip themckusick2003-11-041-4/+8
| | | | | | | waitrunningbufspace() calls so that they are always able to proceed and clean up buffer space. Submitted by: Brian Fundakowski Feldman <green@freebsd.org>
* Move the P_COWINPROGRESS flag from being a per-process p_flag to being ajhb2003-10-231-1/+1
| | | | | | | per-thread td_pflag which doesn't require any locks to read or write as it is only read or written by curthread on itself. Glanced at by: mckusick
* Remove KASSERTS on B_PHYS for vmapbuf() and vunmapbuf(), B_PHYS is goingphk2003-10-211-3/+0
| | | | away.
* - Add vm object locking to vfs_clean_pages() and vfs_bio_set_validclean().alc2003-10-191-2/+4
| | | | | This is to synchronize access to the vm page's valid field by vm_page_set_validclean().
* Initialize b_iooffset before calling VOP_[SPEC]STRATEGYphk2003-10-181-0/+3
|
* Don't report b_pblkno, it is going away.phk2003-10-181-2/+2
|
* Convert some if(bla) panic("foo") to KASSERTS to improve grep-ability.phk2003-10-181-4/+2
|
* The size and contents of the DEV_STRATEGY() macro has progressed tophk2003-10-181-1/+17
| | | | | | | | | | | | | | | | the point where it being a macro is no longer sensible, and it will only be more so in days to come. BIO_STRATEGY() is now only used from DEV_STRATEGY() and should not be used directly anymore. Put the contents of both in the new function dev_strategy() and make DEV_STRATEGY() call that function. In addition, this allows us to make the rather magic bufdonebio() helper function static. This alse saves hunderedandsome bytes of code in a typical kernel.
* - Add a mising vn_finished_write()jeff2003-10-141-0/+1
| | | | | | Pointy hat: jeff Found by: robert Obtained from: kirk
* In vfs_bio_clrbuf(), ignore the state of the object lock if the page is thealc2003-10-121-2/+4
| | | | | | "bogus" page. Found by: tegge
* - Synchronize access to a page's valid field in vfs_bio_clrbuf()alc2003-10-101-8/+10
| | | | | by using the lock from its containing object. - Remove GIANT_REQUIRED from vm_hold_load_pages().
* - Add a missing vn_start_write() to flushbufqueues(). This could havejeff2003-10-051-4/+9
| | | | | | | | caused snapshot related problems. - The vp can not be NULL here or we would panic in vfs_bio_awrite(). Stop confusing the logic by checking for it in several places. Submitted by: kirk and then rototilled by me to remove vp == NULL checks.
* Eliminate some unnecessary uses of the vm page queues lock around thealc2003-10-041-2/+0
| | | | | vm page's valid field. This field is being synchronized using the containing vm object's lock.
* - Extend the scope the vm object lock to cover calls toalc2003-10-041-3/+5
| | | | | | vm_page_is_valid(). - Assert that the lock on the containing vm object is held in vm_page_is_valid().
* - vm_hold_free_pages() should lock the kernel object. (The pages beingalc2003-09-221-6/+6
| | | | | | | freed belong to the kernel object.) - Increase the granularity of the vm object locking in vm_hold_load_pages() in order to reduce the number of times that we acquire and release the same lock.
* Correct a typo in the previous revision.alc2003-09-151-1/+1
|
* Convert vmapbuf() from using pmap_extract() to usingalc2003-09-131-13/+7
| | | | | | | | pmap_extract_and_hold(). Note, however, that GIANT_REQUIRED should not be removed until all platforms fully implement the "prot" parameter to pmap_extract_and_hold(). Reviewed by: tegge
* - Define a new flag for getblk(): GB_NOCREAT. This flag causes getblk() tojeff2003-08-311-0/+8
| | | | | | | bail out if the buffer is not already present. - The buffer returned by incore() is not locked and should not be sent to brelse(). Use getblk() with the new GB_NOCREAT flag to preserve the desired semantics.
* - If there is no vp assume that BKGRDINPROG is not set and set RELPBUF injeff2003-08-311-1/+2
| | | | brelse().
* - In some cases bp->b_vp can be NULL in brelse, don't try to lock thejeff2003-08-311-4/+6
| | | | | | interlock in that case. Found by: alc
* In bufdone(), change the format specifier for m->valid and m->dirty tomarcel2003-08-281-2/+3
| | | | | a long type and explicitly cast m->valid and m->dirty to unsigned long. When PAGE_SIZE is 32K, these fields are in fact unsigned long.
* Do not return with vnode interlock held.kan2003-08-281-0/+2
| | | | Reviewed by: rwatson
* - Move BX_BKGRDWAIT and BX_BKGRDINPROG to BV_ and the b_vflags field.jeff2003-08-281-73/+78
| | | | | | | | | | | | | | | | | | - Surround all accesses of the BKGRD{WAIT,INPROG} flags with the vnode interlock. - Don't use the B_LOCKED flag and QUEUE_LOCKED for background write buffers. Check for the BKGRDINPROG flag before recycling or throwing away a buffer. We do this instead because it is not safe for us to move the original buffer to a new queue from the callback on the background write buffer. - Remove the B_LOCKED flag and the locked buffer queue. They are no longer used. - The vnode interlock is used around checks for BKGRDINPROG where it may not be strictly necessary. If we hold the buf lock the a back-ground write will not be started without our knowledge, one may only be completed while we're not looking. Rather than remove the code, Document two of the places where this extra locking is done. A pass should be done to verify and minimize the locking later.
* Hold the page queues lock when performing vm_page_clear_dirty() andalc2003-08-231-0/+2
| | | | vm_page_set_invalid().
* Grab Giant in bufdonebio() since drivers may not hold it.phk2003-08-021-0/+4
| | | | | This only protects the "struct buf" consumers (ie: DEV_STRATEGY()), but does not protect BIO_STRATEGY() users.
* Eliminate an abuse of kmem_alloc_pageable() in bufinit()alc2003-08-021-6/+1
| | | | | | by using VM_ALLOC_NOOBJ to allocate the bogus page. Reviewed by: tegge
* Initialize b_saveaddr when we hand out buffersphk2003-06-201-2/+4
|
* Lock the vm object when removing a page.alc2003-06-111-0/+8
|
* Use __FBSDID().obrien2003-06-111-2/+3
|
* The IO_NOWDRAIN and B_NOWDRAIN hacks are no longer needed to preventphk2003-05-311-7/+3
| | | | | | 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.
* Finish the vm_object locking for this file, including holding the vm_objectalc2003-04-281-3/+8
| | | | lock when accessing the vm_object's flags or calling vm_page_lookup().
* - Lock the vm_object when performing vm_page_alloc() in allocbuf().alc2003-04-261-0/+4
|
* Lock the vm_object in vfs_busy_pages().alc2003-04-201-0/+4
|
* - Lock the vm_object when performing vm_object_pip_subtract().alc2003-04-191-1/+2
| | | | - Assert that the vm_object lock is held in vm_object_pip_subtract().
* - Lock the vm_object when performing vm_object_pip_wakeupn().alc2003-04-191-1/+6
| | | | | - Assert that the vm_object lock is held in vm_object_pip_wakeupn(). - Add a new macro VM_OBJECT_LOCK_ASSERT().
* Update locking on the kernel_object to use the new macros.alc2003-04-141-4/+4
|
* Remove an unnecessary trunc_page() from vmapbuf().alc2003-04-061-1/+1
| | | | Reviewed by: tegge
* o Check the b_bufsize passed to vmapbuf() returning an erroralc2003-04-041-2/+2
| | | | | | | if it is invalid. o Remove a debugging printf() from vmapbuf(). Suggested by: tegge
* Preparation commit before I start on the bioqueue lockdown:phk2003-03-301-25/+0
| | | | | Collect all the bits of bioqueue handing in subr_disk.c, vfs_bio.c is big enough as it is and disksort already lives in subr_disk.c.
* Add support for reading directly from file to userland buffer when thetegge2003-03-261-0/+12
| | | | | O_DIRECT descriptor status flag is set and both offset and length is a multiple of the physical media sector size.
* - Add vm_paddr_t, a physical address type. This is required for systemsjake2003-03-251-1/+1
| | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
* 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.
* - Add a lock for protecting against msleep(bp, ...) wakeup(bp) races.jeff2003-03-131-10/+37
| | | | | | | | | | - Create a new function bdone() which sets B_DONE and calls wakup(bp). This is suitable for use as b_iodone for buf consumers who are not going through the buf cache. - Create a new function bwait() which waits for the buf to be done at a set priority and with a specific wmesg. - Replace several cases where the above functionality was implemented without locking with the new functions.
OpenPOWER on IntegriCloud