Commit Graph

224 Commits

Author SHA1 Message Date
drochner
25df17af88 fix a deadlock during mount:
The client manager (venus) blocks in sys_mount() before entering its
event loop answering requests from the kernel device (cfs). sys_mount()
calls VFS_STATFS() internally which caused an upcall through cfs,
which was never answered.
Now don't consider the fs fully mounted before the VFS_START() was
called at the vey end of sys_mount(). So VFS_STATFS() will return
an error which is ignored.
2003-08-25 10:05:46 +00:00
drochner
eacc9ee5ce nuke an over-zealous memset() which broke statfs() et al. completely 2003-08-25 09:24:53 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
thorpej
a06b275edc Undo part of the ktrace/lwp changes. In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.
2003-06-29 18:43:21 +00:00
thorpej
3a56e3ea7e Adjust for ktrace/lwp changes. 2003-06-29 02:16:59 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
christos
80ecd573c0 PR/1796: John Kohl: statfs misbehaves under chrooted environments.
- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
2003-04-16 21:44:18 +00:00
wiz
0acfa3bb9e Consistently spell occurrence with two rs. 2003-03-29 22:48:37 +00:00
christos
e4d4f01d2b protect <sys/mallocvar.h> ifdef _KERNEL 2003-02-02 02:34:53 +00:00
thorpej
b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
jdolecek
96125fbe64 fix typo in comment, and add (perhaps redundant) note that this depends
on file-system CODA
2003-01-24 18:51:53 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
wiz
7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
jdolecek
362cc2fa44 fix incorrectly introduced coda_psdev.c name change from previous
revision; it was part of local devel change I did not intend to commit
2002-12-26 22:23:30 +00:00
jdolecek
cc09c0a28f insert newlines to the MAKEDEV section, so that it's more clear
what part is MAKEDEV coda and what text
2002-12-26 13:20:44 +00:00
jdolecek
f21116a486 slightly tweak so that the file for vcoda pseudo device is next to
pseudo device declaration
2002-12-26 13:19:05 +00:00
jdolecek
5342a9827c coda_nc_initialized is not used here, remove local extern defition 2002-12-26 12:40:01 +00:00
jdolecek
efbdd9bcb6 do not need <vcoda.h>/NVCODA here 2002-12-26 12:38:59 +00:00
jdolecek
d379f66da8 update to post gehenna-devsw world 2002-12-25 17:31:53 +00:00
christos
fa94542be0 s/si_/sel_/g 2002-11-26 18:45:22 +00:00
perry
3f03646323 /*CONTCOND*/ while (0)'ed macros 2002-11-02 07:17:31 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
christos
6f3945a88d MNT_GETARGS support 2002-09-21 18:10:34 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
soren
178d83d503 Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.
2002-07-30 07:40:07 +00:00
thorpej
37dc008ca3 Cleanup how file system configuration information is declared, grouping
related information together, with the file system code itself.

