Commit Graph

62 Commits

Author SHA1 Message Date
lukem 1ac69d9cb3 add RCSIDs 2001-11-12 22:54:03 +00:00
chs 64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
mrg c13e3a6693 use _KERNEL_OPT 2001-05-30 11:40:35 +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
chs 49a0cbf7f6 in adosfs_read(), only do the UBC thang for "FFS" files (ie. those that
don't mix data and metadata in the same sector).  in adosfs_bmap(), set
the "run" return value to 0 to indicate the result is only good for 1 block.
these fix the rest of PR 12270.
2001-04-12 04:12:04 +00:00
chs 060e70db41 min() -> MIN(), max() -> MAX().
fixes more problems with file offsets > 4GB.
2001-02-27 04:37:44 +00:00
jdolecek d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
chs aeda8d3b77 Initial integration of the Unified Buffer Cache project. 2000-11-27 08:39:39 +00:00
thorpej a07f6460c8 MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-03 00:54:23 +00:00
thorpej 071aed40ac A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well.  This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
2000-05-19 18:54:22 +00:00
itohy 5de5ad21a2 Revoke revoke(2) bug. 1999-08-19 03:42:23 +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 379a26972f Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.
1999-07-08 01:05:58 +00:00
is 1790023ce8 Support ADOS file systems with more then 512 bytes/sector.
Fixes contributed by Detlef Würkner in PR 7653.
1999-06-02 22:04:30 +00:00
kleink 9ee75a4fcc Add _PC_FILESIZEBITS to pathconf vnop. 1999-03-22 19:21:07 +00:00
bouyer 22d556f6cf Make sure a buffer optained from bread() is always bresle()'d in case of
error. Closes PR kern/1448 from Wolfgang Solfrank.
1999-02-10 13:14:08 +00:00
thorpej d0bcffb9a3 Use the pool allocator and the "nointr" pool page allocator for adosfs nodes. 1998-09-01 03:33:26 +00:00
kleink 1bbb6339c8 In readlink, don't copy the string's NUL-terminator, and remove a redundant
check.
1998-08-19 13:12:40 +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
matthias 574106c52b create miscfs/genfs/genfs_vnops.c:genfs_enoioctl and make all the other
filesystems use it instead of a private version.
1998-08-10 08:11:10 +00:00
perry 27ca6798df bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:15:38 +00:00
kleink 12a866151b Recognize _PC_SYNC_IO. 1998-08-03 14:19:57 +00:00
thorpej 0f66e53c03 Use genfs_lease_check() 1998-06-25 22:20:39 +00:00
scottr 7171cca4b8 Protect various config(8)-generated files from inclusion while
building LKMs.  Fixes PR 5557.
1998-06-09 07:46:31 +00:00
scottr d48f258f90 Use the newly-defined opt_quota.h. 1998-06-08 04:27:50 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
fvdl fd5433c6bc Bump last argument to VOP_READDIR to off_t (from u_long). 1997-10-10 01:57:31 +00:00
veego 2aba644f04 Fix a cut&paste (?) mistake. pr#3622 1997-05-14 19:00:17 +00:00
mycroft e3f99a9397 Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +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
christos 520aa2aeba backout previous kprintf change 1996-10-13 02:52:06 +00:00
christos 5476886e52 printf -> kprintf, sprintf -> ksprintf 1996-10-10 17:47:29 +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
veego 5bdb632088 u_int -> u_long fixes for printf's 1996-04-23 05:18:29 +00:00
mhitch a0e658617d Add support for OFS, International FileSystems, and blocksizes > 512.
Corrrect floppy rootblock calculation.  Validate filesystem type. (Closes
PR 2232)
Filename hashing requires unsigned characters.  (Closes PR 1026)
Soft link path is null-terminated string, not BSTR.
Use actual file header block info for hard links.
Set nlink to 2 for hard linked files in adosfs_getattr().
Load allocation bitmap and set correct free space.
1996-04-05 05:06:07 +00:00
christos 3e701ffc5a Add forward decls. 1996-02-10 00:44:18 +00:00
christos 2140eeda0f Adosfs prototyping changes. 1996-02-09 19:06:38 +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 dd05bd5124 Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:04:52 +00:00
chopps b84f35f3f0 make nfsable from osymh@gemini.oscs.montana.edu (Michael L. Hitch) 1995-08-18 15:14:33 +00:00
chopps dbd3d08cf0 set blocksize in adosfs_getattr(). fixes pr#968 1995-04-17 12:22:08 +00:00
mycroft 958b56730a amount -> adosfsmount 1995-01-18 09:17:32 +00:00
chopps 31fb8e04bb cleanup a couple botched merges. 1994-12-29 22:06:15 +00:00
chopps 85444a9a0b a couple fixes. Add support for muFS (multi-user adosfs). Default to
case-insesitive lookup.  from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
1994-12-28 08:51:56 +00:00
mycroft 609063ce2b Format police. 1994-12-27 19:05:12 +00:00
ws a40374fa29 Implement and use a common access checking routine 1994-12-24 16:43:32 +00:00
mycroft 527b796ff5 Turn lease_check() into a vnode op, per CSRG. 1994-12-13 20:14:30 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd be8c7b9d80 light clean; make sure headers are properly included, types are OK, etc. 1994-10-29 07:58:24 +00:00