summaryrefslogtreecommitdiffstats
path: root/sys/fs/fdescfs
Commit message (Collapse)AuthorAgeFilesLines
...
* Backed out vestiges of the quick fixes for the transient breakage ofbde2001-10-132-2/+0
| | | | | <sys/mount.h> in rev.1.106 of the latter (don't include <sys/socket.h> just to work around bugs in <sys/mount.h>).
* KSE Milestone 2julian2001-09-123-41/+41
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix warning: 552: warning: `fdesc_badop' defined but not usedpeter2001-06-151-12/+0
|
* Actually rename FDESC, PORTAL, UMAP and UNION file systems.ru2001-05-241-1/+1
| | | | OK'ed by: bp
* - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION fileru2001-05-232-2/+2
| | | | | | | | | | | | | | | systems were repo-copied from sys/miscfs to sys/fs. - Renamed the following file systems and their modules: fdesc -> fdescfs, portal -> portalfs, union -> unionfs. - Renamed corresponding kernel options: FDESC -> FDESCFS, PORTAL -> PORTALFS, UNION -> UNIONFS. - Install header files for the above file systems. - Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland Makefiles.
* Change the second argument of vflush() to an integer that specifiesiedowse2001-05-161-12/+4
| | | | | | | | | | | | | | | | | | | | the number of references on the filesystem root vnode to be both expected and released. Many filesystems hold an extra reference on the filesystem root vnode, which must be accounted for when determining if the filesystem is busy and then released if it isn't busy. The old `skipvp' approach required individual filesystem xxx_unmount functions to re-implement much of vflush()'s logic to deal with the root vnode. All 9 filesystems that hold an extra reference on the root vnode got the logic wrong in the case of forced unmounts, so `umount -f' would always fail if there were any extra root vnode references. Fix this issue centrally in vflush(), now that we can. This commit also fixes a vnode reference leak in devfs, which could result in idle devfs filesystems that refuse to unmount. Reviewed by: phk, bp
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-012-14/+16
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Add a vop_stdbmap(), and make it part of the default vop vector.phk2001-04-291-1/+0
| | | | | | Make 7 filesystems which don't really know about VOP_BMAP rely on the default vector, rather than more or less complete local vop_nopbmap() implementations.
* fix it so it compiles againmjacob2001-04-232-0/+4
|
* Reviewed by: jlemonadrian2001-03-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | An initial tidyup of the mount() syscall and VFS mount code. This code replaces the earlier work done by jlemon in an attempt to make linux_mount() work. * the guts of the mount work has been moved into vfs_mount(). * move `type', `path' and `flags' from being userland variables into being kernel variables in vfs_mount(). `data' remains a pointer into userspace. * Attempt to verify the `type' and `path' strings passed to vfs_mount() aren't too long. * rework mount() and linux_mount() to take the userland parameters (besides data, as mentioned) and pass kernel variables to vfs_mount(). (linux_mount() already did this, I've just tidied it up a little more.) * remove the copyin*() stuff for `path'. `data' still requires copyin*() since its a pointer into userland. * set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each filesystem. This variable is generally initialised with `path', and each filesystem can override it if they want to. * NOTE: f_mntonname is intiailised with "/" in the case of a root mount.
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-1/+1
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* o Move from Alfred Perstein's "exclusion" technique of handling specialchris2000-10-093-78/+58
| | | | | | | | | file types to requiring all file types to properly implement fo_stat. This makes any new file type additions much easier as this code no longer has to be modified to accomodate it. o Instead of using curproc in fdesc_allocvp, pass a `struct proc' pointer as a new fifth parameter.
* Add snapshots to the fast filesystem. Most of the changes supportmckusick2000-07-111-2/+7
| | | | | | | | | | | | | | | | | | | | the gating of system calls that cause modifications to the underlying filesystem. The gating can be enabled by any filesystem that needs to consistently suspend operations by adding the vop_stdgetwritemount to their set of vnops. Once gating is enabled, the function vfs_write_suspend stops all new write operations to a filesystem, allows any filesystem modifying system calls already in progress to complete, then sync's the filesystem to disk and returns. The function vfs_write_resume allows the suspended write operations to begin again. Gating is not added by default for all filesystems as for SMP systems it adds two extra locks to such critical kernel paths as the write system call. Thus, gating should only be added as needed. Details on the use and current status of snapshots in FFS can be found in /sys/ufs/ffs/README.snapshot so for brevity and timelyness is not included here. Unless and until you create a snapshot file, these changes should have no effect on your system (famous last words).
* fdesc_getattr:chris2000-06-281-6/+2
| | | | | | Don't fake any file types, just set vap->va_type to IFTOVT(stb.st_mode). If something does not report its mode, vap->va_type is set to VNON accordingly.
* by changing the logic here we can support dynamic additions of newalfred2000-06-271-19/+12
| | | | | | filetypes. Reviewed by: green
* if there are leading zeros fail the lookupalfred2000-06-271-0/+5
| | | | Pointed out by: Alexander Viro <viro@math.psu.edu>
* Rename the `VRXEC' macro used to clear read and exec bits to `FDRX' sochris2000-06-201-3/+3
| | | | as not to impede upon VFS namespace.
* Remove unused include <sys/socketvar.h>.chris2000-06-151-1/+0
|
* Replace vattr_null() with VATTR_NULL() and do not explicity set vattrchris2000-06-151-4/+2
| | | | fields to VNOVAL afterwards.
* Instead of completely disallowing VOP_SETATTR, just do it where there ischris2000-06-061-2/+6
| | | | | | an underlying vnode. Suggested by: bde
* Update the comment for fdesc_setattr to reflect that we no longerchris2000-06-021-1/+1
| | | | actually setattr() on underlying vnodes.
* - Do not allow VOP_SETATTR to modify underlying vnodes at all. This causedchris2000-06-022-6/+0
| | | | | | | | | | | | problems when fetch(1) was passed `-o -'. The rationale of this change is that applications attempting to change underlying vnodes for /dev/fd nodes are improperly written and the use of this interface should not ever have been encouraged. Proper alternatives are fchmod, fchown and others. PR: 18952 - Remove stale, unused fdescnode->fd_link structure member.
* Back out the previous change to the queue(3) interface.jake2000-05-262-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-232-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Adapt fdesc to be mounted on /dev/fd and remove fd, stdin, stdout andchris2000-05-112-439/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | stderr nodes. More specific items of this patch: o Removed support for symbolic links, and the need for fdesc_readlink(). o Put all the code from fdesc_attr() into fdesc_getattr() and removed fdesc_attr(). This also made it easier to properly give all nodes unique inode numbers. o The removal of all non-fd nodes allowed the removal of the fdesc_read(), fdesc_write(), and fdesc_ioctl() nodes, since we no longer have nodes that get special handling. o Correct the component name validity-checking in fdesc_lookup(). It previously detected the end of the string by checking for a terminating NUL, now it uses cnp->cn_namelen. o Handle kqueue files as FIFOs. This is probably the closest file type to represent this type of file there is, and it is unfortunately not very representative of a kqueue. Creation time is not supported by kqueue, so ctime, mtime and atime are all set to the current time when getattr() was called. o Also set st_[mca]time to the current time since there's no data in socket structures that can be used to fill this in (FIFOs). o Simplify fdesc_readdir() since it only has to report the numbered fd nodes. Add `.' and `..' directory links as well. o Remove read bits from directories as they tend to confuse programs like tar(1). Reviewed by: phk Discussed with: bde (earlier on, not quite review)
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Second pass commit to introduce new ACL and Extended Attribute systemrwatson1999-12-191-0/+2
| | | | | | | calls, vnops, vfsops, both in /kern, and to individual file systems that require a vfsop_ array entry. Reviewed by: eivind
* Remove unused #includes.phk1999-12-081-1/+0
| | | | Obtained from: http://bogon.freebsd.dk/include
* Fix a warning.peter1999-11-181-0/+3
|
* Update for fileops.fo_stat() addition. Note, this would panic ifpeter1999-11-081-2/+3
| | | | it saw a DTYPE_PIPE. This isn't quite right but should stop a crash.
* Seperate the export check in VFS_FHTOVP, exports are now checked viaalfred1999-09-111-0/+1
| | | | | | | | | VFS_CHECKEXP. Add fh(open|stat|stafs) syscalls to allow userland to query filesystems based on (network) filehandle. Obtained from: NetBSD
* All unimplemented VFS ops now have entries in kern/vfs_default.c that returnalfred1999-09-071-39/+6
| | | | | | | | | | | | | reasonable defaults. This avoids confusing and ugly casting to eopnotsupp or making dummy functions. Bogus casting of filesystem sysctls to eopnotsupp() have been removed. This should make *_vfsops.c more readable and reduce bloat. Reviewed by: msmith, eivind Approved by: phk Tested by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Make sure that stat(2) and friends always return a valid st_dev field.phk1999-07-021-2/+1
| | | | | | Pseudo-FS need not fill in the va_fsid anymore, the syscall code will use the first half of the fsid, which now looks like a udev_t with major 255.
* Simplify cdevsw registration.phk1999-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-272-4/+4
| | | | kernel compile
* Remove declarations for undefined functions and a couple of unusedeivind1999-01-121-9/+1
| | | | enotsupp implementations.
* Cleanup uninitialized-possibly-used (but really not) warningsdillon1998-12-141-2/+2
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-3/+1
| | | | and local variables, goto labels, and functions declared but not defined.
* Removed statically configured mount type numbers (MOUNT_*) and allbde1998-09-071-2/+2
| | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct.
* Avoid a 64-bit division in fdesc_readdir(). Fixed related overflowsbde1998-06-141-27/+14
| | | | | | | | and missing arg checking. Panic instead of returning bogus error codes or forgetting to check all cases if fdesc_readdir() gets called for a non-directory. This can't happen.
* Make these files compile.dfr1998-06-101-1/+2
|
* ENOPNOTSUPP --> EOPNOTSUPPalex1998-06-101-2/+2
| | | | | PR: 6906 Submitted by: Steven G. Kargl <kargl@troutmask.apl.washington.edu>
* Don't silently accept attempts to change flags where they are notpeter1998-06-101-2/+8
| | | | supported.
* As described by the submitter:msmith1998-05-061-5/+1
| | | | | | | | | | | | | Reverse the VFS_VRELE patch. Reference counting of vnodes does not need to be done per-fs. I noticed this while fixing vfs layering violations. Doing reference counting in generic code is also the preference cited by John Heidemann in recent discussions with him. The implementation of alternative vnode management per-fs is still a valid requirement for some filesystems but will be revisited sometime later, most likely using a different framework. Submitted by: Michael Hancock <michaelh@cet.co.jp>
* The intent is to get rid of WILLRELE in vnode_if.src by makingmsmith1998-03-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a complement to all ops that return a vpp, VFS_VRELE. This is initially only for file systems that implement the following ops that do a WILLRELE: vop_create, vop_whiteout, vop_mknod, vop_remove, vop_link, vop_rename, vop_mkdir, vop_rmdir, vop_symlink This is initial DNA that doesn't do anything yet. VFS_VRELE is implemented but not called. A default vfs_vrele was created for fs implementations that use the standard vnode management routines. VFS_VRELE implementations were made for the following file systems: Standard (vfs_vrele) ffs mfs nfs msdosfs devfs ext2fs Custom union umapfs Just EOPNOTSUPP fdesc procfs kernfs portal cd9660 These implementations may change as VOP changes are implemented. In the next phase, in the vop implementations calls to vrele and the vrele part of vput will be moved to the top layer vfs_vnops and made visible to all layers. vput will be replaced by unlock in these cases. Unlocking will still be done in the per fs layer but the refcount decrement will be triggered at the top because it doesn't hurt to hold a vnode reference a little longer. This will have minimal impact on the structure of the existing code. This will only be done for vnode arguments that are released by the various fs vop implementations. Wider use of VFS_VRELE will likely require restructuring of the code. Reviewed by: phk, dyson, terry et. al. Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Staticize.eivind1998-02-091-3/+3
|
* Removed unused #includes. The need for most of them went away withbde1997-10-271-2/+1
| | | | recent changes (docluster* and vfs improvements).
* VFS interior redecoration.phk1997-10-261-3/+3
| | | | | | | | | | | | | Rename vn_default_error to vop_defaultop all over the place. Move vn_bwrite from vfs_bio.c to vfs_default.c and call it vop_stdbwrite. Use vop_null instead of nullop. Move vop_nopoll from vfs_subr.c to vfs_default.c Move vop_sharedlock from vfs_subr.c to vfs_default.c Move vop_nolock from vfs_subr.c to vfs_default.c Move vop_nounlock from vfs_subr.c to vfs_default.c Move vop_noislocked from vfs_subr.c to vfs_default.c Use vop_ebadf instead of *_ebadf. Add vop_defaultop for getpages on master vnode in MFS.
* VFS clean up "hekto commit"phk1997-10-161-4/+1
| | | | | | | | | | 1. Add defaults for more VOPs VOP_LOCK vop_nolock VOP_ISLOCKED vop_noislocked VOP_UNLOCK vop_nounlock and remove direct reference in filesystems. 2. Rename the nfsv2 vnop tables to improve sorting order.
OpenPOWER on IntegriCloud