This is just low-hanging fruit -- more to come.
2002-04-16 23:14:05 +00:00
phil
1e490dbb97 Add the statfs upcall so df now reports cache size and usage. 2002-03-27 05:10:40 +00:00
chs
5a690c92a1 add a VOP_PUTPAGES method for all the filesystems that don't have pages,
just unlock the interlock.
2001-12-06 04:27:40 +00:00
perry
7c92f5c3a7 add a VTOC macro that doesn't cast, and fix a spurious lvalue cast with it. 2001-11-24 01:11:34 +00:00
perry
0b5814f1b4 __FUNCTION__ -> __func__ 2001-11-23 17:42:48 +00:00
lukem
a13b5687d9 add RCSIDs 2001-11-12 23:08:56 +00:00
chs
adf5d360a7 add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.
2001-09-15 16:12:54 +00:00
wiz
c52d355d71 "wierd" is weird. 2001-08-20 12:20:01 +00:00
jdolecek
8070356a9f bound check the vi.in_size in venus_ioctl() 2001-08-05 11:22:33 +00:00
assar
bec71dc090 change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it.  update callers and
file systems that implement these vnode operations
2001-07-24 15:39:30 +00:00
thorpej
682dacc0ca bzero -> memset 2001-07-18 16:12:31 +00:00
chs
dcd6ab5a24 add coda_{get,put}pages so that mmap works. 2001-07-03 06:46:52 +00:00
chs
45701591c6 add a genfs_mmap() and change all of the disk-based filesystems
to implement VOP_MMAP() with the genfs version, in preparation for
actually using this VOP.
2001-05-28 02:50:51 +00:00
lukem
c6a7588b36 delint newline in string 2001-04-30 03:30:45 +00:00
thorpej
5b35dc8136 When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call.  This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.
2001-04-16 22:41:09 +00:00
jdolecek
d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
jdolecek
c490f5c6a1 update commented out code to recent changes of signal structures 2000-12-27 22:06:07 +00:00
jdolecek
e9e91a0fb5 split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.
2000-12-22 22:58:52 +00:00
chs
aeda8d3b77 Initial integration of the Unified Buffer Cache project. 2000-11-27 08:39:39 +00:00
fvdl
8c28d7e864 Adapt for VOP_FSYNC parameter change. 2000-09-19 22:00:01 +00:00
thorpej
7cc27a88c0 Convert namei pathname buffer allocation to use the pool allocator. 2000-08-03 20:41:05 +00:00
mrg
e5dbe33df1 remove redundant vm includes. 2000-06-27 17:53:44 +00:00
phil
799abe9329 Quiet some printfs unless VERBOSE. 2000-04-05 18:39:09 +00:00
augustss
a82aeb5508 Kill register declarations. 2000-03-30 11:24:16 +00:00
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
soren
95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
chs
53a262dfa4 fix DEBUG printfs to compile. 1999-10-31 15:49:27 +00:00
rvb
c4c0fb2cd4 Update 00READ with porting instructions 1999-10-18 02:08:43 +00:00
cgd
28d5608977 nuke RCS "Log" tags. They cause problems for third parties importing
our sources, and for NetBSD release engineering folks.  (They've
been against the NetBSD coding style forever, but they crept in anyway.)
1999-10-17 23:39:15 +00:00
wrstuden
e682a080e9 In spec_close(), if we're not doing a non-blocking close and VXLOCK is
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.

Make all unmount routines lock the device vnode before calling VOP_CLOSE().
1999-10-16 23:53:26 +00:00
soren
ebf35f8d46 Account for widened v_usecount in struct vnode. 1999-10-01 22:25:59 +00:00
matt
9aab9d330a Make this compile on alpha again. 1999-09-18 05:31:42 +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
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
rvb
986bcb3e71 Typo/braino? 1999-04-29 22:20:42 +00:00
wrstuden
862a56e88b Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.
1999-02-26 23:44:43 +00:00
rvb
4b984765e0 Commit a couple of old fixes 1998-12-10 02:22:52 +00:00
ross
19599f6e86 Various trivial LP64 tweaks to squelch some compiler warnings. 1998-11-18 03:09:20 +00:00
rvb
b951d6c0cd Lookup now passes up an extra flag. But old veni will
be ok; new veni will check /dev/cfs0 to make sure that a new
kernel is running.
Also, a bug in vc_nb_close iff CODA_SIGNAL's were seen has been
fixed.
1998-11-11 19:22:08 +00:00
rvb
e7f0c5989f Change the way unmounting happens to guarantee that the
client programs are allowed to finish up (coda_call is
forced to complete) and release their locks.  Thus there
is a reasonable chance that the vflush implicit in the
unmount will not get hung on held locks.
1998-11-09 16:36:16 +00:00
rvb
626749ed68 Venus must be passed O_CREAT flag on VOP_OPEN iff this is
a creat so that we can will allow a mode 444 file to be
written into.  Sync with the latest coda.h and deal with
collateral damage.
1998-10-28 19:54:47 +00:00
rvb
976280c933 I want to distinguish from DEBUG printouts and CODA_VERBOSE printouts.
The latter are normal informational messages that are sometimes
interesting to view.
1998-09-28 17:55:21 +00:00
tv
fb9b823132 DIAGNOSTIC -> DEBUG for all non-panic messages. DIAGNOSTIC is only for
sanity checks and should not turn on any messages not already printed
without it.
1998-09-26 15:24:46 +00:00
rvb
c559082b97 Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG.
Make files compile if DEBUG is on (from  Alan Barrett).  Finally,
make coda an lkm.
1998-09-25 15:01:12 +00:00
rvb
9187d28044 Final piece of rename cfs->coda 1998-09-15 02:02:55 +00:00
rvb
0aa47cd025 Change cfs/CFS in symbols, strings and constants to coda/CODA
to avoid fs conflicts.
1998-09-12 15:05:47 +00:00
rvb
a00eb709cb Pass2 complete 1998-09-08 17:12:46 +00:00
rvb
2eec68d743 Very Preliminary Coda 1998-08-29 21:26:45 +00:00