summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Within ufs, the ffs_sync and ffs_fsync functions did not alwaysmckusick2002-10-251-4/+14
| | | | | | | | | | | | check for and/or report I/O errors. The result is that a VFS_SYNC or VOP_FSYNC called with MNT_WAIT could loop infinitely on ufs in the presence of a hard error writing a disk sector or in a filesystem full condition. This patch ensures that I/O errors will always be checked and returned. This patch also ensures that every call to VFS_SYNC or VOP_FSYNC with MNT_WAIT set checks for and takes appropriate action when an error is returned. Sponsored by: DARPA & NAI Labs.
* This checkin reimplements the io-request priority hack in a waymckusick2002-10-221-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that works in the new threaded kernel. It was commented out of the disksort routine earlier this year for the reasons given in kern/subr_disklabel.c (which is where this code used to reside before it moved to kern/subr_disk.c): ---------------------------- revision 1.65 date: 2002/04/22 06:53:20; author: phk; state: Exp; lines: +5 -0 Comment out Kirks io-request priority hack until we can do this in a civilized way which doesn't cause grief. The problem is that it is not generally safe to cast a "struct bio *" to a "struct buf *". Things like ccd, vinum, ata-raid and GEOM constructs bio's which are not entrails of a struct buf. Also, curthread may or may not have anything to do with the I/O request at hand. The correct solution can either be to tag struct bio's with a priority derived from the requesting threads nice and have disksort act on this field, this wouldn't address the "silly-seek syndrome" where two equal processes bang the diskheads from one edge to the other of the disk repeatedly. Alternatively, and probably better: a sleep should be introduced either at the time the I/O is requested or at the time it is completed where we can be sure to sleep in the right thread. The sleep also needs to be in constant timeunits, 1/hz can be practicaly any sub-second size, at high HZ the current code practically doesn't do anything. ---------------------------- As suggested in this comment, it is no longer located in the disk sort routine, but rather now resides in spec_strategy where the disk operations are being queued by the thread that is associated with the process that is really requesting the I/O. At that point, the disk queues are not visible, so the I/O for positively niced processes is always slowed down whether or not there is other activity on the disk. On the issue of scaling HZ, I believe that the current scheme is better than using a fixed quantum of time. As machines and I/O subsystems get faster, the resolution on the clock also rises. So, ten years from now we will be slowing things down for shorter periods of time, but the proportional effect on the system will be about the same as it is today. So, I view this as a feature rather than a drawback. Hence this patch sticks with using HZ. Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@critter.freebsd.dk>
* Grrr, s/PBP/BPB/ here as well.jhb2002-10-211-1/+1
| | | | Noticed by: peter
* Spell the BPB member of the 7.10 bootsector as bsBPB rather than bsPBP tojhb2002-10-211-1/+1
| | | | be like all the other bootsectors. Apple has done the same it seems.
* Missed a case of _POSIX_MAC_PRESENT -> _PC_MAC_PRESENT rename.rwatson2002-10-201-2/+2
| | | | Pointed out by: phk
* '&' not used for pointers to functions.phk2002-10-201-2/+2
| | | | Spotted by: FlexeLint
* Remove even more '&' from pointers to functions.phk2002-10-201-26/+26
| | | | Spotted by: FlexeLint
* umap_sync is empty and is identical to vfs_stdsync. Remove it andkan2002-10-191-16/+1
| | | | | | use generic function instead. Approved by: obrien
* style(9)kan2002-10-191-4/+7
| | | | Approved by: obrien
* Fix comments and one resulting code confusion about the type of thephk2002-10-168-8/+9
| | | | | | "command" argument to VOP_IOCTL. Spotted by: FlexeLint.
* Be consistent about functions being static.phk2002-10-162-2/+2
| | | | Spotted by: FlexeLint
* A better solution to avoiding variable sized structs in DEVFS.phk2002-10-162-3/+5
|
* #include "opt_devfs.h" to protect against variable sized structures.phk2002-10-161-0/+2
| | | | Spotted by: FlexeLint
* Plug an infrequent (I think) memory leak.phk2002-10-151-1/+3
| | | | Spotted by: FlexeLint
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-1420-121/+7
| | | | | | | | | | | | | | | | | | | | that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock). In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme. Sponsored by: DARPA & NAI Labs.
* - Remove a useless initialization for 'ronly', if it hadn't beenmux2002-10-131-2/+2
| | | | | there, we would have noticed that 'ronly' was uninitialized :-). - Kill a nearby 'register' keyword.
* Pass flags to VOP_CLOSE() corresponding to what was passed to VOP_OPEN().phk2002-10-131-0/+1
| | | | Submitted by: "Peter Edwards" <pmedwards@eircom.net>
* Change iov_base's type from `char *' to the standard `void *'. Allmike2002-10-112-3/+3
| | | | | uses of iov_base which assume its type is `char *' (in order to do pointer arithmetic) have been updated to cast iov_base to `char *'.
* Treat the pathptrn field as a real pattern with the aid of fnmatch().dd2002-10-081-15/+1
|
* Yet another 64 bits warning fix: s/u_int/size_t/.mux2002-10-061-1/+1
|
* Fix a warning on 64 bits platforms: copyinstr() takesmux2002-10-061-1/+1
| | | | a size_t *, not an u_int *.
* Fix a warning on 64 bits platforms: copystr() takes a size_t *,mux2002-10-061-1/+1
| | | | not an int *.
* Integrate a devfs/MAC fix from the MAC tree: avoid a race condition duringrwatson2002-10-051-4/+3
| | | | | | | | | devfs VOP symlink creation by introducing a new entry point to determine the label of the devfs_dirent prior to allocation of a vnode for the symlink. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Plug memoryleaks detected by FlexeLint.phk2002-10-051-2/+8
|
* Back our kernel support for reliable signal queues.jmallett2002-10-012-13/+8
| | | | Requested by: rwatson, phk, and many others
* Move the vop-vector declaration into devfs_vnops.c where it belongs.phk2002-10-012-5/+3
|
* When working with sigset_t's, and needing to perform masking operations basedjmallett2002-10-011-7/+11
| | | | | | on a process's pending signals, use the signal queue flattener, ksiginfo_to_sigset_t, on the process, and on a local sigset_t, and then work with that as needed.
* First half of implementation of ksiginfo, signal queues, and such. Thisjmallett2002-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | gets signals operating based on a TailQ, and is good enough to run X11, GNOME, and do job control. There are some intricate parts which could be more refined to match the sigset_t versions, but those require further evaluation of directions in which our signal system can expand and contract to fit our needs. After this has been in the tree for a while, I will make in kernel API changes, most notably to trapsignal(9) and sendsig(9), to use ksiginfo more robustly, such that we can actually pass information with our (queued) signals to the userland. That will also result in using a struct ksiginfo pointer, rather than a signal number, in a lot of kern_sig.c, to refer to an individual pending signal queue member, but right now there is no defined behaviour for such. CODAFS is unfinished in this regard because the logic is unclear in some places. Sponsored by: New Gold Technology Reviewed by: bde, tjr, jake [an older version, logic similar]
* s/struct dev_t */dev_t */phk2002-09-281-1/+1
|
* Fix mis-indent.phk2002-09-281-1/+1
|
* Be consistent about "static" functions: if the function is markedphk2002-09-285-10/+10
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* I misplaced a local variable yesterday.phk2002-09-281-1/+1
|
* Add a D_NOGIANT flag which can be set in a struct cdevsw to indicatephk2002-09-271-13/+76
| | | | | | | | | | | | that a particular device driver is not Giant-challenged. SPECFS will DROP_GIANT() ... PICKUP_GIANT() around calls to the driver in question. Notice that the interrupt path is not affected by this! This does _NOT_ work for drivers accessed through cdevsw->d_strategy() ie drivers for disk(-like), some tapes, maybe others.
* Rename struct specinfo to the more appropriate struct cdev.phk2002-09-271-1/+1
| | | | Agreed on: jake, rwatson, jhb
* I hate it when patch gives me .rej files.phk2002-09-261-0/+1
| | | | | Can't we make the pre-commit check refuse if there are .rej files in the directory ?
* Return ENOTTY on unhandled ioctls.phk2002-09-261-2/+5
|
* Return ENOTTY on unrecognized ioctls.phk2002-09-262-2/+2
|
* Return ENOTTY on incorrect ioctls.phk2002-09-261-1/+1
|
* Return ENOTTY when we don't recognize an ioctl.phk2002-09-261-1/+1
|
* Fix these warns where sizeof(int) != sizeof(void *)njl2002-09-261-4/+4
| | | | | | | | | | | | | | | | /h/des/src/sys/coda/coda_venus.c: In function `venus_ioctl': /h/des/src/sys/coda/coda_venus.c:277: warning: cast from pointer to integer of different size /h/des/src/sys/coda/coda_venus.c:292: warning: cast from pointer to integer of different size /h/des/src/sys/coda/coda_venus.c: In function `venus_readlink': /h/des/src/sys/coda/coda_venus.c:380: warning: cast from pointer to integer of different size /h/des/src/sys/coda/coda_venus.c: In function `venus_readdir': /h/des/src/sys/coda/coda_venus.c:637: warning: cast from pointer to integer of different size Submitted by: des-alpha-tinderbox
* - Fix a botch in previous commit; oldvp should not be unconditionallyjeff2002-09-261-2/+3
| | | | assigned.
* Fix the problem introduced by vop_stdbmap() usage. The NTFS does notsemenu2002-09-251-1/+28
| | | | | | | | implement worthful VOP_BMAP() handler, so it expect the blkno not to be changed by VOP_BMAP(). Otherwise, it'll have to find some tricky way to determine if bp was VOP_BMAP()ed or not in VOP_STRATEGY(). PR: kern/42139
* - Use vrefcnt() instead of v_usecount.jeff2002-09-251-2/+2
|
* - Use vrefcnt() instead of directly accessing v_usecount.jeff2002-09-253-19/+21
|
* - Use vrefcnt() where it is safe to do so instead of doing direct andjeff2002-09-2518-60/+71
| | | | | | | unlocked accesses to v_usecount. - Lock access to the buf lists in the various sync routines. interlock locking could be avoided almost entirely in leaf filesystems if the fsync function had a generic helper.
* - Lock access to the buf lists in spec_sync()jeff2002-09-251-7/+15
| | | | - Fixup interlock locking in spec_close()
* - Hold the vp lock while accessing v_vflags.jeff2002-09-251-5/+7
|
* use __packed.alfred2002-09-231-24/+24
|
* Attempt to fix the error reported by the alpha tinderbox. A pointeriedowse2002-09-221-2/+2
| | | | | was being cast to an integer as part of a hash function, so just add an intptr_t cast to silence the warning.
* Fix misspellings, capitalization, and punctuation in comments. Minortruckman2002-09-223-90/+95
| | | | comment phrasing and style changes.
OpenPOWER on IntegriCloud