summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unused B_WRITEINPROG flagphk2004-09-151-1/+1
|
* undent some functions a bit.phk2004-09-151-159/+161
|
* stylistic polishing.phk2004-09-151-37/+57
|
* Remove the buffercache/vnode side of BIO_DELETE processing inphk2004-09-131-8/+1
| | | | | | | preparation for integration of p4::phk_bufwork. In the future, local filesystems will talk to GEOM directly and they will consequently be able to issue BIO_DELETE directly. Since the removal of the fla driver, BIO_DELETE has effectively been a no-op anyway.
* Eliminate unused second argument to reassignbuf() and simplify itphk2004-07-251-2/+2
| | | | accordingly.
* Neuter this warning for now, I think I know the remaining issues.phk2004-07-251-1/+2
|
* Remove GIANT_REQUIRED from vmapbuf().alc2004-07-181-2/+0
|
* Fix bug introduced in rev 1.434:peadar2004-07-061-3/+3
| | | | | | | | | | | | | When avoiding the zeroing of "bogus_page" when it appears in a buf, be sure to advance the pointers into the data for successive pages. The bug caused file corruption when read(2)ing from a "hole" in a file where a previous page of the read block had already been faulted in: fsx tripped up on this pretty quickly. The particular access pattern is probably pretty unusual, so other applications probably wouldn't have had problems, but you'd never know. Reviewed By: alc@
* Make the last commit handle non-phk root devices better.phk2004-07-041-0/+1
|
* Consistently use __inline instead of __inline__ as the former is an empty macrostefanf2004-07-041-3/+3
| | | | in <sys/cdefs.h> for compilers without support for inline.
* Blocksize for I/O should be a property of the vnode and not found by gropingphk2004-07-041-0/+5
| | | | | | | | | around in the vnodes surroundings when we allocate a block. Assign a blocksize when we create a vnode, and yell a warning (and ignore it) if we got the wrong size. Please email all such warnings to me.
* Remove stale commentphk2004-07-031-1/+0
|
* Second half of the dev_t cleanup.phk2004-06-171-4/+4
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-1/+1
| | | | Bump __FreeBSD_version accordingly.
* Avoid pointless zeroing of the bogus page in vfs_bio_clrbuf().alc2004-05-081-6/+8
| | | | Suggested by: tegge@ (from October of last year)
* Make vm_page's PG_ZERO flag immutable between the time of the page'salc2004-05-061-14/+1
| | | | | | | | | | allocation and deallocation. This flag's principal use is shortly after allocation. For such cases, clearing the flag is pointless. The only unusual use of PG_ZERO is in vfs_bio_clrbuf(). However, allocbuf() never requests a prezeroed page. So, vfs_bio_clrbuf() never sees a prezeroed page. Reviewed by: tegge@
* Replace a manual check of a VMIO candidate with vn_canvmio(). Thisdes2004-03-121-2/+3
| | | | | | | | | silences an annoying warning in getblk() when VMIO'ing on a directory vnode, which can happen when vfs.vmiodirenable is 1. Bring the warning message in line with reality at the same time. Submitted by: hmp
* When I was a kid my work table was one cluttered mess an cleaning it upphk2004-03-111-3/+5
| | | | | | | | | | | | | were a rather overwhelming task. I soon learned that if you don't know where you're going to store something, at least try to pile it next to something slightly related in the hope that a pattern emerges. Apply the same principle to the ffs/snapshot/softupdates code which have leaked into specfs: Add yet a buf-quasi-method and call it from the only two places I can see it can make a difference and implement the magic in ffs_softdep.c where it belongs. It's not pretty, but at least it's one less layer violated.
* Properly vector all bwrite() and BUF_WRITE() calls through the same pathphk2004-03-111-11/+21
| | | | and s/BUF_WRITE()/bwrite()/ since it now does the same as bwrite().
* Remove GIANT_REQUIRED from vunmapbuf().alc2004-03-071-2/+0
|
* Device megapatch 6/6:phk2004-02-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This is what we came here for: Hang dev_t's from their cdevsw, refcount cdevsw and dev_t and generally keep track of things a lot better than we used to: Hold a cdevsw reference around all entrances into the device driver, this will be necessary to safely determine when we can unload driver code. Hold a dev_t reference while the device is open. KASSERT that we do not enter the driver on a non-referenced dev_t. Remove old D_NAG code, anonymous dev_t's are not a problem now. When destroy_dev() is called on a referenced dev_t, move it to dead_cdevsw's list. When the refcount drops, free it. Check that cdevsw->d_version is correct. If not, set all methods to the dead_*() methods to prevent entrance into driver. Print warning on console to this effect. The device driver may still explode if it is also incompatible with newbus, but in that case we probably didn't get this far in the first place.
* 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
OpenPOWER on IntegriCloud