Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/nfs/Attic/nfs_vnops.c

[BACK] Up to [FreeBSD] / src / sys / nfs

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.150.2.8: download - view: text, markup, annotated - select for diffs
Sat Jan 10 08:24:33 2004 UTC (8 years, 1 month ago) by tjr
Branches: RELENG_4
CVS tags: RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.150.2.7: preferred, colored; branchpoint 1.150: preferred, colored; next MAIN 1.151: preferred, colored
Changes since revision 1.150.2.7: +7 -1 lines
MFC: Fix a problem that occurs when truncating files on NFSv3 mounts: we
need to set np->n_size back to the desired size again after calling
nfs_meta_setsize(), since it could end up in nfs_loadattrcache() getting
called, which would change n_size back to the value it had before the
truncate request was issued. The result of this bug is that the size info
cached in the nfsnode becomes incorrect, lseek(fd, ofs, SEEK_END) seeks
past the end of the file, stat() returns the wrong size, etc.

PR:		41792

Revision 1.150.2.7: download - view: text, markup, annotated - select for diffs
Thu Dec 11 14:52:23 2003 UTC (8 years, 2 months ago) by dds
Branches: RELENG_4
Diff to: previous 1.150.2.6: preferred, colored; branchpoint 1.150: preferred, colored
Changes since revision 1.150.2.6: +9 -4 lines
MFC src/sys/nfsclient/nfs_vnops.c 1.208 -> 1.209

Revision 1.150.2.6: download - view: text, markup, annotated - select for diffs
Fri Jun 20 00:54:11 2003 UTC (8 years, 7 months ago) by iedowse
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9
Diff to: previous 1.150.2.5: preferred, colored; branchpoint 1.150: preferred, colored
Changes since revision 1.150.2.5: +6 -0 lines
MFC: sys/nfsclient/nfs_vnops.c 1.206; when removing a sillyrename
file, make sure that the directory vnode has not been cleaned.

