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

CVS log for src/sys/fs/nfsserver/nfs_nfsdport.c

[BACK] Up to [FreeBSD] / src / sys / fs / nfsserver

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.15.2.43: download - view: text, markup, annotated - select for diffs
Sun Jan 8 23:30:23 2012 UTC (4 weeks, 3 days ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.42: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.2.42: +7 -1 lines
SVN rev 229830 on 2012-01-08 23:30:23Z by rmacklem

MFC: r228560
Patch the new NFS server in a manner analagous to r228520 for the
old NFS server, so that it correctly handles a count == 0 argument
for Commit.

Revision 1.63.2.3: download - view: text, markup, annotated - select for diffs
Sun Jan 8 23:05:36 2012 UTC (4 weeks, 3 days ago) by rmacklem
Branches: RELENG_9
Diff to: previous 1.63.2.2: preferred, colored; branchpoint 1.63: preferred, colored; next MAIN 1.64: preferred, colored
Changes since revision 1.63.2.2: +7 -1 lines
SVN rev 229827 on 2012-01-08 23:05:36Z by rmacklem

MFC: r228560
Patch the new NFS server in a manner analagous to r228520 for the
old NFS server, so that it correctly handles a count == 0 argument
for Commit.

Revision 1.15.2.42: download - view: text, markup, annotated - select for diffs
Thu Jan 5 18:50:37 2012 UTC (4 weeks, 6 days ago) by jhb
Branches: RELENG_8
Diff to: previous 1.15.2.41: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.41: +69 -52 lines
SVN rev 229618 on 2012-01-05 18:50:37Z by jhb

MFC 228185:
Enhance the sequential access heuristic used to perform readahead in the
NFS server and reuse it for writes as well to allow writes to the backing
store to be clustered.

Revision 1.63.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 5 18:50:12 2012 UTC (4 weeks, 6 days ago) by jhb
Branches: RELENG_9
Diff to: previous 1.63.2.1: preferred, colored; branchpoint 1.63: preferred, colored
Changes since revision 1.63.2.1: +69 -52 lines
SVN rev 229617 on 2012-01-05 18:50:12Z by jhb

MFC 228185:
Enhance the sequential access heuristic used to perform readahead in the
NFS server and reuse it for writes as well to allow writes to the backing
store to be clustered.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Dec 16 00:58:41 2011 UTC (7 weeks, 6 days ago) by rmacklem
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +7 -1 lines
SVN rev 228560 on 2011-12-16 00:58:41Z by rmacklem

Patch the new NFS server in a manner analagous to r228520 for the
old NFS server, so that it correctly handles a count == 0 argument
for Commit.

PR:		kern/118126
MFC after:	2 weeks

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Dec 1 18:46:28 2011 UTC (2 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +69 -52 lines
SVN rev 228185 on 2011-12-01 18:46:28Z by jhb

Enhance the sequential access heuristic used to perform readahead in the
NFS server and reuse it for writes as well to allow writes to the backing
store to be clustered.
- Use a prime number for the size of the heuristic table (1017 is not
  prime).
- Move the logic to locate a heuristic entry from the table and compute
  the sequential count out of VOP_READ() and into a separate routine.
- Use the logic from sequential_heuristic() in vfs_vnops.c to update the
  seqcount when a sequential access is performed rather than just
  increasing seqcount by 1.  This lets the clustering count ramp up
  faster.
- Allow for some reordering of RPCs and if it is detected leave the current
  seqcount as-is rather than dropping back to a seqcount of 1.  Also,
  when out of order access is encountered, cut seqcount in half rather than
  dropping it all the way back to 1 to further aid with reordering.
- Fix the new NFS server to properly update the next offset after a
  successful VOP_READ() so that the readahead actually works.

Some of these changes came from an earlier patch by Bjorn Gronwall that was
forwarded to me by bde@.

Discussed with:	bde, rmacklem, fs@
Submitted by:	Bjorn Gronwall (1, 4)
MFC after:	2 weeks

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Nov 22 00:35:30 2011 UTC (2 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -9 lines
SVN rev 227809 on 2011-11-22 00:35:30Z by rmacklem

This patch enables the new/default NFS server's use of shared
vnode locking for read, readdir, readlink, getattr and access.
It is hoped that this will improve server performance for these
operations, since they will no longer be serialized for a given
file/vnode.

Revision 1.63.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.63.2.1: preferred, colored; next MAIN 1.63.2.2: preferred, colored
Changes since revision 1.63.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.63.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Sep 16 13:58:51 2011 UTC (4 months, 3 weeks ago) by kmacy
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +1 -1 lines
SVN rev 225617 on 2011-09-16 13:58:51Z by kmacy

In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.

Reviewed by:	rwatson
Approved by:	re (bz)

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Sep 3 00:28:53 2011 UTC (5 months, 1 week ago) by rmacklem
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1 -0 lines
SVN rev 225356 on 2011-09-03 00:28:53Z by rmacklem

Fix the NFS servers so that they can do a Lookup of "..",
which requires that ni_strictrelative be set to 0, post-r224810.

Tested by:	swills (earlier version), geo dot liaskos at gmail.com
Approved by:	re (kib)

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Aug 16 14:23:16 2011 UTC (5 months, 3 weeks ago) by jonathan
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +0 -1 lines
SVN rev 224911 on 2011-08-16 14:23:16Z by jonathan

Fix a merge conflict.

r224086 added "goto out"-style error handling to nfssvc_nfsd(), in order
to reliably call NFSEXITCODE() before returning. Our Capsicum changes,
based on the old "return (error)" model, did not merge nicely.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc

Revision 1.15.2.41: download - view: text, markup, annotated - select for diffs
Sat Aug 13 17:21:50 2011 UTC (5 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.40: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.40: +178 -66 lines
SVN rev 224851 on 2011-08-13 17:21:50Z by zack

MFC r224086:

Add DEXITCODE plumbing to NFS.

Isilon has the concept of an in-memory exit-code ring that saves the last exit
code of a function and allows for stack tracing. This is very helpful when
debugging tough issues.

This patch is essentially a no-op for BSD at this point, until we upstream
the dexitcode logic itself. The patch adds DEXITCODE calls to every NFS
function that returns an errno error code. A number of code paths were also
reorganized to have single exit paths, to reduce code duplication.

Submitted by:   David Kwan <dkwan@isilon.com>

Revision 1.15.2.40: download - view: text, markup, annotated - select for diffs
Sat Aug 13 17:19:24 2011 UTC (5 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.39: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.39: +1 -1 lines
SVN rev 224849 on 2011-08-13 17:19:24Z by zack

MFC: r224083

Simple find/replace of VOP_ISLOCKED -> NFSVOPISLOCKED. This is done so that
NFSVOPISLOCKED can be modified later to add enhanced logging and assertions.

Revision 1.15.2.39: download - view: text, markup, annotated - select for diffs
Sat Aug 13 17:18:45 2011 UTC (5 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.38: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.38: +8 -8 lines
SVN rev 224848 on 2011-08-13 17:18:45Z by zack

MFC: 224082

Simple find/replace of VOP_UNLOCK -> NFSVOPUNLOCK. This is done so that
NFSVOPUNLOCK can be modified later to add enhanced logging and assertions.

Revision 1.15.2.38: download - view: text, markup, annotated - select for diffs
Sat Aug 13 17:17:59 2011 UTC (5 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.37: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.37: +6 -6 lines
SVN rev 224847 on 2011-08-13 17:17:59Z by zack

MFC: 224081

Simple find/replace of vn_lock -> NFSVOPLOCK. This is done so that NFSVOPLOCK
can be modified later to add enhanced logging and assertions.

Revision 1.15.2.37: download - view: text, markup, annotated - select for diffs
Sat Aug 13 17:17:06 2011 UTC (5 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.36: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.36: +5 -5 lines
SVN rev 224846 on 2011-08-13 17:17:06Z by zack

MFC: 224080

Remove unnecessary thread pointer from VOPLOCK macros and current users.

Revision 1.15.2.36: download - view: text, markup, annotated - select for diffs
Sat Aug 13 17:16:06 2011 UTC (5 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.35: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.35: +0 -43 lines
SVN rev 224844 on 2011-08-13 17:16:06Z by zack

MFC: 224078
  Move nfsvno_pathconf to be accessible to sys/fs/nfs; no functionality change.

Revision 1.15.2.35: download - view: text, markup, annotated - select for diffs
Sat Aug 13 17:08:57 2011 UTC (5 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.34: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.34: +1 -1 lines
SVN rev 224843 on 2011-08-13 17:08:57Z by zack

MFC: r224077
  Small acl patch to return the aclerror that comes back from
  nfsrv_dissectacl().  This fixes a problem where ATTRNOTSUPP was being
  returned instead of BADOWNER.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Thu Aug 11 12:30:23 2011 UTC (5 months, 4 weeks ago) by rwatson
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +9 -1 lines
SVN rev 224778 on 2011-08-11 12:30:23Z by rwatson

Second-to-last commit implementing Capsicum capabilities in the FreeBSD
kernel for FreeBSD 9.0:

Add a new capability mask argument to fget(9) and friends, allowing system
call code to declare what capabilities are required when an integer file
descriptor is converted into an in-kernel struct file *.  With options
CAPABILITIES compiled into the kernel, this enforces capability
protection; without, this change is effectively a no-op.

Some cases require special handling, such as mmap(2), which must preserve
information about the maximum rights at the time of mapping in the memory
map so that they can later be enforced in mprotect(2) -- this is done by
narrowing the rights in the existing max_protection field used for similar
purposes with file permissions.

In namei(9), we assert that the code is not reached from within capability
mode, as we're not yet ready to enforce namespace capabilities there.
This will follow in a later commit.

Update two capability names: CAP_EVENT and CAP_KEVENT become
CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they
represent.

Approved by:	re (bz)
Submitted by:	jonathan
Sponsored by:	Google Inc

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Jul 16 08:51:09 2011 UTC (6 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +178 -66 lines
SVN rev 224086 on 2011-07-16 08:51:09Z by zack

Add DEXITCODE plumbing to NFS.

Isilon has the concept of an in-memory exit-code ring that saves the last exit
code of a function and allows for stack tracing. This is very helpful when
debugging tough issues.

This patch is essentially a no-op for BSD at this point, until we upstream
the dexitcode logic itself. The patch adds DEXITCODE calls to every NFS
function that returns an errno error code. A number of code paths were also
reorganized to have single exit paths, to reduce code duplication.

Submitted by:   David Kwan <dkwan@isilon.com>
Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Jul 16 08:05:41 2011 UTC (6 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +1 -1 lines
SVN rev 224083 on 2011-07-16 08:05:41Z by zack

Simple find/replace of VOP_ISLOCKED -> NFSVOPISLOCKED. This is done so that NFSVOPISLOCKED can be modified later to add enhanced logging and assertions.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Jul 16 08:05:36 2011 UTC (6 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +8 -8 lines
SVN rev 224082 on 2011-07-16 08:05:36Z by zack

Simple find/replace of VOP_UNLOCK -> NFSVOPUNLOCK. This is done so that NFSVOPUNLOCK can be modified later to add enhanced logging and assertions.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Jul 16 08:05:31 2011 UTC (6 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +6 -6 lines
SVN rev 224081 on 2011-07-16 08:05:31Z by zack

Simple find/replace of vn_lock -> NFSVOPLOCK. This is done so that NFSVOPLOCK can be modified later to add enhanced logging and assertions.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Jul 16 08:05:26 2011 UTC (6 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +5 -5 lines
SVN rev 224080 on 2011-07-16 08:05:26Z by zack

Remove unnecessary thread pointer from VOPLOCK macros and current users.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Jul 16 08:05:17 2011 UTC (6 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +0 -43 lines
SVN rev 224078 on 2011-07-16 08:05:17Z by zack

Move nfsvno_pathconf to be accessible to sys/fs/nfs; no functionality change.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Jul 16 08:04:57 2011 UTC (6 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +1 -1 lines
SVN rev 224077 on 2011-07-16 08:04:57Z by zack

Small acl patch to return the aclerror that comes back from nfsrv_dissectacl(). This fixes a problem where ATTRNOTSUPP was being returned instead of BADOWNER.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

Revision 1.15.2.34: download - view: text, markup, annotated - select for diffs
Sun Jun 19 01:44:50 2011 UTC (7 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.33: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.33: +30 -0 lines
SVN rev 223284 on 2011-06-19 01:44:50Z by rmacklem

MFC: r222663
Modify the new NFS server so that the NFSv3 Pathconf RPC
doesn't return an error when the underlying file system
lacks support for any of the four _PC_xxx values used, by
falling back to default values.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Jun 4 01:13:09 2011 UTC (8 months, 1 week ago) by rmacklem
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +30 -0 lines
SVN rev 222663 on 2011-06-04 01:13:09Z by rmacklem

Modify the new NFS server so that the NFSv3 Pathconf RPC
doesn't return an error when the underlying file system
lacks support for any of the four _PC_xxx values used, by
falling back to default values.

Tested by:	avg
MFC after:	2 weeks

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun May 22 01:07:54 2011 UTC (8 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
SVN rev 222167 on 2011-05-22 01:07:54Z by rmacklem

Add a lock flags argument to the VFS_FHTOVP() file system
method, so that callers can indicate the minimum vnode
locking requirement. This will allow some file systems to choose
to return a LK_SHARED locked vnode when LK_SHARED is specified
for the flags argument. This patch only adds the flag. It
does not change any file system to use it and all callers
specify LK_EXCLUSIVE, so file system semantics are not changed.

Reviewed by:	kib

Revision 1.15.2.33: download - view: text, markup, annotated - select for diffs
Fri May 20 00:51:52 2011 UTC (8 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.32: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.32: +16 -1 lines
SVN rev 222109 on 2011-05-20 00:51:52Z by rmacklem

MFC: r221517
Change the new NFS server so that it returns 0 when the f_bavail
or f_ffree fields of "struct statfs" are negative, since the
values that go on the wire are unsigned and will appear to be
very large positive values otherwise. This makes the handling
of a negative f_bavail compatible with the old/regular NFS server.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun May 8 01:01:27 2011 UTC (9 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +6 -6 lines
SVN rev 221615 on 2011-05-08 01:01:27Z by rmacklem

Change the new NFS server so that it uses vfs.nfsd naming
for its sysctls instead of vfs.newnfs. This separates the
names from the ones used by the client.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri May 6 01:29:14 2011 UTC (9 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +16 -1 lines
SVN rev 221517 on 2011-05-06 01:29:14Z by rmacklem

Change the new NFS server so that it returns 0 when the f_bavail
or f_ffree fields of "struct statfs" are negative, since the
values that go on the wire are unsigned and will appear to be
very large positive values otherwise. This makes the handling
of a negative f_bavail compatible with the old/regular NFS server.

MFC after:	2 weeks

Revision 1.15.2.32: download - view: text, markup, annotated - select for diffs
Fri Apr 29 18:30:53 2011 UTC (9 months, 1 week ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.31: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.31: +14 -7 lines
SVN rev 221217 on 2011-04-29 18:30:53Z by rmacklem

MFC: r220648
Fix the experimental NFSv4 server so that it uses VOP_PATHCONF()
to determine if a file system supports NFSv4 ACLs. Since
VOP_PATHCONF() must be called with a locked vnode, the function
is called before nfsvno_fillattr() and the result is passed in
as an extra argument.

Revision 1.15.2.31: download - view: text, markup, annotated - select for diffs
Fri Apr 29 18:17:01 2011 UTC (9 months, 1 week ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.30: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.30: +54 -17 lines
SVN rev 221213 on 2011-04-29 18:17:01Z by rmacklem

MFC: r220645
Modify the experimental NFSv4 server so that it handles
crossing of server mount points properly. The functions
nfsvno_fillattr() and nfsv4_fillattr() were modified to
take the extra arguments that are the mount point, a flag
to indicate that it is a file system root and the mounted
on fileno. The mount point argument needs to be busy when
nfsvno_fillattr() is called, since the vp argument is not
locked.

Revision 1.15.2.30: download - view: text, markup, annotated - select for diffs
Mon Apr 25 21:27:38 2011 UTC (9 months, 2 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.29: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.29: +2 -3 lines
SVN rev 221029 on 2011-04-25 21:27:38Z by rmacklem

MFC: r220546
Vrele ni_startdir in the experimental NFS server for the case
of NFSv2 getting an error return from VOP_MKNOD(). Without this
patch, the server file system remains busy after an NFSv2
VOP_MKNOD() fails.

Revision 1.15.2.29: download - view: text, markup, annotated - select for diffs
Sun Apr 24 23:04:08 2011 UTC (9 months, 2 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.28: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.28: +8 -0 lines
SVN rev 221002 on 2011-04-24 23:04:08Z by rmacklem

MFC: r220530
Add some cleanup code to the module unload operation for
the experimental NFS server, so that it doesn't leak memory
when unloaded. However, unloading the NFSv4 server is not
recommended, since all NFSv4 state will be lost by the unload
and clients will have to recover the state after a server
reload/restart as if the server crashed/rebooted.

Revision 1.15.2.28: download - view: text, markup, annotated - select for diffs
Sun Apr 24 19:35:54 2011 UTC (9 months, 2 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.27: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.27: +5 -1 lines
SVN rev 220997 on 2011-04-24 19:35:54Z by rmacklem

MFC: r220507
Add a VOP_UNLOCK() for the directory, when that is not what
VOP_LOOKUP() returned. This fixes a bug in the experimental
NFS server for the case where VFS_VGET() fails returning EOPNOTSUPP
in the ReaddirPlus RPC, forcing the use of VOP_LOOKUP() instead.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu Apr 14 23:46:15 2011 UTC (9 months, 3 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +14 -7 lines
SVN rev 220648 on 2011-04-14 23:46:15Z by rmacklem

Fix the experimental NFSv4 server so that it uses VOP_PATHCONF()
to determine if a file system supports NFSv4 ACLs. Since
VOP_PATHCONF() must be called with a locked vnode, the function
is called before nfsvno_fillattr() and the result is passed in
as an extra argument.

MFC after:	2 weeks

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Apr 14 21:49:52 2011 UTC (9 months, 3 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +54 -17 lines
SVN rev 220645 on 2011-04-14 21:49:52Z by rmacklem

Modify the experimental NFSv4 server so that it handles
crossing of server mount points properly. The functions
nfsvno_fillattr() and nfsv4_fillattr() were modified to
take the extra arguments that are the mount point, a flag
to indicate that it is a file system root and the mounted
on fileno. The mount point argument needs to be busy when
nfsvno_fillattr() is called, since the vp argument is not
locked.

Reviewed by:	kib
MFC after:	2 weeks

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Apr 11 20:54:30 2011 UTC (9 months, 4 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -3 lines
SVN rev 220546 on 2011-04-11 20:54:30Z by rmacklem

Vrele ni_startdir in the experimental NFS server for the case
of NFSv2 getting an error return from VOP_MKNOD(). Without this
patch, the server file system remains busy after an NFSv2
VOP_MKNOD() fails.

MFC after:	2 weeks

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Apr 10 20:43:07 2011 UTC (10 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +8 -0 lines
SVN rev 220530 on 2011-04-10 20:43:07Z by rmacklem

Add some cleanup code to the module unload operation for
the experimental NFS server, so that it doesn't leak memory
when unloaded. However, unloading the NFSv4 server is not
recommended, since all NFSv4 state will be lost by the unload
and clients will have to recover the state after a server
reload/restart as if the server crashed/rebooted.

MFC after:	2 weeks

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Apr 9 23:55:27 2011 UTC (10 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +5 -1 lines
SVN rev 220507 on 2011-04-09 23:55:27Z by rmacklem

Add a VOP_UNLOCK() for the directory, when that is not what
VOP_LOOKUP() returned. This fixes a bug in the experimental
NFS server for the case where VFS_VGET() fails returning EOPNOTSUPP
in the ReaddirPlus RPC, forcing the use of VOP_LOOKUP() instead.

MFC after:	2 weeks

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Feb 25 10:11:01 2011 UTC (11 months, 2 weeks ago) by netchild
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -0 lines
SVN rev 219028 on 2011-02-25 10:11:01Z by netchild

Add some FEATURE macros for various features (AUDIT/CAM/IPC/KTR/MAC/NFS/NTP/
PMC/SYSV/...).

No FreeBSD version bump, the userland application to query the features will
be committed last and can serve as an indication of the availablility if
needed.

Sponsored by:   Google Summer of Code 2010
Submitted by:   kibab
Reviewed by:    arch@ (parts by rwatson, trasz, jhb)
X-MFC after:    to be determined in last commit with code from this project

Revision 1.15.2.27: download - view: text, markup, annotated - select for diffs
Tue Feb 15 20:46:51 2011 UTC (11 months, 3 weeks ago) by zack
Branches: RELENG_8
Diff to: previous 1.15.2.26: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.26: +4 -0 lines
SVN rev 218714 on 2011-02-15 20:46:51Z by zack

MFC: 217335
Clean up the experimental NFS server replay cache when the module is unloaded.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Feb 5 21:21:27 2011 UTC (12 months ago) by alc
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -1 lines
SVN rev 218345 on 2011-02-05 21:21:27Z by alc

Unless "cnt" exceeds MAX_COMMIT_COUNT, nfsrv_commit() and nfsvno_fsync() are
incorrectly calling vm_object_page_clean().  They are passing the length of
the range rather than the ending offset of the range.

Perform the OFF_TO_IDX() conversion in vm_object_page_clean() rather than the
callers.

Reviewed by:	kib
MFC after:	3 weeks

Revision 1.15.2.26: download - view: text, markup, annotated - select for diffs
Fri Jan 21 01:12:22 2011 UTC (12 months, 2 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.25: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.25: +39 -0 lines
SVN rev 217678 on 2011-01-21 01:12:22Z by rmacklem

MFC: r217432
Modify the experimental NFSv4 server so that it posts a SIGUSR2
signal to the master nfsd daemon whenever the stable restart
file has been modified. This will allow the master nfsd daemon
to maintain an up to date backup copy of the file. This is
enabled via the nfssvc() syscall, so that older nfsd daemons
will not be signaled.

Revision 1.15.2.25: download - view: text, markup, annotated - select for diffs
Wed Jan 19 01:26:49 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.24: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.24: +21 -3 lines
SVN rev 217567 on 2011-01-19 01:26:49Z by rmacklem

MFC: r217176
Modify readdirplus in the experimental NFS server in a
manner analogous to r216633 for the regular server. This
change busies the file system so that VFS_VGET() is
guaranteed to be using the correct mount point even
during a forced dismount attempt. Since nfsd_fhtovp() is
not called immediately before readdirplus, the patch is
actually a clone of pjd@'s nfs_serv.c.4.patch instead of
the one committed in r216633.

Revision 1.15.2.24: download - view: text, markup, annotated - select for diffs
Tue Jan 18 00:53:55 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.23: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.23: +10 -68 lines
SVN rev 217525 on 2011-01-18 00:53:55Z by rmacklem

MFC: r217063
Since the VFS_LOCK_GIANT() code in the experimental NFS
server is broken and the major file systems are now all
mpsafe, modify the server so that it will only export
mpsafe file systems. This was discussed on freebsd-fs@
and removes a fair bit of crufty code.

Revision 1.15.2.23: download - view: text, markup, annotated - select for diffs
Mon Jan 17 01:37:39 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.22: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.22: +5 -6 lines
SVN rev 217496 on 2011-01-17 01:37:39Z by rmacklem

MFC: r217017
Fix the experimental NFS server to use vfs_busyfs() instead
of vfs_getvfs() so that the mount point is busied for the
VFS_FHTOVP() call. This is analagous to r185432 for the
regular NFS server.

Revision 1.15.2.22: download - view: text, markup, annotated - select for diffs
Mon Jan 17 01:26:13 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.21: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.21: +1 -0 lines
SVN rev 217495 on 2011-01-17 01:26:13Z by rmacklem

MFC: r216931
Fix the nlm so that it no longer depends on the regular
nfs client and, as such, can be loaded for the experimental
nfs client without the regular client.

Revision 1.15.2.21: download - view: text, markup, annotated - select for diffs
Mon Jan 17 01:11:06 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.20: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.20: +1 -2 lines
SVN rev 217494 on 2011-01-17 01:11:06Z by rmacklem

MFC: r216898
Fix the experimental NFS server so that it doesn't leak
a reference count on the directory when creating device
special files.

Revision 1.15.2.20: download - view: text, markup, annotated - select for diffs
Sun Jan 16 14:37:48 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.19: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.19: +2 -4 lines
SVN rev 217476 on 2011-01-16 14:37:48Z by rmacklem

MFC: r216894
Delete some cruft from the experimental NFS server that was
only used by the OpenBSD port for its pseudo-fs.

Revision 1.15.2.19: download - view: text, markup, annotated - select for diffs
Sun Jan 16 14:15:46 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.18: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.18: +28 -11 lines
SVN rev 217474 on 2011-01-16 14:15:46Z by rmacklem

MFC: r216893
Add checks for VI_DOOMED and vn_lock() failures to the
experimental NFS server, to handle the case where an
exported file system is forced dismounted while an RPC
is in progress. Further commits will fix the cases where
a mount point is used when the associated vnode isn't locked.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Jan 14 23:30:35 2011 UTC (12 months, 3 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +39 -0 lines
SVN rev 217432 on 2011-01-14 23:30:35Z by rmacklem

Modify the experimental NFSv4 server so that it posts a SIGUSR2
signal to the master nfsd daemon whenever the stable restart
file has been modified. This will allow the master nfsd daemon
to maintain an up to date backup copy of the file. This is
enabled via the nfssvc() syscall, so that older nfsd daemons
will not be signaled.

Reviewed by:	jhb
MFC after:	1 week

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Jan 12 23:34:09 2011 UTC (12 months, 3 weeks ago) by zack
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +4 -0 lines
SVN rev 217335 on 2011-01-12 23:34:09Z by zack

Clean up the experimental NFS server replay cache when the module is unloaded.

Reviewed by:    rmacklem
Approved by:    zml (mentor)

Revision 1.15.2.18: download - view: text, markup, annotated - select for diffs
Tue Jan 11 01:12:50 2011 UTC (12 months, 4 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.17: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.17: +0 -60 lines
SVN rev 217251 on 2011-01-11 01:12:50Z by rmacklem

MFC: r216784
Delete the nfsvno_localconflict() function in the experimental
NFS server since it is no longer used and is broken.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sun Jan 9 02:10:54 2011 UTC (13 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +21 -3 lines
SVN rev 217176 on 2011-01-09 02:10:54Z by rmacklem

Modify readdirplus in the experimental NFS server in a
manner analogous to r216633 for the regular server. This
change busies the file system so that VFS_VGET() is
guaranteed to be using the correct mount point even
during a forced dismount attempt. Since nfsd_fhtovp() is
not called immediately before readdirplus, the patch is
actually a clone of pjd@'s nfs_serv.c.4.patch instead of
the one committed in r216633.

Reviewed by:	kib
MFC after:	10 days

Revision 1.15.2.17: download - view: text, markup, annotated - select for diffs
Sat Jan 8 01:11:14 2011 UTC (13 months ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.16: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.16: +16 -8 lines
SVN rev 217137 on 2011-01-08 01:11:14Z by rmacklem

MFC: r216700
Modify the experimental NFS server so that it uses LK_SHARED
for RPC operations when it can. Since VFS_FHTOVP() currently
always gets an exclusively locked vnode and is usually called
at the beginning of each RPC, the RPCs for a given vnode will
still be serialized. As such, passing a lock type argument to
VFS_FHTOVP() would be preferable to doing the vn_lock() with
LK_DOWNGRADE after the VFS_FHTOVP() call.

Revision 1.15.2.16: download - view: text, markup, annotated - select for diffs
Fri Jan 7 20:31:47 2011 UTC (13 months ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.15: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.15: +19 -13 lines
SVN rev 217124 on 2011-01-07 20:31:47Z by rmacklem

MFC: r216693
Add an argument to nfsvno_getattr() in the experimental
NFS server, so that it can avoid calling VOP_ISLOCKED()
when the vnode is known to be locked. This will allow
LK_SHARED to be used for these cases, which happen to
be all the cases that can use LK_SHARED. This does not
fix any bug, but it reduces the number of calls to
VOP_ISLOCKED() and prepares the code so that it can be
switched to using LK_SHARED in a future patch.

Revision 1.15.2.15: download - view: text, markup, annotated - select for diffs
Fri Jan 7 20:07:30 2011 UTC (13 months ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.14: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.14: +11 -16 lines
SVN rev 217122 on 2011-01-07 20:07:30Z by rmacklem

MFC: r216692
Simplify vnode locking in the expeimental NFS server's
readdir functions. In particular, get rid of two bogus
VOP_ISLOCKED() calls. Removing the VOP_ISLOCKED() calls
is the only actual bug fixed by this patch.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Jan 6 19:50:11 2011 UTC (13 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +10 -68 lines
SVN rev 217063 on 2011-01-06 19:50:11Z by rmacklem

Since the VFS_LOCK_GIANT() code in the experimental NFS
server is broken and the major file systems are now all
mpsafe, modify the server so that it will only export
mpsafe file systems. This was discussed on freebsd-fs@
and removes a fair bit of crufty code.

MFC after:	12 days

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Jan 5 18:46:05 2011 UTC (13 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +5 -6 lines
SVN rev 217017 on 2011-01-05 18:46:05Z by rmacklem

Fix the experimental NFS server to use vfs_busyfs() instead
of vfs_getvfs() so that the mount point is busied for the
VFS_FHTOVP() call. This is analagous to r185432 for the
regular NFS server.

Reviewed by:	kib
MFC after:	12 days

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Jan 3 20:37:31 2011 UTC (13 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +1 -0 lines
SVN rev 216931 on 2011-01-03 20:37:31Z by rmacklem

Fix the nlm so that it no longer depends on the regular
nfs client and, as such, can be loaded for the experimental
nfs client without the regular client.

Reviewed by:	jhb
MFC after:	2 weeks

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Jan 3 00:40:13 2011 UTC (13 months, 1 week ago) by rmacklem
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +1 -2 lines
SVN rev 216898 on 2011-01-03 00:40:13Z by rmacklem

Fix the experimental NFS server so that it doesn't leak
a reference count on the directory when creating device
special files.

MFC after:	2 weeks

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Jan 2 21:34:01 2011 UTC (13 months, 1 week ago) by rmacklem
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -4 lines
SVN rev 216894 on 2011-01-02 21:34:01Z by rmacklem

Delete some cruft from the experimental NFS server that was
only used by the OpenBSD port for its pseudo-fs.

MFC after:	2 weeks

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Jan 2 19:58:39 2011 UTC (13 months, 1 week ago) by rmacklem
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +28 -11 lines
SVN rev 216893 on 2011-01-02 19:58:39Z by rmacklem

Add checks for VI_DOOMED and vn_lock() failures to the
experimental NFS server, to handle the case where an
exported file system is forced dismounted while an RPC
is in progress. Further commits will fix the cases where
a mount point is used when the associated vnode isn't locked.

Reviewed by:	kib
MFC after:	2 weeks

Revision 1.15.2.13.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 29 21:04:10 2010 UTC (13 months, 1 week ago) by rmacklem
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.15.2.13.2.1: preferred, colored; branchpoint 1.15.2.13: preferred, colored; next MAIN 1.15.2.14: preferred, colored
Changes since revision 1.15.2.13.2.1: +10 -2 lines
SVN rev 216808 on 2010-12-29 21:04:10Z by rmacklem

MFC: r216691
Since VOP_READDIR() for ZFS does not return monotonically
increasing directory offset cookies, disable the UFS related
loop that skips over directory entries at the beginning of
the block for the experimental NFS server. This loop is
required for UFS since it always returns directory entries
starting at the beginning of the block that
the requested directory offset is in. In discussion with pjd@
and mckusick@ it seems that this behaviour of UFS should maybe
change, with this fix being an interim patch until then.
This patch only fixes the experimental server, since pjd@ is
working on a patch for the regular server.

Approved by:	re (kib)

Revision 1.15.2.14: download - view: text, markup, annotated - select for diffs
Wed Dec 29 02:54:41 2010 UTC (13 months, 1 week ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.13: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.13: +10 -2 lines
SVN rev 216786 on 2010-12-29 02:54:41Z by rmacklem

MFC: r216691
Since VOP_READDIR() for ZFS does not return monotonically
increasing directory offset cookies, disable the UFS related
loop that skips over directory entries at the beginning of
the block for the experimental NFS server. This loop is
required for UFS since it always returns directory entries
starting at the beginning of the block that
the requested directory offset is in. In discussion with pjd@
and mckusick@ it seems that this behaviour of UFS should maybe
change, with this fix being an interim patch until then.
This patch only fixes the experimental server, since pjd@ is
working on a patch for the regular server.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Dec 28 23:50:13 2010 UTC (13 months, 1 week ago) by rmacklem
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +0 -60 lines
SVN rev 216784 on 2010-12-28 23:50:13Z by rmacklem

Delete the nfsvno_localconflict() function in the experimental
NFS server since it is no longer used and is broken.

MFC after:	2 weeks

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Dec 25 21:56:25 2010 UTC (13 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +16 -8 lines
SVN rev 216700 on 2010-12-25 21:56:25Z by rmacklem

Modify the experimental NFS server so that it uses LK_SHARED
for RPC operations when it can. Since VFS_FHTOVP() currently
always gets an exclusively locked vnode and is usually called
at the beginning of each RPC, the RPCs for a given vnode will
still be serialized. As such, passing a lock type argument to
VFS_FHTOVP() would be preferable to doing the vn_lock() with
LK_DOWNGRADE after the VFS_FHTOVP() call.

Reviewed by:	kib
MFC after:	2 weeks

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Dec 24 21:31:18 2010 UTC (13 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +19 -13 lines
SVN rev 216693 on 2010-12-24 21:31:18Z by rmacklem

Add an argument to nfsvno_getattr() in the experimental
NFS server, so that it can avoid calling VOP_ISLOCKED()
when the vnode is known to be locked. This will allow
LK_SHARED to be used for these cases, which happen to
be all the cases that can use LK_SHARED. This does not
fix any bug, but it reduces the number of calls to
VOP_ISLOCKED() and prepares the code so that it can be
switched to using LK_SHARED in a future patch.

Reviewed by:	kib
MFC after:	2 weeks

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Dec 24 20:24:07 2010 UTC (13 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +11 -16 lines
SVN rev 216692 on 2010-12-24 20:24:07Z by rmacklem

Simplify vnode locking in the expeimental NFS server's
readdir functions. In particular, get rid of two bogus
VOP_ISLOCKED() calls. Removing the VOP_ISLOCKED() calls
is the only actual bug fixed by this patch.

Reviewed by:	kib
MFC after:	2 weeks

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Dec 24 18:46:44 2010 UTC (13 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +10 -2 lines
SVN rev 216691 on 2010-12-24 18:46:44Z by rmacklem

Since VOP_READDIR() for ZFS does not return monotonically
increasing directory offset cookies, disable the UFS related
loop that skips over directory entries at the beginning of
the block for the experimental NFS server. This loop is
required for UFS since it always returns directory entries
starting at the beginning of the block that
the requested directory offset is in. In discussion with pjd@
and mckusick@ it seems that this behaviour of UFS should maybe
change, with this fix being an interim patch until then.
This patch only fixes the experimental server, since pjd@ is
working on a patch for the regular server.

Discussed with:	pjd, mckusick
MFC after:	5 days

Revision 1.15.2.13.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
Diff to: previous 1.15.2.13: preferred, colored
Changes since revision 1.15.2.13: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.15.2.13: download - view: text, markup, annotated - select for diffs
Wed Nov 3 22:17:42 2010 UTC (15 months ago) by rmacklem
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.15.2.12: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.12: +4 -6 lines
SVN rev 214763 on 2010-11-03 22:17:42Z by rmacklem

MFC: r214255
Modify the experimental NFSv4 server's file handle hash function
to use the generic hash32_buf() function. Although adding the
bytes seemed sufficient for UFS and ZFS, since most of the bytes
are the same for file handles on the same volume, this might not
be sufficient for other file systems. Use of a generic function
also seems preferable to one specific to NFSv4.

Revision 1.15.2.12: download - view: text, markup, annotated - select for diffs
Mon Nov 1 02:21:35 2010 UTC (15 months, 1 week ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.11: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.11: +15 -0 lines
SVN rev 214616 on 2010-11-01 02:21:35Z by rmacklem

MFC: r214224
Modify the file handle hash function in the experimental NFS
server so that it will work better for non-UFS file systems.
The new function simply sums the bytes of the fh_fid field
of fhandle_t.

Revision 1.15.2.11: download - view: text, markup, annotated - select for diffs
Mon Nov 1 01:55:15 2010 UTC (15 months, 1 week ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.10: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.10: +9 -1 lines
SVN rev 214614 on 2010-11-01 01:55:15Z by rmacklem

MFC: r214149
Modify the experimental NFS server in a manner analagous to
r214049 for the regular NFS server, so that it will not do
a VOP_LOOKUP() of ".." when at the root of a file system
when performing a ReaddirPlus RPC.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Oct 23 22:28:29 2010 UTC (15 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -6 lines
SVN rev 214255 on 2010-10-23 22:28:29Z by rmacklem

Modify the experimental NFSv4 server's file handle hash function
to use the generic hash32_buf() function. Although adding the
bytes seemed sufficient for UFS and ZFS, since most of the bytes
are the same for file handles on the same volume, this might not
be sufficient for other file systems. Use of a generic function
also seems preferable to one specific to NFSv4.

Suggested by:	gleb.kurtsou at gmail.com
MFC after:	10 days

Revision 1.26: download - view: text, markup, annotated - select for diffs
Fri Oct 22 21:38:56 2010 UTC (15 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +15 -0 lines
SVN rev 214224 on 2010-10-22 21:38:56Z by rmacklem

Modify the file handle hash function in the experimental NFS
server so that it will work better for non-UFS file systems.
The new function simply sums the bytes of the fh_fid field
of fhandle_t.

MFC after:	10 days

Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Oct 21 18:49:12 2010 UTC (15 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +9 -1 lines
SVN rev 214149 on 2010-10-21 18:49:12Z by rmacklem

Modify the experimental NFS server in a manner analagous to
r214049 for the regular NFS server, so that it will not do
a VOP_LOOKUP() of ".." when at the root of a file system
when performing a ReaddirPlus RPC.

MFC after:	10 days

Revision 1.15.2.10: download - view: text, markup, annotated - select for diffs
Mon Sep 27 02:44:30 2010 UTC (16 months, 1 week ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.9: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.9: +7 -3 lines
SVN rev 213192 on 2010-09-27 02:44:30Z by rmacklem

MFC: r212833
Fix the experimental NFSv4 server so that it performs local VOP_ADVLOCK()
unlock operations correctly. It was passing in F_SETLK instead of
F_UNLCK as the operation for the unlock case. This only affected
operation when local locking (vfs.newnfs.enable_locallocks=1) was enabled.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun Sep 19 01:05:19 2010 UTC (16 months, 3 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +7 -3 lines
SVN rev 212833 on 2010-09-19 01:05:19Z by rmacklem

Fix the experimental NFSv4 server so that it performs local VOP_ADVLOCK()
unlock operations correctly. It was passing in F_SETLK instead of
F_UNLCK as the operation for the unlock case. This only affected
operation when local locking (vfs.newnfs.enable_locallocks=1) was enabled.

MFC after:	1 week

Revision 1.15.2.9: download - view: text, markup, annotated - select for diffs
Tue Jun 22 01:30:46 2010 UTC (19 months, 2 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.8: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.8: +2 -0 lines
SVN rev 209409 on 2010-06-22 01:30:46Z by rmacklem

MFC: r209191
Add MODULE_DEPEND() macros to the experimental NFS client and
server so that the modules will load when kernels are built with
none of the NFS* configuration options specified. I believe this
resolves the problems reported by PR kern/144458 and the email on
freebsd-stable@ posted by Dmitry Pryanishnikov on June 13.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Jun 15 00:25:04 2010 UTC (19 months, 3 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -0 lines
SVN rev 209191 on 2010-06-15 00:25:04Z by rmacklem

Add MODULE_DEPEND() macros to the experimental NFS client and
server so that the modules will load when kernels are built with
none of the NFS* configuration options specified. I believe this
resolves the problems reported by PR kern/144458 and the email on
freebsd-stable@ posted by Dmitry Pryanishnikov on June 13.

Tested by:	kib
PR:		kern/144458
Reviewed by:	kib
MFC after:	1 week

Revision 1.15.2.8.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.15.2.8: preferred, colored; next MAIN 1.15.2.9: preferred, colored
Changes since revision 1.15.2.8: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.15.2.8: download - view: text, markup, annotated - select for diffs
Thu Jun 3 09:15:52 2010 UTC (20 months, 1 week ago) by rwatson
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.15.2.7: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.7: +11 -12 lines
SVN rev 208769 on 2010-06-03 09:15:52Z by rwatson

Merge r205010 from head to stable/8:

  Update nfsrv_getsocksndseq() for changes in TCP internals since FreeBSD 6.x:

  - so_pcb is now guaranteed to be non-NULL and valid if a valid socket
    reference is held.

  - Need to check INP_TIMEWAIT and INP_DROPPED before assuming inp_ppcb is a
    tcpcb, as it might be a tcptw or NULL otherwise.

  - tp can never be NULL by the end of the function, so only check
    TCPS_ESTABLISHED before extracting tcpcb fields.

  The NFS server arguably incorporates too many assumptions about TCP
  internals, but fixing that is left for another day.

  Reviewed by:		bz
  Reviewed and tested by:	rmacklem
  Sponsored by:		Juniper Networks

Approved by:	re (kib)

Revision 1.15.2.7: download - view: text, markup, annotated - select for diffs
Sun Apr 18 22:51:15 2010 UTC (21 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.6: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.6: +11 -12 lines
SVN rev 206821 on 2010-04-18 22:51:15Z by rmacklem

MFC: r206170
Harden the experimental NFS server a little, by adding extra checks
in the readdir functions for non-positive byte count arguments.
For the negative case, set it to the maximum allowable, since it
was actually a large positive value (unsigned) on the wire.
Also, fix up the readdir function comment a bit.

Revision 1.15.2.6: download - view: text, markup, annotated - select for diffs
Fri Apr 16 02:16:58 2010 UTC (21 months, 3 weeks ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.5: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.5: +1 -0 lines
SVN rev 206694 on 2010-04-16 02:16:58Z by rmacklem

MFC: r206063
For the experimental NFS server, add a call to free the lookup
path buffer for one case where it was missing when doing mkdir.
This could have conceivably resulted in a leak of a buffer, but
a leak was never observed during testing, so I suspect it would
have occurred rarely, if ever, in practice.

Revision 1.15.2.5: download - view: text, markup, annotated - select for diffs
Fri Apr 9 01:33:12 2010 UTC (22 months ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.4: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.4: +3 -0 lines
SVN rev 206407 on 2010-04-09 01:33:12Z by rmacklem

MFC: r205663
Patch the experimental NFS server in a manner analagous to r205661
for the regular NFS server, to ensure that ESTALE is
returned to the client for all errors returned by VFS_FHTOVP().

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Apr 4 23:19:11 2010 UTC (22 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +11 -12 lines
SVN rev 206170 on 2010-04-04 23:19:11Z by rmacklem

Harden the experimental NFS server a little, by adding extra checks
in the readdir functions for non-positive byte count arguments.
For the negative case, set it to the maximum allowable, since it
was actually a large positive value (unsigned) on the wire.
Also, fix up the readdir function comment a bit.

Suggested by:	dillon AT apollo.backplane.com
MFC after:	2 weeks

Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Apr 2 02:19:28 2010 UTC (22 months, 1 week ago) by rmacklem
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -0 lines
SVN rev 206063 on 2010-04-02 02:19:28Z by rmacklem

For the experimental NFS server, add a call to free the lookup
path buffer for one case where it was missing when doing mkdir.
This could have conceivably resulted in a leak of a buffer, but
a leak was never observed during testing, so I suspect it would
have occurred rarely, if ever, in practice.

MFC after:	2 weeks

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Mar 26 01:35:19 2010 UTC (22 months, 2 weeks ago) by rmacklem
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -0 lines
SVN rev 205663 on 2010-03-26 01:35:19Z by rmacklem

Patch the experimental NFS server in a manner analagous to r205661
for the regular NFS server, to ensure that ESTALE is
returned to the client for all errors returned by VFS_FHTOVP().

MFC after:	2 weeks

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Mar 11 11:33:04 2010 UTC (23 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +11 -12 lines
SVN rev 205010 on 2010-03-11 11:33:04Z by rwatson

Update nfsrv_getsocksndseq() for changes in TCP internals since FreeBSD 6.x:

- so_pcb is now guaranteed to be non-NULL and valid if a valid socket
  reference is held.

- Need to check INP_TIMEWAIT and INP_DROPPED before assuming inp_ppcb is a
  tcpcb, as it might be a tcptw or NULL otherwise.

- tp can never be NULL by the end of the function, so only check
  TCPS_ESTABLISHED before extracting tcpcb fields.

The NFS server arguably incorporates too many assumptions about TCP
internals, but fixing that is left for nother day.

MFC after:		1 week
Reviewed by:		bz
Reviewed and tested by:	rmacklem
Sponsored by:		Juniper Networks

Revision 1.15.2.4: download - view: text, markup, annotated - select for diffs
Fri Jan 8 20:25:59 2010 UTC (2 years, 1 month ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.3: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.3: +33 -40 lines
SVN rev 201819 on 2010-01-08 20:25:59Z by rmacklem

MFC: r200999
Modify the experimental server so that it uses VOP_ACCESSX().
This is necessary in order to enable NFSv4 ACL support. The
argument to nfsvno_accchk() was changed to an accmode_t and
the function nfsrv_aclaccess() was no longer needed and,
therefore, deleted.

Reviewed by:	trasz

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Dec 25 20:44:19 2009 UTC (2 years, 1 month ago) by rmacklem
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +33 -40 lines
SVN rev 200999 on 2009-12-25 20:44:19Z by rmacklem

Modify the experimental server so that it uses VOP_ACCESSX().
This is necessary in order to enable NFSv4 ACL support. The
argument to nfsvno_accchk() was changed to an accmode_t and
the function nfsrv_aclaccess() was no longer needed and,
therefore, deleted.

Reviewed by:	trasz
MFC after:	2 weeks

Revision 1.15.2.3: download - view: text, markup, annotated - select for diffs
Tue Dec 8 22:41:37 2009 UTC (2 years, 2 months ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.2: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.2: +44 -38 lines
SVN rev 200281 on 2009-12-08 22:41:37Z by rmacklem

MFC: r199715
Modify the experimental nfs server so that it falls back to
using VOP_LOOKUP() when VFS_VGET() returns EOPNOTSUPP in the
ReaddirPlus RPC. This patch is based upon one by pjd@ for the
regular nfs server which has not yet been committed. It is needed
when a ZFS volume is exported and ReaddirPlus (which almost
always happens for NFSv4) is performed by a client. The patch
also simplifies vnode lock handling somewhat.

Tested by:	gerrit at pmp.uni-hannover.de

Revision 1.15.2.2: download - view: text, markup, annotated - select for diffs
Tue Dec 8 22:28:55 2009 UTC (2 years, 2 months ago) by rmacklem
Branches: RELENG_8
Diff to: previous 1.15.2.1: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.1: +6 -7 lines
SVN rev 200277 on 2009-12-08 22:28:55Z by rmacklem

MFC: r199616
Patch the experimental NFS server is a manner analagous to
r197525, so that the creation verifier is handled correctly
in va_atime for 64bit architectures. There were two problems.
One was that the code incorrectly assumed that
sizeof (struct timespec) == 8 and the other was that the tv_sec
field needs to be assigned from a signed 32bit integer, so that
sign extension occurs on 64bit architectures. This is required
for correct operation when exporting ZFS volumes.

Tested by:	gerrit at pmp.uni-hannover.de
Reviewed by:	pjd

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Nov 23 16:08:15 2009 UTC (2 years, 2 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +44 -38 lines
SVN rev 199715 on 2009-11-23 16:08:15Z by rmacklem

Modify the experimental nfs server so that it falls back to
using VOP_LOOKUP() when VFS_VGET() returns EOPNOTSUPP in the
ReaddirPlus RPC. This patch is based upon one by pjd@ for the
regular nfs server which has not yet been committed. It is needed
when a ZFS volume is exported and ReaddirPlus (which almost
always happens for NFSv4) is performed by a client. The patch
also simplifies vnode lock handling somewhat.

MFC after:	2 weeks

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Nov 20 21:21:13 2009 UTC (2 years, 2 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +6 -7 lines
SVN rev 199616 on 2009-11-20 21:21:13Z by rmacklem

Patch the experimental NFS server is a manner analagous to
r197525, so that the creation verifier is handled correctly
in va_atime for 64bit architectures. There were two problems.
One was that the code incorrectly assumed that
sizeof (struct timespec) == 8 and the other was that the tv_sec
field needs to be assigned from a signed 32bit integer, so that
sign extension occurs on 64bit architectures. This is required
for correct operation when exporting ZFS volumes.

Reviewed by:	pjd
MFC after:	2 weeks

Revision 1.15.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.15.2.1: preferred, colored; next MAIN 1.15.2.2: preferred, colored
Changes since revision 1.15.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Jul 14 22:48:30 2009 UTC (2 years, 6 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +0 -1 lines
SVN rev 195699 on 2009-07-14 22:48:30Z by rwatson

Build on Jeff Roberson's linker-set based dynamic per-CPU allocator
(DPCPU), as suggested by Peter Wemm, and implement a new per-virtual
network stack memory allocator.  Modify vnet to use the allocator
instead of monolithic global container structures (vinet, ...).  This
change solves many binary compatibility problems associated with
VIMAGE, and restores ELF symbols for virtualized global variables.

Each virtualized global variable exists as a "reference copy", and also
once per virtual network stack.  Virtualized global variables are
tagged at compile-time, placing the in a special linker set, which is
loaded into a contiguous region of kernel memory.  Virtualized global
variables in the base kernel are linked as normal, but those in modules
are copied and relocated to a reserved portion of the kernel's vnet
region with the help of a the kernel linker.

Virtualized global variables exist in per-vnet memory set up when the
network stack instance is created, and are initialized statically from
the reference copy.  Run-time access occurs via an accessor macro, which
converts from the current vnet and requested symbol to a per-vnet
address.  When "options VIMAGE" is not compiled into the kernel, normal
global ELF symbols will be used instead and indirection is avoided.

This change restores static initialization for network stack global
variables, restores support for non-global symbols and types, eliminates
the need for many subsystem constructors, eliminates large per-subsystem
structures that caused many binary compatibility issues both for
monitoring applications (netstat) and kernel modules, removes the
per-function INIT_VNET_*() macros throughout the stack, eliminates the
need for vnet_symmap ksym(2) munging, and eliminates duplicate
definitions of virtualized globals under VIMAGE_GLOBALS.

Bump __FreeBSD_version and update UPDATING.

Portions submitted by:  bz
Reviewed by:            bz, zec
Discussed with:         gnn, jamie, jeff, jhb, julian, sam
Suggested by:           peter
Approved by:            re (kensmith)

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Jun 19 17:10:35 2009 UTC (2 years, 7 months ago) by brooks
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -4 lines
SVN rev 194498 on 2009-06-19 17:10:35Z by brooks

Rework the credential code to support larger values of NGROUPS and
NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024
and 1023 respectively.  (Previously they were equal, but under a close
reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it
is the number of supplemental groups, not total number of groups.)

The bulk of the change consists of converting the struct ucred member
cr_groups from a static array to a pointer.  Do the equivalent in
kinfo_proc.

Introduce new interfaces crcopysafe() and crsetgroups() for duplicating
a process credential before modifying it and for setting group lists
respectively.  Both interfaces take care for the details of allocating
groups array. crsetgroups() takes care of truncating the group list
to the current maximum (NGROUPS) if necessary.  In the future,
crsetgroups() may be responsible for insuring invariants such as sorting
the supplemental groups to allow groupmember() to be implemented as a
binary search.

Because we can not change struct xucred without breaking application
ABIs, we leave it alone and introduce a new XU_NGROUPS value which is
always 16 and is to be used or NGRPS as appropriate for things such as
NFS which need to use no more than 16 groups.  When feasible, truncate
the group list rather than generating an error.

Minor changes:
  - Reduce the number of hand rolled versions of groupmember().
  - Do not assign to both cr_gid and cr_groups[0].
  - Modify ipfw to cache ucreds instead of part of their contents since
    they are immutable once referenced by more than one entity.

Submitted by:	Isilon Systems (initial implementation)
X-MFC after:	never
PR:		bin/113398 kern/133867

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun May 31 11:57:51 2009 UTC (2 years, 8 months ago) by zec
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -0 lines
SVN rev 193162 on 2009-05-31 11:57:51Z by zec

Unbreak options VIMAGE kernel builds.

Approved by:	julian (mentor)

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue May 26 22:21:53 2009 UTC (2 years, 8 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +5 -1 lines
SVN rev 192861 on 2009-05-26 22:21:53Z by rmacklem

Fix the experimental nfs subsystem so that it builds with the
current NFSv4 ACLs, as defined in sys/acl.h. It still needs a
way to test a mount point for NFSv4 ACL support before it will
work. Until then, the NFSHASNFS4ACL() macro just always returns 0.

Approved by:	kib (mentor)

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri May 22 01:15:07 2009 UTC (2 years, 8 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +1 -0 lines
SVN rev 192574 on 2009-05-22 01:15:07Z by rmacklem

Fix the experimental nfs server so that it depends on the nlm,
since it now calls nlm_acquire_next_sysid().

Approved by:	kib (mentor)

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu May 21 01:50:27 2009 UTC (2 years, 8 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +9 -2 lines
SVN rev 192503 on 2009-05-21 01:50:27Z by rmacklem

Modify sys/fs/nfsserver/nfs_nfsdport.c to use nlm_acquire_next_sysid()
to set the l_sysid for locks correctly.

Approved by:	kib (mentor)

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun May 17 19:33:48 2009 UTC (2 years, 8 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +28 -11 lines
SVN rev 192256 on 2009-05-17 19:33:48Z by rmacklem

Fix the acquisition of local locks via VOP_ADVLOCK() by the
experimental nfsv4 server. It was setting the a_id argument
to a fixed value, but that wasn't sufficient for FreeBSD8.
Instead, set l_pid and l_sysid to 0 plus set the F_REMOTE
flag to indicate that these fields are used to check for
same lock owner. Since, for NFSv4, a lockowner is a ClientID plus
an up to 1024byte name, it can't be put in l_sysid easily.
I also renamed the p variable to td, since it's a thread ptr.

Approved by:	kib (mentor)

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun May 17 17:54:01 2009 UTC (2 years, 8 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +14 -6 lines
SVN rev 192255 on 2009-05-17 17:54:01Z by rmacklem

Added a SYSCTL to sys/fs/nfsserver/nfs_nfsdport.c so that the value of
nfsrv_dolocallocks can be changed via sysctl. I also added some non-empty
descriptor strings and reformatted some overly long lines.

Approved by:	kib (mentor)

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu May 14 21:39:08 2009 UTC (2 years, 8 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +90 -34 lines
SVN rev 192121 on 2009-05-14 21:39:08Z by rmacklem

Apply changes to the experimental nfs server so that it uses the security
flavors as exported in FreeBSD-CURRENT. This allows it to use a
slightly modified mountd.c instead of a different utility.

Approved by:	kib (mentor)

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue May 12 16:04:51 2009 UTC (2 years, 8 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +11 -4 lines
SVN rev 192017 on 2009-05-12 16:04:51Z by rmacklem

Modify the experimental nfs server to use the new nfsd_nfsd_args
structure for nfsd. Includes a change that clarifies the use of
an empty principal name string to indicate AUTH_SYS only.

Approved by:	kib (mentor)

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon May 11 19:37:05 2009 UTC (2 years, 9 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -1 lines
SVN rev 192000 on 2009-05-11 19:37:05Z by rmacklem

	Change the name of the nfs server addsock structure from nfsd_args
	to nfsd_addsock_args, so that it is consistent with the one in
	sys/nfsserver/nfs.h.

Approved by:	kib (mentor)

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon May 11 18:45:04 2009 UTC (2 years, 9 months ago) by rmacklem
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -0 lines
SVN rev 191998 on 2009-05-11 18:45:04Z by rmacklem

	Modify nfsvno_fhtovp() to ensure that it always sets the credp
	argument. Returning without credp set could result in a caller
	doing crfree() on garbage.

Reviewed by:	kan
Approved by:	kib (mentor)

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon May 11 15:33:26 2009 UTC (2 years, 9 months ago) by attilio
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -5 lines
SVN rev 191990 on 2009-05-11 15:33:26Z by attilio

Remove the thread argument from the FSD (File-System Dependent) parts of
the VFS.  Now all the VFS_* functions and relating parts don't want the
context as long as it always refers to curthread.

In some points, in particular when dealing with VOPs and functions living
in the same namespace (eg. vflush) which still need to be converted,
pass curthread explicitly in order to retain the old behaviour.
Such loose ends will be fixed ASAP.

While here fix a bug: now, UFS_EXTATTR can be compiled alone without the
UFS_EXTATTR_AUTOSTART option.

VFS KPI is heavilly changed by this commit so thirdy parts modules needs
to be recompiled.  Bump __FreeBSD_version in order to signal such
situation.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat May 9 18:09:17 2009 UTC (2 years, 9 months ago) by kan
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -10 lines
SVN rev 191940 on 2009-05-09 18:09:17Z by kan

Do not embed struct ucred into larger netcred parent structures.

Credential might need to hang around longer than its parent and be used
outside of mnt_explock scope controlling netcred lifetime. Use separate
reference-counted ucred allocated separately instead.

While there, extend mnt_explock coverage in vfs_stdexpcheck and clean-up
some unused declarations in new NFS code.

Reported by:	John Hickey
PR:		kern/133439
Reviewed by:	dfr, kib

Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon May 4 15:23:58 2009 UTC (2 years, 9 months ago) by rmacklem
Branches: MAIN
SVN rev 191783 on 2009-05-04 15:23:58Z by rmacklem

	Add the experimental nfs subtree to the kernel, that includes
	support for NFSv4 as well as NFSv2 and 3.
	It lives in 3 subdirs under sys/fs:
	nfs - functions that are common to the client and server
	nfsclient - a mutation of sys/nfsclient that call generic functions
	to do RPCs and handle state. As such, it retains the
	buffer cache handling characteristics and vnode semantics that
	are found in sys/nfsclient, for the most part.
	nfsserver - the server. It includes a DRC designed specifically for
	NFSv4, that is used instead of the generic DRC in sys/rpc.
	The build glue will be checked in later, so at this point, it
	consists of 3 new subdirs that should not affect kernel building.

Approved by:	kib (mentor)

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