Commit Graph

54 Commits

Author SHA1 Message Date
jdolecek 89015c4648 Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.
2000-03-16 18:08:17 +00:00
sommerfeld 197579af47 Change variable used for directory offset from "int" to "off_t".
Overkill, but avoids a host of truncation problems.
1999-08-25 14:42:35 +00:00
sommerfeld 2e649e46d3 Fix PR8270:
Problem turned out to be due to improper handling of reads beyond EOF:
they should just return without error with the uio unchanged, and the
caller will recognize this as a zero-byte return (EOF).

The previous fix to protect directory reads against bogus uio_offset
values returned EINVAL, which broke mount -o union, which only
union'ed in the lower directory if the upper directory cleanly
returned EOF.

While we're here, protect kernfs as well.
1999-08-24 23:29:08 +00:00
christos 063e3b9f0f protect against large uio_offsets 1999-08-14 02:17:17 +00:00
wrstuden 3bf14d81e9 Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
thorpej 7f53187a85 From Bill Studenmund: unlock the fdescfs "/dev/tty" vnode before calling
cttyread()/cttywrite(), and lock it again when it returns.

Squashes the somewhat bizarre lossage I was observing w/ more(1), sudo(1),
etc.
1999-07-19 23:00:47 +00:00
wrstuden 9fc36d6807 Bump osrelease to 1.4E. Add layerfs files, remove null_subr.c.
Update coda to new struct lock in struct vnode.

make fdescfs, kernfs, portalfs, and procfs actually lock their vnodes.
It's not that hard.

Make unionfs set v_vnlock = NULL so any overlayed fs will call its
VOP_LOCK.
1999-07-08 01:26:21 +00:00
kleink 5350df2953 Per POSIX, fail with EINVAL if advisory locking is attempted on a file type
that doesn't support it, rather than using a homegrown EBADF or EOPNOTSUPP.
1998-08-13 10:06:31 +00:00
perry 4522c799a1 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:51:08 +00:00
kleink 12a866151b Recognize _PC_SYNC_IO. 1998-08-03 14:19:57 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
chs f64abc7b4c add flags arg to hashinit(), to pass to malloc(). 1998-02-07 02:44:44 +00:00
fvdl ab940dcf06 Bump last argument to VOP_READDIR to off_t (from u_long). 1997-10-10 02:00:56 +00:00
mycroft 1e3c14a909 Eliminate bogus uses of V{READ,WRITE,EXEC}. Use S_I[RWX]{USR,GRP,OTH} where
appropriate.
1997-05-05 07:13:57 +00:00
fvdl aadf9a1d0f fdesc_seek -> genfs_seek, not genfs_badop 1997-04-16 22:43:41 +00:00
kleink 9c16cd8a46 Implement a POSIX compliant genfs VOP_SEEK() and use it in the appropriate
places; by Chris G. Demetriou and myself.
1997-04-11 21:52:00 +00:00
cgd a67c0b16b8 define path name string variables that we should not (and, thankfully, do
not) modify as 'const char *' rather 'char *'.
1996-10-25 21:57:58 +00:00
christos 92a808f167 backout previous kprintf changes 1996-10-13 02:21:25 +00:00
christos 60d201973e printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:46:11 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
mycroft c52352c819 Add a set of generic file system operations that most file systems use.
Also, fix some time stamp bogosities.
1996-09-01 23:47:48 +00:00
mrg 2a0f025a41 use VATTR_NULL macro. 1996-06-14 09:27:23 +00:00
mrg 2a0a8867ae fix long-time bug in fdesc -- /dev/tty was a named pipe rather than a
mirror image of the real /dev/tty, a char dev.  make it a char dev.
1996-04-11 11:24:29 +00:00
mycroft 183aec8fa8 GC *_nullop(). Minor nits. 1996-02-13 13:12:48 +00:00
christos 631ccba638 miscfs prototype changes 1996-02-09 22:39:56 +00:00
mycroft 53fccab940 Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
  cleanup.
* Require the file system to decide whether or not linking and unlinking of
  directories is allowed, and disable it for all current file systems.
1996-02-09 14:45:36 +00:00
jtc 299e1fe9df Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:31:05 +00:00
mycroft 1e583dfb19 /dev/std* are of type DT_LNK. 1995-10-09 14:20:04 +00:00
mycroft d60bb4a465 Use the index number as the cookie, rather than multiplying by UIO_MX. 1995-10-09 14:03:32 +00:00
mycroft bcaf2bca34 Add support for cookies, mostly from Greg Hudson. 1995-10-09 11:18:51 +00:00
mycroft 7276c4ed44 Remove a_fp. 1994-12-14 18:45:21 +00:00
mycroft ef575bdbc1 Revert dup handling. 1994-12-14 18:40:27 +00:00
mycroft 2981ef6595 Sync with CSRG. 1994-12-13 09:58:11 +00:00
mycroft b05e959a14 Use fddupopen(), just like fdopen() does. 1994-12-04 03:13:06 +00:00
christos 8cdc99a059 fixed struct comment 1994-11-14 06:04:31 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd 6b86130410 update for new syscall args description mechanism 1994-10-20 04:22:35 +00:00
mycroft 537ac5465f Convert hash tables. 1994-08-19 11:25:29 +00:00
mycroft cb07d61edf Fix a fencepost error. 1994-07-14 20:58:28 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
mycroft cde1d47595 Update to 4.4-Lite fs code, with local changes. 1994-06-08 11:33:09 +00:00
cgd 4bbabd8e7a Rename a lot of process flags. 1994-05-04 03:41:12 +00:00
cgd d071d1cf05 some prototype cleanup, eliminate/replace bogus types (e.g. quad and
u_quad) -> use better types (e.g. quad_t & u_quad_t in inodes),
some cleanup.
1994-04-25 03:49:27 +00:00
ws 903f51e908 Note that NFS mounting of fdesc doesn't make sense 1994-01-09 17:33:06 +00:00
cgd 058b0b8772 don't try to reclaim 'known' root vnode 1994-01-05 15:11:32 +00:00
cgd 9d1babb688 fix UFS vs 'real' fs type mixups 1994-01-05 11:07:31 +00:00
cgd 4942f8a8bc update with latest fdesc file system from jsp@sequent.com 1994-01-05 09:00:57 +00:00
cgd 76cce4cfdd fix fdesc_print return type (again) 1993-12-23 17:37:33 +00:00
ws 053f138dae Changes to VFS readdir semantics
NFS changes for better cookie support
ISOFS changes for better Rockridge support and support for generation numbers
1993-09-07 15:40:14 +00:00
mycroft daa27b3c30 Make fdesc_print have a return type of void. 1993-08-02 23:01:49 +00:00