Revision 1.150.2.5: download - view: text, markup, annotated - select for diffs
Thu Dec 20 19:56:28 2001 UTC (10 years, 1 month ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8, RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5
Diff to: previous 1.150.2.4: preferred, colored; branchpoint 1.150: preferred, colored
Changes since revision 1.150.2.4: +19 -5 lines
MFC NFS and VM bug fixes (see my commit 2001/12/13 17:16:57 PST,
kern/vfs_bio.c 1.295 and friends)

Approved by:	Release Engineers

Revision 1.174
Tue Sep 18 23:31:47 2001 UTC (10 years, 4 months ago) by peter
Branches: MAIN
CVS tags: HEAD
FILE REMOVED
Changes since revision 1.173: +1 -1 lines
Cleanup and split of nfs client and server code.
This builds on the top of several repo-copies.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:38:01 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: KSE_MILESTONE_2
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +115 -115 lines
KSE Milestone 2
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

Revision 1.150.2.4: download - view: text, markup, annotated - select for diffs
Sun Aug 5 00:23:58 2001 UTC (10 years, 6 months ago) by iedowse
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.150.2.3: preferred, colored; branchpoint 1.150: preferred, colored
Changes since revision 1.150.2.3: +3 -3 lines
MFC: 1.172; fix client-side memory leak in nfs_flush().

Approved by:	murray

Revision 1.172: download - view: text, markup, annotated - select for diffs
Wed Aug 1 10:25:13 2001 UTC (10 years, 6 months ago) by iedowse
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +3 -3 lines
Fix a client-side memory leak in nfs_flush(). The code allocates
a temporary array to store struct buf pointers if the list doesn't
fit in a local array. Usually it frees the array when finished,
but if it jumps to the 'again' label and the new list does fit in
the local array then it can forget to free a previously malloc'd
M_TEMP memory.

Move the free() up a line so that it frees any previously allocated
memory whether or not it needs to malloc a new array.

Reviewed by:	dillon

Revision 1.150.2.3: download - view: text, markup, annotated - select for diffs
Tue Jun 26 04:20:10 2001 UTC (10 years, 7 months ago) by bp
Branches: RELENG_4
Diff to: previous 1.150.2.2: preferred, colored; branchpoint 1.150: preferred, colored
Changes since revision 1.150.2.2: +7 -1 lines
MFC: the rest of fixes for nullfs. Please note, that for now only
ufs mounts can be used for null mounts. msdosfs and cd9660fs fixes
are trivial and will be committed shortly. Null mounts on top of nfs
filesystem will cause problems after rename() operation. This issue
also present in -current and can be fixed too.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Wed May 23 09:42:05 2001 UTC (10 years, 8 months ago) by ru
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +2 -2 lines
- FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION file
  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.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Sun Apr 29 11:48:38 2001 UTC (10 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +1 -36 lines
Add a vop_stdbmap(), and make it part of the default vop vector.

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.

Revision 1.169: download - view: text, markup, annotated - select for diffs
Sun Apr 29 03:10:24 2001 UTC (10 years, 9 months ago) by alfred
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +1 -2 lines
Remove incorrect comment.

Submitted by: quinot@inf.enst.fr <quinot@inf.enst.fr>
PR: kern/26893

Revision 1.168: download - view: text, markup, annotated - select for diffs
Sun Apr 29 02:45:08 2001 UTC (10 years, 9 months ago) by grog
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +1 -3 lines
Revert consequences of changes to mount.h, part 2.

Requested by:	bde

Revision 1.167: download - view: text, markup, annotated - select for diffs
Mon Apr 23 08:57:52 2001 UTC (10 years, 9 months ago) by grog
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +3 -1 lines
Correct #includes to work with fixed sys/mount.h.

Revision 1.166: download - view: text, markup, annotated - select for diffs
Tue Apr 17 20:45:22 2001 UTC (10 years, 9 months ago) by alfred
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +3 -8 lines
Implement client side NFS locks.

Obtained from: BSD/os
Import Ok'd by: mckusick, jkh, motd on builder.freebsd.org

Revision 1.165: download - view: text, markup, annotated - select for diffs
Tue Apr 17 08:56:36 2001 UTC (10 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +5 -20 lines
This patch removes the VOP_BWRITE() vector.

VOP_BWRITE() was a hack which made it possible for NFS client
side to use struct buf with non-bio backing.

This patch takes a more general approach and adds a bp->b_op
vector where more methods can be added.

The success of this patch depends on bp->b_op being initialized
all relevant places for some value of "relevant" which is not
easy to determine.  For now the buffers have grown a b_magic
element which will make such issues a tiny bit easier to debug.

Revision 1.150.2.2: download - view: text, markup, annotated - select for diffs
Fri Mar 2 16:45:12 2001 UTC (10 years, 11 months ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3
Diff to: previous 1.150.2.1: preferred, colored; branchpoint 1.150: preferred, colored
Changes since revision 1.150.2.1: +9 -1 lines
MFC vfs_bio.c/1.273, kern/vfs_cluster.c/1.105, nfs/nfs_vnops.c 1.164,
Fix lockup for loopback NFS mounts.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Wed Feb 28 04:13:11 2001 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +9 -1 lines
Fix lockup for loopback NFS mounts.  The pipelined I/O limitations could be
hit on the client side and prevent the server side from retiring writes.
Pipeline operations turned off for all READs (no big loss since reads are
usually synchronous) and for NFS writes, and left on for the default bwrite().
(MFC expected prior to 4.3 freeze)

Testing by: mjacob, dillon

Revision 1.116.2.9: download - view: text, markup, annotated - select for diffs
Sat Jan 6 19:46:42 2001 UTC (11 years, 1 month ago) by dillon
Branches: RELENG_3
Diff to: previous 1.116.2.8: preferred, colored; branchpoint 1.116: preferred, colored; next MAIN 1.117: preferred, colored
Changes since revision 1.116.2.8: +15 -2 lines
MFC 1.163 to 3.x.

Revision 1.150.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 6 18:58:29 2001 UTC (11 years, 1 month ago) by dillon
Branches: RELENG_4
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +15 -2 lines
MFC 1.163 - client-side fix for bogus access time with O_EXCL|O_CREAT opens

Revision 1.163: download - view: text, markup, annotated - select for diffs
Thu Jan 4 22:45:19 2001 UTC (11 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +15 -2 lines
NFS O_EXCL file create semantics temporarily uses file attributes to store
the file verifier.  The NFS client is supposed to do a SETATTR after a
successful O_EXCL open/create to clean up the attributes.  FreeBSD's
client code was generating a SETATTR rpc but was not generating an access
or modification time update within that rpc, leaving the file with a
broken access time that solaris chokes on (and it doesn't look very
nice when you ls -lua under FreeBSD either!).    Fixed.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Wed Nov 1 17:57:23 2000 UTC (11 years, 3 months ago) by eivind
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +1 -22 lines
Give vop_mmap an untimely death.  The opportunity to give it a timely
death timed out in 1996.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Sun Oct 15 08:06:32 2000 UTC (11 years, 3 months ago) by bp
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +32 -12 lines
Make nfs PDIRUNLOCK aware. Now it is possible to use nullfs mounts on top
of nfs mounts, but there can be side effects because nfs uses shared locks
for vnodes.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Sun Oct 15 08:01:28 2000 UTC (11 years, 3 months ago) by bp
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +3 -1 lines
Add missed vop_stdunlock() for fifo's vnops (this affects only v2 mounts).

Give nfs's node lock its own name.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Mon Sep 25 15:24:03 2000 UTC (11 years, 4 months ago) by bp
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +5 -1 lines
Add a lock structure to vnode structure. Previously it was either allocated
separately (nfs, cd9660 etc) or keept as a first element of structure
referenced by v_data pointer(ffs). Such organization leads to known problems
with stacked filesystems.

From this point vop_no*lock*() functions maintain only interlock lock.
vop_std*lock*() functions maintain built-in v_lock structure using lockmgr().
vop_sharedlock() is compatible with vop_stdunlock(), but maintains a shared
lock on vnode.

If filesystem wishes to export lockmgr compatible lock, it can put an address
of this lock to v_vnlock field. This indicates that the upper filesystem
can take advantage of it and use single lock structure for entire (or part)
of stack of vnodes. This field shouldn't be examined or modified by VFS code
except for initialization purposes.

Reviewed in general by:	mckusick

Revision 1.158: download - view: text, markup, annotated - select for diffs
Fri May 5 09:58:42 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +2 -1 lines
Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sun Apr 30 18:52:00 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +1 -2 lines
Remove unneeded #include <vm/vm_zone.h>

Generated by:	src/tools/tools/kerninclude

Revision 1.156: download - view: text, markup, annotated - select for diffs
Sat Apr 29 16:25:12 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +2 -2 lines
s/biowait/bufwait/g

Prodded by: several.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Wed Apr 19 14:58:13 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +1 -2 lines
Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>

Revision 1.154: download - view: text, markup, annotated - select for diffs
Sat Apr 15 05:53:52 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +2 -2 lines
Complete the bio/buf divorce for all code below devfs::strategy

Exceptions:
        Vinum untouched.  This means that it cannot be compiled.
        Greg Lehey is on the case.

        CCD not converted yet, casts to struct buf (still safe)

        atapi-cd casts to struct buf to examine B_PHYS

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun Apr 2 15:24:32 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +5 -3 lines
Move B_ERROR flag to b_ioflags and call it BIO_ERROR.

(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Mon Mar 20 11:29:00 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -3 lines
Rename the existing BUF_STRATEGY() to DEV_STRATEGY()

substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo)

substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo)

This patch is machine generated except for the ccd.c and buf.h parts.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Mon Mar 20 10:44:36 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +5 -4 lines
Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new
field in struct buf: b_iocmd.  The b_iocmd is enforced to have
exactly one bit set.

B_WRITE was bogusly defined as zero giving rise to obvious coding
mistakes.

Also eliminate the redundant struct buf flag B_CALL, it can just
as efficiently be done by comparing b_iodone to NULL.

Should you get a panic or drop into the debugger, complaining about
"b_iocmd", don't continue.  It is likely to write on your disk
where it should have been reading.

This change is a step in the direction towards a stackable BIO capability.

A lot of this patch were machine generated (Thanks to style(9) compliance!)

Vinum users:  Greg has not had time to test this yet, be careful.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Wed Jan 5 00:32:18 2000 UTC (12 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE, RELENG_4_1_0_RELEASE, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +22 -4 lines
    Fix at least one source of the continued 'NFS append race'.  close()
    was calling nfs_flush() and then clearing the NMODIFIED bit.  This is
    not legal since there might still be dirty buffers after the nfs_flush
    (for example, pending commits).  The clearing of this bit in turn prevented
    a necessary vinvalbuf() from occuring leaving left over dirty buffers
    even after truncating the file in a new operation.  The fix is to
    simply not clear NMODIFIED.

    Also added a sysctl vfs.nfs.nfsv3_commit_on_close which, if set to 1,
    will cause close() to do a stage 1 write AND a stage 2 commit
    synchronously.  By default only the stage 1 write is done synchronously.

Reviewed by:	Alfred Perlstein <bright@wintelcom.net>

Revision 1.149: download - view: text, markup, annotated - select for diffs
Wed Dec 15 23:02:19 1999 UTC (12 years, 1 month ago) by eivind
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +1 -23 lines
Introduce NDFREE (and remove VOP_ABORTOP)

Revision 1.36.2.12: download - view: text, markup, annotated - select for diffs
Sun Dec 12 07:28:51 1999 UTC (12 years, 2 months ago) by dillon
Branches: RELENG_2_2
Diff to: previous 1.36.2.11: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.2.11: +4 -4 lines
    MFC nfs_bio.c 1.81, nfs_subs.c 1.86, nfs_vnops.c 1.148

Revision 1.116.2.8: download - view: text, markup, annotated - select for diffs
Sun Dec 12 06:52:34 1999 UTC (12 years, 2 months ago) by dillon
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE
Diff to: previous 1.116.2.7: preferred, colored; branchpoint 1.116: preferred, colored
Changes since revision 1.116.2.7: +4 -4 lines
    MFC nfs_bio.c 1.81, nfs_subs.c 1.86, nfs_vnops.c 1.148.  Fixed two
    rare-occuring bugs in NFS.  First, B_CLUSTEROK must be cleared when
    B_NEEDCOMMIT is cleared since uncommitted dirty buffers may not be
    clustered.  Second, B_NEEDCOMMIT cannot be gratuitously set in
    nfs_flush().  Due to lack of locking a buffer may be added to the
    dirtyblkhd list during the flush and setting B_NEEDCOMMIT can result
    in the buffer's data being thrown away rather then written to the server.

Reviewed by: dg
Approved by: jkh

Revision 1.148: download - view: text, markup, annotated - select for diffs
Sun Dec 12 06:09:56 1999 UTC (12 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -27 lines
    Synopsis of problem being fixed:  Dan Nelson originally reported that
    blocks of zeros could wind up in a file written to over NFS by a client.
    The problem only occurs a few times per several gigabytes of data.   This
    problem turned out to be bug #3 below.

    bug #1:

        B_CLUSTEROK must be cleared when an NFS buffer is reverted from
        stage 2 (ready for commit rpc) to stage 1 (ready for write).
        Reversions can occur when a dirty NFS buffer is redirtied with new
        data.

        Otherwise the VFS/BIO system may end up thinking that a stage 1
        NFS buffer is clusterable.  Stage 1 NFS buffers are not clusterable.

    bug #2:

        B_CLUSTEROK was inappropriately set for a 'short' NFS buffer (short
        buffers only occur near the EOF of the file).  Change to only set
        when the buffer is a full biosize (usually 8K).  This bug has no
        effect but should be fixed in -current anyway.  It need not be
        backported.

    bug #3:

        B_NEEDCOMMIT was inappropriately set in nfs_flush() (which is
	typically only called by the update daemon).  nfs_flush()
        does a multi-pass loop but due to the lack of vnode locking it
        is possible for new buffers to be added to the dirtyblkhd list
        while a flush operation is going on.  This may result in nfs_flush()
        setting B_NEEDCOMMIT on a buffer which has *NOT* yet gone through its
        stage 1 write, causing only the commit rpc to be made and thus
        causing the contents of the buffer to be thrown away (never sent to
        the server).

    The patch also contains some cleanup, which only applies to the commit
    into -current.

Reviewed by:	dg, julian
Originally Reported by: Dan Nelson <dnelson@emsphone.com>

Revision 1.147: download - view: text, markup, annotated - select for diffs
Tue Nov 30 06:56:15 1999 UTC (12 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +34 -4 lines
    The symlink implementation could improperly return a NULL vp along with
    a 0 error code.  The problem occured with NFSv2 mounts and also with
    any NFSv3 mount returning an EEXIST error (which is translated to 0
    prior to return).  The reply to the rpc only contains the file handle
    for the no-error case under NFSv3.  The error case under NFSv3 and
    all cases under NFSv2 do *not* return the file handle.  The fix is
    to do a secondary lookup to obtain the file handle and thus be able
    to generate a return vnode for the situations where the rpc reply
    does not contain the required information.

    The bug was originally introduced when VOP_SYMLINK semantics were
    changed for -CURRENT.  The NFS symlink implementation was not properly
    modified to go along with the change despite the fact that three
    people reviewed the code.  It took four attempts to get the current
    fix correct with five people.  Is NFS obfuscated?  Ha!

Reviewed by:	Alfred Perlstein <bright@wintelcom.net>
Testing and Discussion: "Viren R.Shah" <viren@rstcorp.com>, Eivind Eklund <eivind@FreeBSD.ORG>, Ian Dowse <iedowse@maths.tcd.ie>

Revision 1.146: download - view: text, markup, annotated - select for diffs
Sat Nov 27 18:14:41 1999 UTC (12 years, 2 months ago) by eivind
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +10 -8 lines
Remap the error EEXISTS => 0 *before* using error to determine if we should
return a vp.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Sat Nov 20 16:09:10 1999 UTC (12 years, 2 months ago) by eivind
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +2 -8 lines
Fix VOP_MKNOD for loss of WILLRELE.   I don't know how I could have missed
this in the first place :-(

Noticed by:	bde

Revision 1.144: download - view: text, markup, annotated - select for diffs
Sat Nov 13 20:58:16 1999 UTC (12 years, 2 months ago) by eivind
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +4 -2 lines
Remove WILLRELE from VOP_SYMLINK

Note: Previous commit to these files (except coda_vnops and devfs_vnops)
that claimed to remove WILLRELE from VOP_RENAME actually removed it from
VOP_MKNOD.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Mon Oct 25 19:22:33 1999 UTC (12 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +8 -7 lines
    Move NFS access cache hits/misses into nfsstats structure so
    /usr/bin/nfsstat can get to it easily.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sun Oct 3 12:18:27 1999 UTC (12 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +1 -5 lines
Before we start to mess with the VFS name-cache clean things up a little bit:
Isolate the namecache in its own file, and give it a dedicated malloc type.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Fri Sep 17 05:57:57 1999 UTC (12 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +15 -12 lines
    Asynchronized client-side nfs_commit.  NFS commit operations were
    previously issued synchronously even if async daemons (nfsiod's) were
    available.  The commit has been moved from the strategy code to the doio
    code in order to asynchronize it.

    Removed use of lastr in preparation for removal of vnode->v_lastr.  It
    has been replaced with seqcount, which is already supported by the system
    and, in fact, gives us a better heuristic for sequential detection then
    lastr ever did.

    Made major performance improvements to the server side commit.  The
    server previously fsync'd the entire file for each commit rpc.  The
    server now bawrite()s only those buffers related to the offset/size
    specified in the commit rpc.

    Note that we do not commit the meta-data yet.  This works still needs
    to be done.

    Note that a further optimization can be done (and has not yet been done)
    on the client: we can merge multiple potential commit rpc's into a
    single rpc with a greater file offset/size range and greatly reduce
    rpc traffic.

Reviewed by:	Alan Cox <alc@cs.rice.edu>, David Greenman <dg@root.com>

Revision 1.15.4.4: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:36:31 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_1_0
Diff to: previous 1.15.4.3: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.4.3: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.36.2.11: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:19:47 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.36.2.10: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.10: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.116.2.7: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:30:32 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_3_0_RELEASE
Diff to: previous 1.116.2.6: preferred, colored; branchpoint 1.116: preferred, colored
Changes since revision 1.116.2.6: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.140: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:50:01 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.139: download - view: text, markup, annotated - select for diffs
Sun Aug 8 18:42:56 1999 UTC (12 years, 6 months ago) by phk
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -2 lines
Decommision miscfs/specfs/specdev.h.  Most of it goes into <sys/conf.h>,
a few lines into <sys/vnode.h>.

Add a few fields to struct specinfo, paving the way for the fun part.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Sat Jul 31 01:51:58 1999 UTC (12 years, 6 months ago) by msmith
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +55 -34 lines
As described by the submitter:

  I did some tcpdumping the other day and noticed that GETATTR calls
  were frequently followed by an ACCESS call to the same file. The
  attached patch changes nfs_getattr to fill the access cache as a side
  effect. This is accomplished by calling ACCESS rather than
  GETATTR. This implies a modest overhead of 4 bytes in the request and
  8 bytes in the response compared to doing a vanilla GETATTR.
...
  [The patch comprises two parts] The first
  is the "real" patch, the second counts misses and hits rather than
  fills and hits. The difference is subtle but important because both
  nfs_getattr and nfs_access now fill the cache. It also changes the
  default value of nfsaccess_cache_timeout to better match the attribute
  cache. IMHO, file timestamps change much more frequently than
  protection bits.

Submitted by:	Bjoern Groenvall <bg@sics.se>
Reviewed by:	dillon (partially)

Revision 1.116.2.6: download - view: text, markup, annotated - select for diffs
Fri Jul 30 04:53:12 1999 UTC (12 years, 6 months ago) by wpaul
Branches: RELENG_3
Diff to: previous 1.116.2.5: preferred, colored; branchpoint 1.116: preferred, colored
Changes since revision 1.116.2.5: +2 -2 lines
MFC: close PR #12651 (fix hash calculation for cn_hash in
nfs_readdirplusrpc()).

Revision 1.137: download - view: text, markup, annotated - select for diffs
Fri Jul 30 04:51:35 1999 UTC (12 years, 6 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +2 -2 lines
Close PR #12651: the hash calculation routine has changed in other
parts of the kernel but was not updated in nfs_readdirplusrpc().

Revision 1.116.2.5: download - view: text, markup, annotated - select for diffs
Fri Jul 30 04:03:21 1999 UTC (12 years, 6 months ago) by wpaul
Branches: RELENG_3
Diff to: previous 1.116.2.4: preferred, colored; branchpoint 1.116: preferred, colored
Changes since revision 1.116.2.4: +6 -3 lines
MFC: fix nfs_readdirplusrpc() so that it actually works.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Fri Jul 30 04:02:04 1999 UTC (12 years, 6 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +6 -3 lines
Fix two bugs in nfs_readdirplus(). The first is that in some cases,
vnodes are locked and never unlocked, which leads to processes starting
to wedge up after doing a mount -o nfsv3,tcp,rdirplus foo:/fs /fs; ls /fs.
The second is that sometimes cnp is accessed without having been
properly initialized: cnp->cn_nameptr points to an earlier name while
"len" contains the length of a current name of different size. This
leads to an attempt to dereference *(cn->cn_nameptr + len) which will
sometimes cause a page fault and a panic.

With these two fixes, client side readdirplus works correctly with
FreeBSD, IRIX 6.5.4 and Solaris 2.5.1 and 2.6 servers.

Submitted by: Matthew Dillon <dillon@backplane.com>

Revision 1.135: download - view: text, markup, annotated - select for diffs
Thu Jul 1 13:32:54 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +2 -2 lines
Fix warning. va_fsid is udev_t, which is int32_t.  No need to use %lx.

Revision 1.116.2.4: download - view: text, markup, annotated - select for diffs
Wed Jun 30 03:38:52 1999 UTC (12 years, 7 months ago) by julian
Branches: RELENG_3
Diff to: previous 1.116.2.3: preferred, colored; branchpoint 1.116: preferred, colored
Changes since revision 1.116.2.3: +6 -1 lines
MFC: Handle auspex NFS server problem
	courtesy of apple.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Wed Jun 30 02:53:51 1999 UTC (12 years, 7 months ago) by julian
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +6 -1 lines
Submitted by: Conrad Minshall <conrad@apple.com>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>

The following ugly hack to the exit path of nfs_readlinkrpc() circumvents
an Auspex bug: for symlinks longer than 112 (0x70) they return a 1024 byte
xdr string - the correct data with many nulls appended.  Without this fix
namei returns ENAMETOOLONG, at least it does on our source base and on
FreeBSD 3.0.  Note we do not (and should not) rely upon their null padding.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Mon Jun 28 12:34:40 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +2 -2 lines
Fix a KASSERT() that was negated and lead to:
  nfs_strategy: buffer 0xxxxx not locked
when you attempted to write and had INVARIANTS turned on.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat Jun 26 02:46:32 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +28 -22 lines
Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old
semantics. That is, all buffer locking is done with LK_EXCLUSIVE
requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will
be done in future commits.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed Jun 16 23:27:48 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -2 lines
Add a vnode argument to VOP_BWRITE to get rid of the last vnode
operator special case. Delete special case code from vnode_if.sh,
vnode_if.src, umap_vnops.c, and null_vnops.c.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Sat Jun 5 05:35:02 1999 UTC (12 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +6 -6 lines
Various changes lifted from the OpenBSD cvs tree:

txdr_hyper and fxdr_hyper tweaks to avoid excessive CPU order knowledge.

nfs_serv.c: don't call nfsm_adj() with negative values, windows clients
could crash servers when doing a readdir of a large directory.

nfs_socket.c: Use IP_PORTRANGE to get a priviliged port without a spin
loop trying to bind().  Don't clobber a mbuf pointer or we get panics
on a NFS3ERR_JUKEBOX error from a server when reusing a freed mbuf.

nfs_subs.c: Don't loose st_blocks on NFSv2 mounts when > 2GB.

Obtained from:  OpenBSD

Revision 1.129: download - view: text, markup, annotated - select for diffs
Tue May 11 19:54:47 1999 UTC (12 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +3 -3 lines
Divorce "dev_t" from the "major|minor" bitmap, which is now called
udev_t in the kernel but still called dev_t in userland.

Provide functions to manipulate both types:
        major()         umajor()
        minor()         uminor()
        makedev()       umakedev()
        dev2udev()      udev2dev()

For now they're functions, they will become in-line functions
after one of the next two steps in this process.

Return major/minor/makedev to macro-hood for userland.

Register a name in cdevsw[] for the "filedescriptor" driver.

In the kernel the udev_t appears in places where we have the
major/minor number combination, (ie: a potential device: we
may not have the driver nor the device), like in inodes, vattr,
cdevsw registration and so on, whereas the dev_t appears where
we carry around a reference to a actual device.

In the future the cdevsw and the aliased-from vnode will be hung
directly from the dev_t, along with up to two softc pointers for
the device driver and a few houskeeping bits.  This will essentially
replace the current "alias" check code (same buck, bigger bang).

A little stunt has been provided to try to catch places where the
wrong type is being used (dev_t vs udev_t), if you see something
not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if
it makes a difference.  If it does, please try to track it down
(many hands make light work) or at least try to reproduce it
as simply as possible, and describe how to do that.

Without DEVT_FASCIST I belive this patch is a no-op.

Stylistic/posixoid comments about the userland view of the <sys/*.h>
files welcome now, from userland they now contain the end result.

Next planned step: make all dev_t's refer to the same devsw[] which
means convert BLK's to CHR's at the perimeter of the vnodes and
other places where they enter the game (bootdev, mknod, sysctl).

Revision 1.128: download - view: text, markup, annotated - select for diffs
Thu May 6 20:00:30 1999 UTC (12 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +6 -5 lines
remove b_proc from struct buf, it's (now) unused.

Reviewed by:	dillon, bde

Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu May 6 18:13:05 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +3 -2 lines
Add sufficient braces to keep egcs happy about potentially ambiguous
if/else nesting.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Mon May 3 20:59:14 1999 UTC (12 years, 9 months ago) by alc
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +3 -3 lines
All directory accesses must be made with NFS_DIRBLKSIZE chunks to avoid
confusing the directory read cookie cache.  The nfs_access implementation
for v2 mounts attempts to read from the directory if root is the user
so that root can't access cached files when the server remaps root
to some other user.

Submitted by:	Doug Rabson <dfr@nlsystems.com>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>

Revision 1.125: download - view: text, markup, annotated - select for diffs
Sun May 2 23:56:26 1999 UTC (12 years, 9 months ago) by alc
Branches: MAIN
CVS tags: POST_VFS_BIO_NFS_PATCH
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +19 -19 lines
The VFS/BIO subsystem contained a number of hacks in order to optimize
piecemeal, middle-of-file writes for NFS.  These hacks have caused no
end of trouble, especially when combined with mmap().  I've removed
them.  Instead, NFS will issue a read-before-write to fully
instantiate the struct buf containing the write.  NFS does, however,
optimize piecemeal appends to files.  For most common file operations,
you will not notice the difference.  The sole remaining fragment in
the VFS/BIO system is b_dirtyoff/end, which NFS uses to avoid cache
coherency issues with read-merge-write style operations.  NFS also
optimizes the write-covers-entire-buffer case by avoiding the
read-before-write.  There is quite a bit of room for further
optimization in these areas.

The VM system marks pages fully-valid (AKA vm_page_t->valid =
VM_PAGE_BITS_ALL) in several places, most noteably in vm_fault.  This
is not correct operation.  The vm_pager_get_pages() code is now
responsible for marking VM pages all-valid.  A number of VM helper
routines have been added to aid in zeroing-out the invalid portions of
a VM page prior to the page being marked all-valid.  This operation is
necessary to properly support mmap().  The zeroing occurs most often
when dealing with file-EOF situations.  Several bugs have been fixed
in the NFS subsystem, including bits handling file and directory EOF
situations and buf->b_flags consistancy issues relating to clearing
B_ERROR & B_INVAL, and handling B_DONE.

getblk() and allocbuf() have been rewritten.  B_CACHE operation is now
formally defined in comments and more straightforward in
implementation.  B_CACHE for VMIO buffers is based on the validity of
the backing store.  B_CACHE for non-VMIO buffers is based simply on
whether the buffer is B_INVAL or not (B_CACHE set if B_INVAL clear,
and vise-versa).  biodone() is now responsible for setting B_CACHE
when a successful read completes.  B_CACHE is also set when a bdwrite()
is initiated and when a bwrite() is initiated.  VFS VOP_BWRITE
routines (there are only two - nfs_bwrite() and bwrite()) are now
expected to set B_CACHE.  This means that bowrite() and bawrite() also
set B_CACHE indirectly.

There are a number of places in the code which were previously using
buf->b_bufsize (which is DEV_BSIZE aligned) when they should have
been using buf->b_bcount.  These have been fixed.  getblk() now clears
B_DONE on return because the rest of the system is so bad about
dealing with B_DONE.

Major fixes to NFS/TCP have been made.  A server-side bug could cause
requests to be lost by the server due to nfs_realign() overwriting
other rpc's in the same TCP mbuf chain.  The server's kernel must be
recompiled to get the benefit of the fixes.

Submitted by:	Matthew Dillon <dillon@apollo.backplane.com>

Revision 1.124: download - view: text, markup, annotated - select for diffs
Fri Mar 12 02:24:58 1999 UTC (12 years, 11 months ago) by julian
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, PRE_NEWBUS, POST_SMP_VMSHARE, POST_NEWBUS, POST_MAT_GETBUF
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +51 -30 lines
Reviewed by: Many at differnt times in differnt parts,
		including alan, john, me, luoqi, and kirk
Submitted by:	Matt Dillon <dillon@frebsd.org>

This change implements a relatively sophisticated fix to getnewbuf().
There were two problems with getnewbuf(). First, the writerecursion
can lead to a system stack overflow when you have NFS and/or VN
devices in the system. Second, the free/dirty buffer accounting was
completely broken. Not only did the nfs routines blow it trying to
manually account for the buffer state, but the accounting that was
done did not work well with the purpose of their existance: figuring
out when getnewbuf() needs to sleep.

The meat of the change is to kern/vfs_bio.c. The remaining diffs are
all minor except for NFS, which includes both the fixes for bp
interaction AND fixes for a 'biodone(): buffer already done' lockup.
Sys/buf.h also contains a chaining structure which is not used by
this patchset but is used by other patches that are coming soon.
This patch deliniated by tags PRE_MAT_GETBUF and POST_MAT_GETBUF.
(sorry for the missing T matt)

Revision 1.123: download - view: text, markup, annotated - select for diffs
Tue Feb 16 10:49:54 1999 UTC (12 years, 11 months ago) by dfr
Branches: MAIN
CVS tags: PRE_MAT_GETBUF
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +3 -1 lines
* Change sysctl from using linker_set to construct its tree using SLISTs.
  This makes it possible to change the sysctl tree at runtime.

* Change KLD to find and register any sysctl nodes contained in the loaded
  file and to unregister them when the file is unloaded.

Reviewed by: Archie Cobbs <archie@whistle.com>,
	Peter Wemm <peter@netplex.com.au> (well they looked at it anyway)

Revision 1.122: download - view: text, markup, annotated - select for diffs
Sat Feb 13 09:47:30 1999 UTC (12 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +13 -4 lines
    General additional cleanup of VOP API for NFS ops - mainly NFS ignoring
    the API for freeing up cnp's.  This cleanup should not effect nominal
    operation one way or the other since NFS VOPs just happen to be called
    with flags that match what it actually does to the NAMEI components it
    gets.  Still, if an NFS error occured, there was probably some memory
    leakage of NAMEI components with certain NFS VOP ops.

Revision 1.116.2.3: download - view: text, markup, annotated - select for diffs
Sat Feb 13 08:03:47 1999 UTC (12 years, 11 months ago) by dillon
Branches: RELENG_3
CVS tags: RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE, RELENG_3_1_0_RELEASE
Diff to: previous 1.116.2.2: preferred, colored; branchpoint 1.116: preferred, colored
Changes since revision 1.116.2.2: +1 -2 lines
PR:		kern/9970

    Backport from -4.x, remove illegal vput from nfs_link().

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sat Feb 13 08:01:59 1999 UTC (12 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +1 -2 lines
PR:		kern/9970

    Remove incorrect vput() in nfs_link()

Revision 1.116.2.2: download - view: text, markup, annotated - select for diffs
Mon Feb 8 18:27:30 1999 UTC (13 years ago) by dillon
Branches: RELENG_3
Diff to: previous 1.116.2.1: preferred, colored; branchpoint 1.116: preferred, colored
Changes since revision 1.116.2.1: +14 -1 lines
    Backport from -4.x.  Flush delayed-write data associated with nfs vnode
    prior to rename operation.  This is a workaround to an NFS-V3 bug whereby
    the delayed-write data becomes stale after the rename.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Sat Feb 6 07:48:56 1999 UTC (13 years ago) by dillon
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +14 -1 lines
    Flush delayed-write data out prior to issuing a rename rpc.  This appears
    to fix the problem w/ NFSV3 whereby a make installworld would get into
    high-network-bandwidth situations continuously trying to retry nfs writes
    that fail with a 'stale file handle' error.

Revision 1.36.2.10: download - view: text, markup, annotated - select for diffs
Thu Jan 28 06:14:22 1999 UTC (13 years ago) by msmith
Branches: RELENG_2_2
Diff to: previous 1.36.2.9: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.9: +2 -2 lines
MFC: (a == b) conditional was (a = b)

Revision 1.116.2.1: download - view: text, markup, annotated - select for diffs
Thu Jan 28 06:13:27 1999 UTC (13 years ago) by msmith
Branches: RELENG_3
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +2 -2 lines
MFC: (a == b) conditional was (a = b)

Revision 1.119: download - view: text, markup, annotated - select for diffs
Wed Jan 27 22:45:49 1999 UTC (13 years ago) by dillon
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +2 -2 lines
    Fix nasty bug in nfs_access().  A conditional was if (a = b) instead of
    if (a == b).

Revision 1.118: download - view: text, markup, annotated - select for diffs
Wed Jan 27 22:45:13 1999 UTC (13 years ago) by dillon
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +6 -6 lines
    Fix warnings in preparation for adding -Wall -Wcast-qual to the
    kernel compile

Revision 1.117: download - view: text, markup, annotated - select for diffs
Thu Jan 21 08:29:07 1999 UTC (13 years ago) by dillon
Branches: MAIN
CVS tags: POST_MATT_SWAPPER
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +4 -1 lines
    This is a rather large commit that encompasses the new swapper,
    changes to the VM system to support the new swapper, VM bug
    fixes, several VM optimizations, and some additional revamping of the
    VM code.  The specific bug fixes will be documented with additional
    forced commits.  This commit is somewhat rough in regards to code
    cleanup issues.

Reviewed by:	"John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>

Revision 1.116: download - view: text, markup, annotated - select for diffs
Tue Jan 12 12:39:14 1999 UTC (13 years, 1 month ago) by eivind
Branches: MAIN
CVS tags: RELENG_3_BP, PRE_MATT_SWAPPER
Branch point for: RELENG_3
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +1 -3 lines
Remove two cases of unused variable sp3.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Fri Dec 25 10:34:27 1998 UTC (13 years, 1 month ago) by dfr
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +15 -79 lines
Fix for creating files on a Solaris 7 server with NFSv3 (the request was
slightly garbled but older servers seemed to understand it).

Reviewed by: David O'Brien <obrien@nuxi.ucdavis.edu>

Revision 1.36.2.9: download - view: text, markup, annotated - select for diffs
Wed Nov 25 22:09:40 1998 UTC (13 years, 2 months ago) by msmith
Branches: RELENG_2_2
CVS tags: RELENG_2_2_8_RELEASE
Diff to: previous 1.36.2.8: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.8: +3 -3 lines
Stamp out some time_second usages that snuck through.

Revision 1.36.2.8: download - view: text, markup, annotated - select for diffs
Wed Nov 25 21:48:48 1998 UTC (13 years, 2 months ago) by msmith
Branches: RELENG_2_2
Diff to: previous 1.36.2.7: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.7: +89 -22 lines
Bring the NFS ACCESS acclerator back from -current.  Note that on this
branch it defaults to OFF, requiring an explicit poke to turn it on.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Sun Nov 15 20:36:16 1998 UTC (13 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +12 -42 lines
Reimplement the NFS ACCESS RPC cache as an "accelerator" rather than a true
cache.  If the cached result lets us say "yes", then go with that.  If
we're not sure, or we think the answer might be "no", go to the wire to be
certain.    This avoids all of the possible false veto cases, and allows us
to key the cached value with just the UID for which the cached value holds,
reducing the bloat of the nfsnode structure from 104 bytes to just 12 bytes.

Since the "yes" case is by far the most common, this should still provide
a substantial performance improvement.  Also default the cache to on, with
a conservative timeout (2 seconds).  This improves performance if NFS is
loaded as a KLD module, as there's not (yet) code to parse an option out
of the module arguments to set it, and sysctl doesn't work (yet) for OIDs
in modules.

The 'accelerator' mode was suggested by Bjoern Groenvall (bg@sics.se)

Feedback on this would be appreciated as testing has been necessarily
limited by Comdex, and it would be valuable to have this in 2.2.8.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Fri Nov 13 22:58:48 1998 UTC (13 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +10 -7 lines
Avoid a null pointer reference if the target of an NFS rename has been
sillrenamed, or if the source vnode doesn't have an associated nfsnode.

Bug report from Andrew Gallatin <gallatin@cs.duke.edu>

Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Nov 13 02:39:09 1998 UTC (13 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +94 -23 lines
Implement NFS ACCESS RPC result caching.

This yields startling performance increases for NFS clients for many
access profiles, due to the fact that ACCESS results are persistently
cached in the namecache in many cases.

Note that the code is somewhat conservative in that it requires an
exact credential match for a cache hit.  This bloats the nfsnode
structure by sizeof(struct ucred) (96 bytes).  Any less conservative
approach opens the possibility for a false veto in eg. setuid
applications.  Alternative suggestions would be welcomed.

The cache is normally disabled, to activate set the sysctl variable
vfs.nfs.access_cache_timeout to a nonzero value.  This is the time in
seconds that a cached entry will be considered valid; useful values appear
to be 2-10 seconds.  Performance of the cache can be monitored with the
vfs.nfs.access_cache_hits and vfs.nfs.access_cache_hits variables.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Mon Nov 9 07:00:14 1998 UTC (13 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +4 -4 lines
Remove [apparently] bogus casts to u_long for the vnode_pager_setsize()
second argument.  np_size is a 64 bit int, so is the second arg.  This
might have caused needless 2G/4G file size problems.

I believe it was Bruce who queried this.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Sat Oct 31 15:31:26 1998 UTC (13 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +8 -8 lines
Use TAILQ macros for clean/dirty block list processing.  Set b_xflags
rather than abusing the list next pointer with a magic number.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Tue Sep 29 23:39:37 1998 UTC (13 years, 4 months ago) by mckusick
Branches: MAIN
CVS tags: RELENG_3_0_0_RELEASE
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -2 lines
In nfs_link(), check for a cross-device mount *before* looking
in the v_data field.
Obtained from: Charles Hannum, via Frank van der Linden <frank@wins.uva.nl>

Revision 1.108: download - view: text, markup, annotated - select for diffs
Tue Sep 29 23:29:48 1998 UTC (13 years, 4 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +1 -0 lines
Missing vput when cross-device link error is detected in nfs_link.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Tue Sep 29 23:28:32 1998 UTC (13 years, 4 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +5 -3 lines
During truncation, have to notify the VM about the new size
of the NFS file *before* doing the nfs_vinvalbuf operation.
Otherwise some invalid data may show up in an mmap.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Thu Aug 13 08:09:08 1998 UTC (13 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +2 -2 lines
Protect all modifications to v_numoutput with splbio().

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sat Jul 4 20:45:37 1998 UTC (13 years, 7 months ago) by julian
Branches: MAIN
CVS tags: PRE_NOBDEV
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +2 -2 lines
VOP_STRATEGY grows an (struct vnode *) argument
as the value in b_vp is often not really what you want.
(and needs to be frobbed). more cleanups will follow this.
Reviewed by: Bruce Evans <bde@freebsd.org>

Revision 1.104: download - view: text, markup, annotated - select for diffs
Mon Jun 1 10:59:23 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -2 lines
readlink() returns EINVAL rather than EPERM if called on a non-symlink.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sun May 31 20:08:56 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +102 -96 lines
For the on-the-wire protocol, u_long -> u_int32_t;  long -> int32_t;
int -> int32_t; u_short -> u_int16_t.  Also, use mode_t instead of u_short
for storing modes (mode_t is a u_int16_t).

Obtained from: NetBSD

Revision 1.102: download - view: text, markup, annotated - select for diffs
Sun May 31 19:29:28 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +2 -2 lines
xdr encode -1 properly.

Obtained from: NetBSD

Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun May 31 19:28:15 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +11 -4 lines
Fully fill in nfsv2 write rpc requests rather than leaving garbage.

Obtained from: NetBSD

Revision 1.100: download - view: text, markup, annotated - select for diffs
Sun May 31 19:24:19 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +8 -1 lines
Don't silently fail to set file flags.

Obtained from:  NetBSD

Revision 1.99: download - view: text, markup, annotated - select for diffs
Sun May 31 19:00:18 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +19 -19 lines
Don't pass a second copy of the uid/gid in with the v2/v3 sattr structures,
it just makes more work.  We pass a copy of the uid/gid with the
credentials.  (although, this may need to be revisited if a non AUTHUNIX
authentication method (such as NFSKERB) ever gets implemented).

Obtained from:  NetBSD

Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun May 31 18:30:42 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +3 -1 lines
Don't let the user try "rmdir ."

Obtained from:  NetBSD

Revision 1.97: download - view: text, markup, annotated - select for diffs
Sun May 31 18:28:45 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +4 -2 lines
Don't let the user try and unlink() a directory on a NFS server.

Obtained from:  NetBSD

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun May 31 18:27:07 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -1 lines
When a write rpc returns an error, break the loop.

Obtained from: NetBSD

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun May 31 18:25:32 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +2 -1 lines
Don't leak an mbuf when a write rpc returns zero bytes written.

Obtained from: NetBSD

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun May 31 18:23:24 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +3 -1 lines
#ifdef a diagnostic printf

Obtained from:  NetBSD

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun May 31 17:48:05 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +11 -9 lines
Some const's

Obtained from: NetBSD

Revision 1.92: download - view: text, markup, annotated - select for diffs
Sun May 31 17:27:55 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +40 -28 lines
NFS Jumbo commit part 1.  Cosmetic and structural changes only.  The aim
of this part of commits is to minimize unnecessary differences between
the other NFS's of similar origin.  Yes, there are gratuitous changes here
that the style folks won't like, but it makes the catch-up less difficult.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun May 31 01:03:07 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +2 -2 lines
VOP_ABORTUP() appears to be called with the wrong vnode.  The other callers
that I checked (eg: ufs_link()) do the ABORTOP on the directory rather than
the file itself.  After Michael Hancock's patches, the abortop doesn't seem
all that critial now since something else will free the pathname buffer.

Revision 1.36.2.7: download - view: text, markup, annotated - select for diffs
Sun May 31 00:07:29 1998 UTC (13 years, 8 months ago) by peter
Branches: RELENG_2_2
CVS tags: RELENG_2_2_7_RELEASE
Diff to: previous 1.36.2.6: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.6: +3 -15 lines
Back out of a cross device link a little better.
Remove a #ifdef __NetBSD__ that was in the way.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sat May 30 16:33:57 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -3 lines
When using NFSv3, use the remote server's idea of the maximum file size
rather than assuming 2^64.  It may not like files that big. :-)
On the nfs server, calculate and report the max file size as the point
that the block numbers in the cache would turn negative.
(ie: 1099511627775 bytes (1TB)).

One of the things I'm worried about however, is that directory offsets
are really cookies on a NFSv3 server and can be rather large, especially
when/if the server generates the opaque directory cookies by using a local
filesystem offset in what comes out as the upper 32 bits of the 64 bit
cookie.  (a server is free to do this, it could save byte swapping
depending on the native 64 bit byte order)

Obtained from:	NetBSD

Revision 1.89: download - view: text, markup, annotated - select for diffs
Tue May 19 07:11:26 1998 UTC (13 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +5 -4 lines
Allow control of the attribute cache timeouts at mount time.

We had run out of bits in the nfs mount flags, I have moved the internal
state flags into a seperate variable.  These are no longer visible via
statfs(), but I don't know of anything that looks at them.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sat May 16 16:20:50 1998 UTC (13 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +11 -27 lines
Get timespecs directly instead of via timevals.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sat May 16 16:03:10 1998 UTC (13 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +2 -2 lines
Don't abuse `+' to combine flags.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Sat May 16 15:21:29 1998 UTC (13 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +7 -13 lines
Backed out rev.1.76.  It just added style bugs.

Revision 1.36.2.6: download - view: text, markup, annotated - select for diffs
Wed May 13 05:48:45 1998 UTC (13 years, 9 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.36.2.5: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.5: +2 -2 lines
MFC: rev 1.85; initialize *vpp earlier for -o ro nfs mounts.

PR: 1856
Submitted by: msaitoh@spa.is.uec.ac.jp

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed May 13 05:47:09 1998 UTC (13 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +2 -2 lines
Move the *vpp initialization earlier so that it's set in all error cases.
This should stop the 'panic: leaf should not be empty' nfs panic.

PR: 1856
Submitted by: msaitoh@spa.is.uec.ac.jp

Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu May 7 04:58:53 1998 UTC (13 years, 9 months ago) by msmith
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +1 -21 lines
In the words of the submitter:

---------
Make callers of namei() responsible for releasing references or locks
instead of having the underlying filesystems do it.  This eliminates
redundancy in all terminal filesystems and makes it possible for stacked
transport layers such as umapfs or nullfs to operate correctly.

Quality testing was done with testvn, and lat_fs from the lmbench suite.

Some NFS client testing courtesy of Patrik Kudo.

vop_mknod and vop_symlink still release the returned vpp.  vop_rename
still releases 4 vnode arguments before it returns.  These remaining cases
will be corrected in the next set of patches.
---------

Submitted by:	Michael Hancock <michaelh@cet.co.jp>

Revision 1.83: download - view: text, markup, annotated - select for diffs
Mon Mar 30 09:54:32 1998 UTC (13 years, 10 months ago) by phk
Branches: MAIN
CVS tags: PRE_DEVFS_SLICE, POST_DEVFS_SLICE
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +8 -8 lines
Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.

Most uses of time.tv_sec now uses the new variable time_second instead.

gettime() changed to getmicrotime(0.

Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).

A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.

Add a new nfs_curusec() function.

Mark a couple of bogosities involving the now disappeard time variable.

Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.

Change profiling in ncr.c to use ticks instead of time.  Resolution is
the same.

Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.

Reviewed by:	bde

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sat Mar 28 12:04:40 1998 UTC (13 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +2 -1 lines
Don't depend on <sys/mount.h> including <sys/socket.h>.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Mar 8 09:57:57 1998 UTC (13 years, 11 months ago) by julian
Branches: MAIN
CVS tags: POST_SOFTUPDATE
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +8 -1 lines
Reviewed by:	dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by:	Kirk McKusick (mcKusick@mckusick.com)
Obtained from:  WHistle development tree

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Mar 7 21:36:06 1998 UTC (13 years, 11 months ago) by dyson
Branches: MAIN
CVS tags: PRE_SOFTUPDATE
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +5 -1 lines
This mega-commit is meant to fix numerous interrelated problems.  There
has been some bitrot and incorrect assumptions in the vfs_bio code.  These
problems have manifest themselves worse on NFS type filesystems, but can
still affect local filesystems under certain circumstances.  Most of
the problems have involved mmap consistancy, and as a side-effect broke
the vfs.ioopt code.  This code might have been committed seperately, but
almost everything is interrelated.

1)	Allow (pmap_object_init_pt) prefaulting of buffer-busy pages that
	are fully valid.
2)	Rather than deactivating erroneously read initial (header) pages in
	kern_exec, we now free them.
3)	Fix the rundown of non-VMIO buffers that are in an inconsistent
	(missing vp) state.
4)	Fix the disassociation of pages from buffers in brelse.  The previous
	code had rotted and was faulty in a couple of important circumstances.
5)	Remove a gratuitious buffer wakeup in vfs_vmio_release.
6)	Remove a crufty and currently unused cluster mechanism for VBLK
	files in vfs_bio_awrite.  When the code is functional, I'll add back
	a cleaner version.
7)	The page busy count wakeups assocated with the buffer cache usage were
	incorrectly cleaned up in a previous commit by me.  Revert to the
	original, correct version, but with a cleaner implementation.
8)	The cluster read code now tries to keep data associated with buffers
	more aggressively (without breaking the heuristics) when it is presumed
	that the read data (buffers) will be soon needed.
9)	Change to filesystem lockmgr locks so that they use LK_NOPAUSE.  The
	delay loop waiting is not useful for filesystem locks, due to the
	length of the time intervals.
10)	Correct and clean-up spec_getpages.
11)	Implement a fully functional nfs_getpages, nfs_putpages.
12)	Fix nfs_write so that modifications are coherent with the NFS data on
	the server disk (at least as well as NFS seems to allow.)
13)	Properly support MS_INVALIDATE on NFS.
14)	Properly pass down MS_INVALIDATE to lower levels of the VM code from
	vm_map_clean.
15)	Better support the notion of pages being busy but valid, so that
	fewer in-transit waits occur.  (use p->busy more for pageouts instead
	of PG_BUSY.)  Since the page is fully valid, it is still usable for
	reads.
16)	It is possible (in error) for cached pages to be busy.  Make the
	page allocation code handle that case correctly.  (It should probably
	be a printf or panic, but I want the system to handle coding errors
	robustly.  I'll probably add a printf.)
17)	Correct the design and usage of vm_page_sleep.  It didn't handle
	consistancy problems very well, so make the design a little less
	lofty.  After vm_page_sleep, if it ever blocked, it is still important
	to relookup the page (if the object generation count changed), and
	verify it's status (always.)
18)	In vm_pageout.c, vm_pageout_clean had rotted, so clean that up.
19)	Push the page busy for writes and VM_PROT_READ into vm_pageout_flush.
20)	Fix vm_pager_put_pages and it's descendents to support an int flag
	instead of a boolean, so that we can pass down the invalidate bit.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Fri Mar 6 09:46:48 1998 UTC (13 years, 11 months ago) by msmith
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +2 -1 lines
Trivial filesystem getpages/putpages implementations, set the second.
These should be considered the first steps in a work-in-progress.
Submitted by:	Terry Lambert <terry@freebsd.org>

Revision 1.78: download - view: text, markup, annotated - select for diffs
Fri Feb 6 12:13:58 1998 UTC (14 years ago) by eivind
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +1 -2 lines
Back out DIAGNOSTIC changes.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Feb 4 22:33:17 1998 UTC (14 years ago) by eivind
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -1 lines
Turn DIAGNOSTIC into a new-style option.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Jan 25 06:14:26 1998 UTC (14 years ago) by dyson
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +13 -7 lines
Various NFS fixes:
	Make vfs_bio buffer mgmt work better.
	Buffers were being used after brelse.
	Make nfs_getpages work independently of other NFS
		interfaces.  This eliminates some difficult
		recursion problems and decreases pagefault
		overhead.
	Remove an erroneous vfs_unbusy_pages.
	Fix a reentrancy problem, with nfs_vinvalbuf when
		vnode is already being rundown.
	Reassignbuf wasn't being called when needed under
		certain circumstances.

	(Thanks for help from Bill Paul.)

Revision 1.75: download - view: text, markup, annotated - select for diffs
Thu Jan 8 23:42:03 1998 UTC (14 years, 1 month ago) by eivind
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +5 -1 lines
Make INET a proper option.

This will not make any of object files that LINT create change; there
might be differences with INET disabled, but hardly anything compiled
before without INET anyway.  Now the 'obvious' things will give a
proper error if compiled without inet - ipx_ip, ipfw, tcp_debug.  The
only thing that _should_ work (but can't be made to compile reasonably
easily) is sppp :-(

This commit move struct arpcom from <netinet/if_ether.h> to
<net/if_arp.h>.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Mon Dec 29 00:23:41 1997 UTC (14 years, 1 month ago) by dyson
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +1 -2 lines
Lots of improvements, including restructring the caching and management
of vnodes and objects.  There are some metadata performance improvements
that come along with this.  There are also a few prototypes added when
the need is noticed.  Changes include:

1) Cleaning up vref, vget.
2) Removal of the object cache.
3) Nuke vnode_pager_uncache and friends, because they aren't needed anymore.
4) Correct some missing LK_RETRY's in vn_lock.
5) Correct the page range in the code for msync.

Be gentle, and please give me feedback asap.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Dec 27 02:56:36 1997 UTC (14 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -1 lines
Unspammed nested include of <vm/vm_zone.h>.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Nov 7 09:20:48 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +5 -5 lines
Rename some local variables to avoid shadowing other local variables.

Found by: -Wshadow

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Oct 27 13:33:44 1997 UTC (14 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +1 -4 lines
Removed unused #includes.  The need for most of them went away with
recent changes (docluster* and vfs improvements).

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Oct 26 20:55:31 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +3 -3 lines
VFS interior redecoration.

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.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Oct 16 22:00:51 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +5 -11 lines
VFS clean up "hekto commit"

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.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu Oct 16 20:32:32 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +1 -37 lines
Another VFS cleanup "kilo commit"

1.  Remove VOP_UPDATE, it is (also) an UFS/{FFS,LFS,EXT2FS,MFS}
    intereface function, and now lives in the ufsmount structure.

2.  Remove VOP_SEEK, it was unused.

3.  Add mode default vops:

    VOP_ADVLOCK          vop_einval
    VOP_CLOSE            vop_null
    VOP_FSYNC            vop_null
    VOP_IOCTL            vop_enotty
    VOP_MMAP             vop_einval
    VOP_OPEN             vop_null
    VOP_PATHCONF         vop_einval
    VOP_READLINK         vop_einval
    VOP_REALLOCBLKS      vop_eopnotsupp

    And remove identical functionality from filesystems

4.   Add vop_stdpathconf, which returns the canonical stuff.  Use
     it in the filesystems.  (XXX: It's probably wrong that specfs
     and fifofs sets this vop, shouldn't it come from the "host"
     filesystem, for instance ufs or cd9660 ?)

5.   Try to make system wide VOP functions have vop_* names.

6.   Initialize the um_* vectors in LFS.

(Recompile your LKMS!!!)

Revision 1.67: download - view: text, markup, annotated - select for diffs
Thu Oct 16 10:49:01 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +12 -15 lines
VFS mega cleanup commit (x/N)

1.  Add new file "sys/kern/vfs_default.c" where default actions for
    VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE,
    POLL, REVOKE and STRATEGY.  Various stuff spread over the entire
    tree belongs here.

2.  Change VOP_BLKATOFF to a normal function in cd9660.

3.  Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC.  These
    are private interface functions between UFS and the underlying
    storage manager layer (FFS/LFS/MFS/EXT2FS).  The functions now
    live in struct ufsmount instead.

4.  Remove a kludge of VOP_ functions in all filesystems, that did
    nothing but obscure the simplicity and break the expandability.
    If a filesystem doesn't implement VOP_FOO, it shouldn't have an
    entry for it in its vnops table.  The system will try to DTRT
    if it is not implemented.  There are still some cruft left, but
    the bulk of it is done.

5.  Fix another VCALL in vfs_cache.c (thanks Bruce!)

Revision 1.66: download - view: text, markup, annotated - select for diffs
Wed Oct 15 13:23:35 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -49 lines
vnops megacommit

1.  Use the default function to access all the specfs operations.
2.  Use the default function to access all the fifofs operations.
3.  Use the default function to access all the ufs operations.
4.  Fix VCALL usage in vfs_cache.c
5.  Use VOCALL to access specfs functions in devfs_vnops.c
6.  Staticize most of the spec and fifofs vnops functions.
7.  Make UFS panic if it lacks bits of the underlying storage handling.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Oct 15 10:05:10 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +17 -17 lines
Hmm, realign the vnops into two columns.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Wed Oct 15 09:21:45 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +116 -126 lines
Stylistic overhaul of vnops tables.
        1. Remove comment stating the blatantly obvious.
        2. Align in two columns.
        3. Sort all but the default element alphabetically.
        4. Remove XXX comments pointing out entries not needed.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Wed Oct 15 07:42:31 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +1 -113 lines
When the default vnops funtion is vn_default_error(), there is no reason to
implement small functions that just return EOPNOTSUPP for things we don't do.

The removed functions only apply to UFS based filesystems anyway.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Oct 5 12:28:59 1997 UTC (14 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +60 -7 lines
Reverse rev 1.56 and rev 1.59.  These made NFS too flakey.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Sep 21 04:23:53 1997 UTC (14 years, 4 months ago) by dyson
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +8 -8 lines
Change the M_NAMEI allocations to use the zone allocator.  This change
plus the previous changes to use the zone allocator decrease the useage
of malloc by half.  The Zone allocator will be upgradeable to be able
to use per CPU-pools, and has more intelligent usage of SPLs.  Additionally,
it has reasonable stats gathering capabilities, while making most calls
inline.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Sep 14 03:00:44 1997 UTC (14 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +18 -19 lines
select -> poll
flag missing vnode op table entries

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Sep 10 21:27:40 1997 UTC (14 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +3 -8 lines
Don't repeat checks done at general level.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Sep 10 20:22:32 1997 UTC (14 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +1 -10 lines
Remove a couple of stubborn NetBSD #if's.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Sep 10 19:52:27 1997 UTC (14 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +1 -11 lines
unifdef -U__NetBSD__ -D__FreeBSD__

Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Aug 26 07:32:43 1997 UTC (14 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +5 -53 lines
Uncut&paste cache_lookup().

This unifies several times in theory indentical 50 lines of code.

The filesystems have a new method: vop_cachedlookup, which is the
meat of the lookup, and use vfs_cache_lookup() for their vop_lookup
method.  vfs_cache_lookup() will check the namecache and pass on
to the vop_cachedlookup method in case of a miss.

It's still the task of the individual filesystems to populate the
namecache with cache_enter().

Filesystems that do not use the namecache will just provide the
vop_lookup method as usual.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Wed Jun 25 08:32:33 1997 UTC (14 years, 7 months ago) by dfr
Branches: MAIN
CVS tags: WOLLMAN_MBUF, BP_WOLLMAN_MBUF
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +8 -4 lines
Make nfs_lookup return a NULLVP on error so that DIAGNOSTIC kernels don't
panic.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Jun 16 00:23:40 1997 UTC (14 years, 7 months ago) by dyson
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +12 -1 lines
Upgrade NFS to support the new vfs_bio resource/buffer management.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Jun 3 13:56:55 1997 UTC (14 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -1 lines
Implement the async mount option for NFSv3.  This makes NFS pretend that all
writes sent to the server were synchronous and therefore no commits are
needed.  This is the same as the vfs.nfs.async variable on the server but
allows each client to choose whether to work this way.

Also make the vfs.nfs.async variable do the 'right' thing for NFSv3, i.e.
pretend that the write was synchronous.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Jun 3 10:03:40 1997 UTC (14 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +50 -8 lines
Fix a problem with nfs_flush where if many B_NEEDCOMMIT buffers are
attached to the vnode, some of them could be re-written synchronously
(if they overflowed the fixed size array nfs_flush had for them).  The
fix involves mallocing an array if there are more than its limited
size stack buffer.

Reviewed by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>

Revision 1.36.2.5: download - view: text, markup, annotated - select for diffs
Wed May 28 18:26:45 1997 UTC (14 years, 8 months ago) by dfr
Branches: RELENG_2_2
CVS tags: RELENG_2_2_6_RELEASE, RELENG_2_2_5_RELEASE
Diff to: previous 1.36.2.4: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.4: +6 -5 lines
YAMFC (NFS mmap fixes and minor memory leak plugged)

Reviewed by:	Randy Terbush <randy@zyzzyva.com>

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue May 20 08:06:31 1997 UTC (14 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
Plug a memory leak in nfs_link.

PR:		kern/1001

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon May 19 14:36:50 1997 UTC (14 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +5 -4 lines
Fix a few bugs with NFS and mmap caused by NFS' use of b_validoff
and b_validend.  The changes to vfs_bio.c are a bit ugly but hopefully
can be tidied up later by a slight redesign.

PR:		kern/2573, kern/2754, kern/3046 (possibly)
Reviewed by:	dyson

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sat May 17 18:32:52 1997 UTC (14 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +1 -7 lines
Remove redundant check for vp == dvp (done in VFS before calling).

Revision 1.36.2.4: download - view: text, markup, annotated - select for diffs
Wed May 14 08:19:30 1997 UTC (14 years, 9 months ago) by dfr
Branches: RELENG_2_2
CVS tags: RELENG_2_2_2_RELEASE
Diff to: previous 1.36.2.3: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.3: +48 -3 lines
YAMFC.  NFS fixes, make NFSv3 the default, some other fs fixes.

Reviewed by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri May 9 13:18:42 1997 UTC (14 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +47 -3 lines
Prevent a mapped root which appears on the server as e.g. nobody from
accessing files which it shouldn't be able to.  This required a better
approximation of VOP_ACCESS for NFSv2 (NFSv3 already has an ACCESS rpc
which is a better solution) and adding a call to VOP_ACCESS from VOP_LOOKUP.

PR:		kern/876, kern/2635
Submitted by:	David Malone <dwmalone@maths.tcd.ie> (for kern/2635)

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun May 4 09:17:36 1997 UTC (14 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -3 lines
1.  Add a {pointer, v_id} pair to the vnode to store the reference to the
    ".." vnode.  This is cheaper storagewise than keeping it in the
    namecache, and it makes more sense since it's a 1:1 mapping.

2.  Also handle the case of "." more intelligently rather than stuff
    the namecache with pointless entries.

3.  Add two lists to the vnode and hang namecache entries which go from
    or to this vnode.  When cleaning a vnode, delete all namecache
    entries it invalidates.

4.  Never reuse namecache enties, malloc new ones when we need it, free
    old ones when they die.  No longer a hard limit on how many we can
    have.

5.  Remove the upper limit on namelength of namecache entries.

6.  Make a global list for negative namecache entries, limit their number
    to a sysctl'able (debug.ncnegfactor) fraction of the total namecache.
    Currently the default fraction is 1/16th.  (Suggestions for better
    default wanted!)

7.  Assign v_id correctly in the face of 32bit rollover.

8.  Remove the LRU list for namecache entries, not needed.  Remove the
    #ifdef NCH_STATISTICS stuff, it's not needed either.

9.  Use the vnode freelist as a true LRU list, also for namecache accesses.

10. Reuse vnodes more aggresively but also more selectively, if we can't
    reuse, malloc a new one.  There is no longer a hard limit on their
    number, they grow to the point where we don't reuse potentially
    usable vnodes.  A vnode will not get recycled if still has pages in
    core or if it is the source of namecache entries (Yes, this does
    indeed work :-)  "." and ".." are not namecache entries any longer...)

11. Do not overload the v_id field in namecache entries with whiteout
    information, use a char sized flags field instead, so we can get
    rid of the vpid and v_id fields from the namecache struct.  Since
    we're linked to the vnodes and purged when they're cleaned, we don't
    have to check the v_id any more.

12. NFS knew about the limitation on name length in the namecache, it
    shouldn't and doesn't now.

Bugs:
        The namecache statistics no longer includes the hits for ".."
        and "." hits.

Performance impact:
        Generally in the +/- 0.5% for "normal" workstations, but
        I hope this will allow the system to be selftuning over a
        bigger range of "special" applications.  The case where
        RAM is available but unused for cache because we don't have
        any vnodes should be gone.

Future work:
        Straighten out the namecache statistics.

        "desiredvnodes" is still used to (bogusly ?) size hash
        tables in the filesystems.

        I have still to find a way to safely free unused vnodes
        back so their number can shrink when not needed.

        There is a few uses of the v_id field left in the filesystems,
        scheduled for demolition at a later time.

        Maybe a one slot cache for unused namecache entries should
        be implemented to decrease the malloc/free frequency.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Apr 4 17:49:33 1997 UTC (14 years, 10 months ago) by dfr
Branches: MAIN
CVS tags: pre_smp_merge, post_smp_merge
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines
Fix various bugs in the locking protocol, allowing proper shared locks
to be used.  This should fix the lock panics that people are seeing.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Mar 29 12:40:20 1997 UTC (14 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +1 -2 lines
Removed #include of <ufs/ufs/dir.h>.  Nfs no longer depends on any ufs
features, and the one thing that it depended on (DIRBLKSIZ) now has
conflicting spelling.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Mar 22 06:53:12 1997 UTC (14 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +23 -13 lines
Fixed some invalid (non-atomic) accesses to `time', mostly ones of the
form `tv = time'.  Use a new function gettime().  The current version
just forces atomicicity without fixing precision or efficiency bugs.
Simplified some related valid accesses by using the central function.

Revision 1.36.2.3: download - view: text, markup, annotated - select for diffs
Tue Mar 4 17:59:42 1997 UTC (14 years, 11 months ago) by dfr
Branches: RELENG_2_2
CVS tags: RELENG_2_2_1_RELEASE, RELENG_2_2_0_RELEASE
Diff to: previous 1.36.2.2: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.2: +3 -3 lines
Merge a bugfix from current which prevented nfsv3 commits from working
at all and include a simple performance optimisation (clustering commits).

Reviewed by:	j@uriah.heep.sax.de (J Wunsch)

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Feb 28 17:56:27 1997 UTC (14 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -5 lines
Fixed a panic in nfs_writevp().  Lite2 provided a fix for a silly
missing-parentheses bug, but this exposed a misplaced vfs_busy_pages().
This bug cost a factor of 2.5-3 in nfsv3 write performance!  It should
be fixed in 2.2.

Removed some debugging code that gets triggered often in normal
operation.  There are still many backwards diagnostics (#define
DIAGNOSTIC gives no diagnostics).

Submitted by:	vfs_busy_pages() fix by dfr

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:42:46 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$.  We are not
ready for it yet.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Feb 10 02:17:37 1997 UTC (15 years ago) by dyson
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +34 -37 lines
This is the kernel Lite/2 commit.  There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>

Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:51:29 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.

Revision 1.36.2.2: download - view: text, markup, annotated - select for diffs
Tue Jan 7 06:18:27 1997 UTC (15 years, 1 month ago) by wpaul
Branches: RELENG_2_2
Diff to: previous 1.36.2.1: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.1: +3 -2 lines
Bring in fix for 'panic: sillyrename dir' crash from -current. (Don't
sillyrename directories in nfs_rename().)

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Dec 31 07:10:19 1996 UTC (15 years, 1 month ago) by wpaul
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -2 lines
Fix (properly, I hope) 'panic: sillyrename dir' crash that can happen
if you do:

% cd /nfsdir
% mkdir -p foo/foo
% mv foo/foo .

nfs_sillyrename() self-destructs if you try to sillyrename a directory,
however nfs_rename() can be coerced into doing just that by the above
sequence of commands. To avoid this, nfs_rename() now checks that
v_type of the 'destination' vnode != VDIR before attempting the
sillyrename. The server correctly handles this particular situation
by returning ENOTEMPTY on the rename() attempt.

I asked if this was the correct fix for this on -hackers but nobody
ever answered.

This is a 2.2 candidate.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Dec 13 21:29:07 1996 UTC (15 years, 2 months ago) by wollman
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3 lines
Convert the interface address and IP interface address structures
to TAILQs.  Fix places which referenced these for no good reason
that I can see (the references remain, but were fixed to compile
again; they are still questionable).

Revision 1.36.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 9 21:11:07 1996 UTC (15 years, 3 months ago) by phk
Branches: RELENG_2_2
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -1 lines
Merge from -current

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Nov 6 10:53:12 1996 UTC (15 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -1 lines
Improve the queuing algorithms used by NFS' asynchronous i/o.  The
existing mechanism uses a global queue for some buffers and the
vp->b_dirtyblkhd queue for others.  This turns sequential writes into
randomly ordered writes to the server, affecting both read and write
performance.  The existing mechanism also copes badly with hung
servers, tending to block accesses to other servers when all the iods
are waiting for a hung server.

The new mechanism uses a queue for each mount point.  All asynchronous
i/o goes through this queue which preserves the ordering of requests.
A simple mechanism ensures that the iods are shared out fairly between
active mount points.  This removes the sysctl variable vfs.nfs.dwrite
since the new queueing mechanism removes the old delayed write code
completely.

This should go into the 2.2 branch.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Oct 21 10:07:52 1996 UTC (15 years, 3 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_2_2_BP
Branch point for: RELENG_2_2
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -5 lines
If a large (>4096 bytes) directory was modified, the old directory
contents are discarded, including the cached seek cookies.
Unfortunately, if the directory was larger than NFS_DIRBLKSIZ, then
this confused nfs_readdirrpc(), making it appear as if the directory
was truncated.

Reviewed by:	Karl Denninger <karl@Mcs.Net>

Revision 1.35: download - view: text, markup, annotated - select for diffs
Thu Sep 19 18:21:01 1996 UTC (15 years, 4 months ago) by nate
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +30 -30 lines
        In sys/time.h, struct timespec is defined as:

        /*
         * Structure defined by POSIX.4 to be like a timeval.
         */
        struct timespec {
                time_t  ts_sec;         /* seconds */
                long    ts_nsec;        /* and nanoseconds */
        };

        The correct names of the fields are tv_sec and tv_nsec.

Reminded by:	James Drobina <jdrobina@infinet.com>

Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Jul 16 10:19:45 1996 UTC (15 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
Various fixes from frank@fwi.uva.nl (Frank van der Linden) via
rick@snowhite.cis.uoguelph.ca:

1. Clear B_NEEDCOMMIT in nfs_write to make sure that dirty data is
correctly send to the server.  If a buffer was dirtied when it was in
the B_DELWRI+B_NEEDCOMMIT state, the state of the buffer was left
unchanged and when the buffer was later cleaned, just a commit rpc was
made to the server to complete the previous write.  Clearing
B_NEEDCOMMIT ensures that another write is made to the server.

2. If a server returned a server (for whatever reason) returned an
answer to a write RPC that implied that fewer bytes than requested
were written, bad things would happen.

3. The setattr operation passed on the atime in stead of the mtime to
the server. The fix is trivial.

4. XIDs always started at 0, but this caused some servers (older DEC
OSF/1 3.0 so I've been told) who had very long-lasting XID caches to
get confused if, after a reboot of a BSD client, RPCs came in with a
XID that had in the past been used before from that client. Patch is
to use the current time in seconds as a starting point for XIDs. The
patch below is not perfect, because it requires the root fs to be
mounted first. This is because of the check BSD systems do, comparing
FS time to system time.

Reviewed by:	Bruce Evans, Terry Lambert.
Obtained from:  frank@fwi.uva.nl (Frank van der Linden) via rick@snowhite.cis.uoguelph.ca

Revision 1.15.4.3: download - view: text, markup, annotated - select for diffs
Thu Mar 21 20:30:07 1996 UTC (15 years, 10 months ago) by phk
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE, RELENG_2_1_5_RELEASE
Diff to: previous 1.15.4.2: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.4.2: +94 -47 lines
Remove KADB, we havn't had it ever I think.
Add support for NFS_SERVER and NFS_CLIENT options.

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Mar 11 19:34:10 1996 UTC (15 years, 11 months ago) by peter
Branches: CSRG
CVS tags: bsd_44_lite_2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +1479 -768 lines
Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all
files are off the vendor branch, so this should not change anything.

A "U" marker generally means that the file was not changed in between
the 4.4Lite and Lite-2 releases, and does not need a merge.  "C" generally
means that there was a change.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Jan 25 00:45:37 1996 UTC (16 years ago) by bde
Branches: MAIN
CVS tags: wollman_polling
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Fixed spelling of s_namlen so that this compiles again.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Jan 24 21:11:26 1996 UTC (16 years ago) by phk
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -8 lines
Use new printf features rather than local kludges.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Dec 7 12:47:29 1995 UTC (16 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -1 lines
Untangled the vm.h include file spaghetti.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Nov 21 15:51:39 1995 UTC (16 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +15 -5 lines
Completed function declarations, added prototypes and removed redundant
declarations.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Nov 9 08:17:02 1995 UTC (16 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +139 -139 lines
Introduced a type `vop_t' for vnode operation functions and used
it 1138 times (:-() in casts and a few more times in declarations.
This change is null for the i386.

The type has to be `typedef int vop_t(void *)' and not `typedef
int vop_t()' because `gcc -Wstrict-prototypes' warns about the
latter.  Since vnode op functions are called with args of different
(struct pointer) types, neither of these function types is any use
for type checking of the arg, so it would be preferable not to use
the complete function type, especially since using the complete
type requires adding 1138 casts to avoid compiler warnings and
another 40+ casts to reverse the function pointer conversions before
calling the functions.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Nov 6 00:36:01 1995 UTC (16 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +26 -1 lines
Replaced bogus macros for dummy devswitch entries by functions.
These functions went away:

	enosys (hasn't been used for some time)
	enxio
	enodev
	enoioctl (was used only once, actually for a vop)

if_tun.c:
Continued cleaning up...

conf.h:
Probably fixed the type of d_reset_t.  It is hard to tell the correct
type because there are no non-dummy device reset functions.

Removed last vestige of ambiguous sleep message strings.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Oct 29 15:33:15 1995 UTC (16 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +104 -93 lines
Second batch of cleanup changes.
This time mostly making a lot of things static and some unused
variables here and there.

Revision 1.15.4.2: download - view: text, markup, annotated - select for diffs
Thu Oct 26 09:17:36 1995 UTC (16 years, 3 months ago) by davidg
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_0_RELEASE
Diff to: previous 1.15.4.1: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.4.1: +47 -3 lines
Brought in changes from main branch: move FS readonly checks into the
filesystem layer to fix related panics from vgone()'d vnodes.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Oct 22 09:37:45 1995 UTC (16 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
Fix order problem: unbusy pages before releasing the buffer.

Submitted by:	John Dyson <dyson>

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Oct 22 09:32:42 1995 UTC (16 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +45 -4 lines
Moved the filesystem read-only check out of the syscalls and into the
filesystem layer, as was done in lite-2. Merged in some other cosmetic
changes while I was at it. Rewrote most of msdosfs_access() to be more
like ufs_access() and to include the FS read-only check.

Obtained from: partially from 4.4BSD-lite2

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Sep 4 00:20:50 1995 UTC (16 years, 5 months ago) by dyson
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -1 lines
Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block count
for VOP_BMAP.  Updated affected filesystems...

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Aug 1 18:50:59 1995 UTC (16 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3 lines
Removed my special-case hack for VOP_LINK and fixed the problem with the
wrong vp's ops vector being used by changing the VOP_LINK's argument order.
The special-case hack doesn't go far enough and breaks the generic
bypass routine used in some non-leaf filesystems. Pointed out by Kirk
McKusick.

Revision 1.15.4.1: download - view: text, markup, annotated - select for diffs
Tue Jul 25 07:47:54 1995 UTC (16 years, 6 months ago) by davidg
Branches: RELENG_2_1_0
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
Brought in change from rev 1.22: don't bogusly truncate a file on a
setattr failure.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Jul 24 16:38:05 1995 UTC (16 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -4 lines
Slightly better fix than previous revision.

Submitted by:	Rick Macklem <rick@snowhite.cis.uoguelph.ca>

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jul 24 12:50:49 1995 UTC (16 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -2 lines
Fix a problem which appeared to truncate a file to the nearest block boundary
when it is moved to an NFS filesystem from from another filesystem and /bin/mv
failed to set the file ownership during the move.

I believe that this bug is present in STABLE but I have not tested it.  The fix
would be the same in STABLE even though the code has changed quite considerably
in CURRENT.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:55:12 1995 UTC (16 years, 7 months ago) by dfr
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +8 -10 lines
I believe that the following fix to nfs_vnops.c should do the trick w.r.t.
the problem "when a file is truncated on the server after being written on
a client under NFSv3, the client doesn't see the size drop to zero".
(As you noted, the problem is that NMODIFIED wasn't being cleared by nfs_close
 when it flushed the buffers. After checking through the code, the only place
 where NMODIFIED was used to test for the possibility of dirty blocks was in
 nfs_setattr(). The two cases are safe to do when there aren't dirty blocks,
 so I just took out the tests. Unfortunately, testing for
 v_dirtyblkhd.lh_first being non-null is not sufficient, since there are
 times when the code moves blocks to the clean list and then back to the
 dirty list.)

Submitted by:	rick@snowhite.cis.uoguelph.ca

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Jul 13 08:47:55 1995 UTC (16 years, 7 months ago) by davidg
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -1 lines
NOTE: libkvm, w, ps, 'top', and any other utility which depends on struct
      proc or any VM system structure will have to be rebuilt!!!

Much needed overhaul of the VM system. Included in this first round of
changes:

1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages,
   haspage, and sync operations are supported. The haspage interface now
   provides information about clusterability. All pager routines now take
   struct vm_object's instead of "pagers".

2) Improved data structures. In the previous paradigm, there is constant
   confusion caused by pagers being both a data structure ("allocate a
   pager") and a collection of routines. The idea of a pager structure has
   escentially been eliminated. Objects now have types, and this type is
   used to index the appropriate pager. In most cases, items in the pager
   structure were duplicated in the object data structure and thus were
   unnecessary. In the few cases that remained, a un_pager structure union
   was created in the object to contain these items.

3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now
   be removed. For instance, vm_object_enter(), vm_object_lookup(),
   vm_object_remove(), and the associated object hash list were some of the
   things that were removed.

4) simple_lock's removed. Discussion with several people reveals that the
   SMP locking primitives used in the VM system aren't likely the mechanism
   that we'll be adopting. Even if it were, the locking that was in the code
   was very inadequate and would have to be mostly re-done anyway. The
   locking in a uni-processor kernel was a no-op but went a long way toward
   making the code difficult to read and debug.

5) Places that attempted to kludge-up the fact that we don't have kernel
   thread support have been fixed to reflect the reality that we are really
   dealing with processes, not threads. The VM system didn't have complete
   thread support, so the comments and mis-named routines were just wrong.
   We now use tsleep and wakeup directly in the lock routines, for instance.

6) Where appropriate, the pagers have been improved, especially in the
   pager_alloc routines. Most of the pager_allocs have been rewritten and
   are now faster and easier to maintain.

7) The pagedaemon pageout clustering algorithm has been rewritten and
   now tries harder to output an even number of pages before and after
   the requested page. This is sort of the reverse of the ideal pagein
   algorithm and should provide better overall performance.

8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup
   have been removed. Some other unnecessary casts have also been removed.

9) Some almost useless debugging code removed.

10) Terminology of shadow objects vs. backing objects straightened out.
    The fact that the vm_object data structure escentially had this
    backwards really confused things. The use of "shadow" and "backing
    object" throughout the code is now internally consistent and correct
    in the Mach terminology.

11) Several minor bug fixes, including one in the vm daemon that caused
    0 RSS objects to not get purged as intended.

12) A "default pager" has now been created which cleans up the transition
    of objects to the "swap" type. The previous checks throughout the code
    for swp->pg_data != NULL were really ugly. This change also provides
    the rudiments for future backing of "anonymous" memory by something
    other than the swap pager (via the vnode pager, for example), and it
    allows the decision about which of these pagers to use to be made
    dynamically (although will need some additional decision code to do
    this, of course).

13) (dyson) MAP_COPY has been deprecated and the corresponding "copy
    object" code has been removed. MAP_COPY was undocumented and non-
    standard. It was furthermore broken in several ways which caused its
    behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will
    continue to work correctly, but via the slightly different semantics
    of MAP_PRIVATE.

14) (dyson) Sharing maps have been removed. It's marginal usefulness in a
    threads design can be worked around in other ways. Both #12 and #13
    were done to simplify the code and improve readability and maintain-
    ability. (As were most all of these changes)

TODO:

1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing
   this will reduce the vnode pager to a mere fraction of its current size.

2) Rewrite vm_fault and the swap/vnode pagers to use the clustering
   information provided by the new haspage pager interface. This will
   substantially reduce the overhead by eliminating a large number of
   VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be
   improved to provide both a "behind" and "ahead" indication of
   contiguousness.

3) Implement the extended features of pager_haspage in swap_pager_haspage().
   It currently just says 0 pages ahead/behind.

4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps
   via a much more general mechanism that could also be used for disk
   striping of regular filesystems.

5) Do something to improve the architecture of vm_object_collapse(). The
   fact that it makes calls into the swap pager and knows too much about
   how the swap pager operates really bothers me. It also doesn't allow
   for collapsing of non-swap pager objects ("unnamed" objects backed by
   other pagers).

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Jun 28 17:33:39 1995 UTC (16 years, 7 months ago) by dfr
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +31 -2 lines
Use the correct cred for nfs_commit operations.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Jun 28 07:06:52 1995 UTC (16 years, 7 months ago) by davidg
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -2 lines
Fixed VOP_LINK argument order botch.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Jun 27 11:06:53 1995 UTC (16 years, 7 months ago) by dfr
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +1518 -800 lines
Changes to support version 3 of the NFS protocol.
The version 2 support has been tested (client+server) against FreeBSD-2.0,
IRIX 5.3 and FreeBSD-current (using a loopback mount).  The version 2 support
is stable AFAIK.
The version 3 support has been tested with a loopback mount and minimally
against an IRIX 5.3 server.  It needs more testing and may have problems.
I have patched amd to support the new variable length filehandles although
it will still only use version 2 of the protocol.

Before booting a kernel with these changes, nfs clients will need to at least
build and install /usr/sbin/mount_nfs.  Servers will need to build and
install /usr/sbin/mountd.

NFS diskless support is untested.

Obtained from: Rick Macklem <rick@snowhite.cis.uoguelph.ca>

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue May 30 08:12:49 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: RELENG_2_1_0_BP, RELENG_2_0_5_RELEASE, RELENG_2_0_5_BP, RELENG_2_0_5
Branch point for: RELENG_2_1_0
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +7 -7 lines
Remove trailing whitespace.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Mar 23 09:43:40 1995 UTC (16 years, 10 months ago) by davidg
Branches: MAIN
CVS tags: RELENG_2_0_5_ALPHA
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -4 lines
Deleted bogus DIAGNOSTIC "nfs_fsync: dirty" message. This can and does
happen normally when there is heavy write activity to a file since the
vnode isn't locked (NFS plays fast and loose with vnode locks). This change
"fixes" PR#267.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Mar 16 18:15:41 1995 UTC (16 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -4 lines
Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Feb 3 06:46:24 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -1 lines
Fixed bmap run-length brokeness.
Use bmap run-length extension when doing clustered paging.

Submitted by:	John Dyson

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Jan 9 16:05:09 1995 UTC (17 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -1 lines
These changes embody the support of the fully coherent merged VM buffer cache,
much higher filesystem I/O performance, and much better paging performance. It
represents the culmination of over 6 months of R&D.

The majority of the merged VM/cache work is by John Dyson.

The following highlights the most significant changes. Additionally, there are
(mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to
support the new VM/buffer scheme.

vfs_bio.c:
Significant rewrite of most of vfs_bio to support the merged VM buffer cache
scheme.  The scheme is almost fully compatible with the old filesystem
interface.  Significant improvement in the number of opportunities for write
clustering.

vfs_cluster.c, vfs_subr.c
Upgrade and performance enhancements in vfs layer code to support merged
VM/buffer cache.  Fixup of vfs_cluster to eliminate the bogus pagemove stuff.

vm_object.c:
Yet more improvements in the collapse code.  Elimination of some windows that
can cause list corruption.

vm_pageout.c:
Fixed it, it really works better now.  Somehow in 2.0, some "enhancements"
broke the code.  This code has been reworked from the ground-up.

vm_fault.c, vm_page.c, pmap.c, vm_object.c
Support for small-block filesystems with merged VM/buffer cache scheme.

pmap.c vm_map.c
Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of
kernel PTs.

vm_glue.c
Much simpler and more effective swapping code.  No more gratuitous swapping.

proc.h
Fixed the problem that the p_lock flag was not being cleared on a fork.

swap_pager.c, vnode_pager.c
Removal of old vfs_bio cruft to support the past pseudo-coherency.  Now the
code doesn't need it anymore.

machdep.c
Changes to better support the parameter values for the merged VM/buffer cache
scheme.

machdep.c, kern_exec.c, vm_glue.c
Implemented a seperate submap for temporary exec string space and another one
to contain process upages. This eliminates all map fragmentation problems
that previously existed.

ffs_inode.c, ufs_inode.c, ufs_readwrite.c
Changes for merged VM/buffer cache.  Add "bypass" support for sneaking in on
busy buffers.

Submitted by:	John Dyson and David Greenman

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Oct 17 17:47:41 1994 UTC (17 years, 3 months ago) by phk
Branches: MAIN
CVS tags: RELEASE_2_0, OLAH_TTCP, BETA_2_0, ALPHA_2_0
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +53 -19 lines
This is a bunch of changes from NetBSD.  There are a couple of bug-fixes.
But mostly it is changes to use the list-maintenance macros instead of
doing the pointer-gymnastics by hand.

Obtained from: NetBSD

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Oct 9 07:35:06 1994 UTC (17 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -2 lines
Got rid of map.h. It's a leftover from the rmap code, and we use rlists.
Changed swapmap into swaplist.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Oct 2 17:27:04 1994 UTC (17 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +29 -17 lines
Prototyping and general gcc-shutting up.  Gcc has one warning now which looks
bad, I will get to it eventually, unless somebody beats me to it.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Sep 22 19:38:28 1994 UTC (17 years, 4 months ago) by wollman
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -9 lines
More loadable VFS changes:

- Make a number of filesystems work again when they are statically compiled
  (blush)

- FIFOs are no longer optional; ``options FIFO'' removed from distributed
  config files.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Sep 21 03:47:25 1994 UTC (17 years, 4 months ago) by wollman
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -1 lines
Implemented loadable VFS modules, and made most existing filesystems
loadable.  (NFS is a notable exception.)

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Aug 29 06:09:08 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +8 -12 lines
"bogus" fixes from 1.1.5 to work around some cache coherency problems.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Aug 8 17:30:53 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +9 -2 lines
Made lockf advisory locking code generic (rather than ufs specific), and
use it in NFS. This is required both for diskless support and for POSIX
compliance. Note: the support in NFS is only for the local node.

Submitted by:	based on work originally done by Yuval Yurom

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Aug 2 07:52:18 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -0 lines
Added $Id$

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed May 25 09:13:04 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +14 -12 lines
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by:	Rodney W. Grimes
Submitted by:	John Dyson and David Greenman

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 24 10:08:23 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: CSRG
CVS tags: bsd_44_lite, REL_before_johndavid_2_0_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
BSD 4.4 Lite Kernel Sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 24 10:08:22 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options