summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs
Commit message (Collapse)AuthorAgeFilesLines
* Modify the experimental server so that it uses VOP_ACCESSX().rmacklem2009-12-252-68/+2
| | | | | | | | | | 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
* Remove unneeded ifdefs.trasz2009-12-035-225/+5
| | | | Reviewed by: rmacklem
* Patch the experimental NFS server is a manner analagous tormacklem2009-11-201-2/+2
| | | | | | | | | | | | | 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
* Fix typo in the comment.trasz2009-09-301-1/+1
|
* Merge the remainder of kern_vimage.c and vimage.h into vnet.c andrwatson2009-08-011-1/+0
| | | | | | | | | | vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes. Reviewed by: bz Approved by: re (vimage blanket)
* Add changes to the experimental nfs client to use the PBDRY flag forrmacklem2009-07-221-0/+7
| | | | | | | | msleep(9) when a vnode lock or similar may be held. The changes are just a clone of the changes applied to the regular nfs client by r195703. Approved by: re (kensmith), kib (mentor)
* Build on Jeff Roberson's linker-set based dynamic per-CPU allocatorrwatson2009-07-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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)
* Add calls to the experimental nfs client for the case of an "intr" mount,rmacklem2009-07-121-1/+16
| | | | | | | so that signals that aren't supposed to terminate RPCs in progress are masked off during the RPC. Approved by: re (kensmith), kib (mentor)
* Since the nfscl_getclose() function both decremented open counts and,rmacklem2009-07-091-1/+3
| | | | | | | | | | | | | optionally, created a separate list of NFSv4 opens to be closed, it was possible for the associated OpenOwner to be free'd before the Open was closed. The problem was that the Open was taken off the OpenOwner list before the Close RPC was done and OpenOwners can be free'd once the list is empty. This patch separates out the case of doing the Close RPC into a separate function called nfscl_doclose() and simplifies nfsrpc_doclose() so that it closes a single open instead of a list of them. This avoids removing the Open from the OpenOwner list before doing the Close RPC. Approved by: re (kensmith), kib (mentor)
* Replace RPCAUTH_UNIXGIDS with NFS_MAXGRPS so that nfscbd.c will build.rmacklem2009-06-201-2/+2
| | | | Approved by: kib (mentor)
* Change the size of the nfsc_groups[] array in the experimental nfsrmacklem2009-06-201-4/+4
| | | | | | | | client to RPCAUTH_UNIXGIDS + 1 (17), since that is what can go on the wire for AUTH_SYS authentication. Reviewed by: brooks Approved by: kib (mentor)
* Rework the credential code to support larger values of NGROUPS andbrooks2009-06-191-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add the explicit include of vimage.h to another five .c files stillbz2009-06-171-0/+1
| | | | | | | missing it. Remove the "hidden" kernel only include of vimage.h from ip_var.h added with the very first Vimage commit r181803 to avoid further kernel poisoning.
* Remove the "int *" typecast for the aresid argument to vn_rdwr()rmacklem2009-06-161-1/+1
| | | | | | | | and change the type of the argument from size_t to int. This should avoid issues on 64bit architectures. Suggested by: kib Approved by: kib (mentor)
* Don't check MAC in the NFS server ACL set path, right now we aren'trwatson2009-06-051-4/+0
| | | | enforcing MAC for NFS clients.
* Place hostnames and similar information fully under the prison system.jamie2009-05-291-0/+1
| | | | | | | | | | | | | | | | | The system hostname is now stored in prison0, and the global variable "hostname" has been removed, as has the hostname_mtx mutex. Jails may have their own host information, or they may inherit it from the parent/system. The proper way to read the hostname is via getcredhostname(), which will copy either the hostname associated with the passed cred, or the system hostname if you pass NULL. The system hostname can still be accessed directly (and without locking) at prison0.pr_host, but that should be avoided where possible. The "similar information" referred to is domainname, hostid, and hostuuid, which have also become prison parameters and had their associated global variables removed. Approved by: bz (mentor)
* Add a function to the experimental nfs subsystem that tests to seermacklem2009-05-272-1/+24
| | | | | | | | if a local file system supports NFSv4 ACLs. This allows the NFSHASNFS4ACL() macro to be correctly implemented. The NFSv4 ACL support should now work when the server exports a ZFS volume. Approved by: kib (mentor)
* Fix the experimental nfs subsystem so that it builds with thermacklem2009-05-263-7/+5
| | | | | | | | 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)
* Adapt to the new ACL #define names.trasz2009-05-261-13/+13
| | | | Reviewed by: rmacklem@
* Fix the handling of NFSv4 Illegal Operation number to conformrmacklem2009-05-261-0/+3
| | | | | | | to RFC3530 (the operation number in the reply must be set to the value for OP_ILLEGAL). Also cleaned up some indentation. Approved by: kib (mentor)
* Temporarily #undef NFS4_ACL_EXTATTR_NAME, so that thermacklem2009-05-241-0/+2
| | | | | | | experimental nfs subsystem will build while the NFSv4 ACL support is going into the kernel. Approved by: kib (mentor)
* Crib the realign function out of nfs_krpc.c and add a callrmacklem2009-05-242-26/+40
| | | | | | | | to it for the client side reply. Hopefully this fixes the problem with using the new krpc for arm for the experimental nfs client. Approved by: kib (mentor)
* Fix the experimental nfsv4 client so that it works for thermacklem2009-05-241-12/+39
| | | | | | | | | | case of a kerberized mount without a host based principal name. This will only work for mounts being done by a user other than root. Support for a host based principal name will not work until proposed changes to the rpcsec_gss part of the krpc are committed. It now builds for "options KGSSAPI". Approved by: kib (mentor)
* Fix the rpc_gss_secfind() call in nfs_commonkrpc.c so thatrmacklem2009-05-231-1/+16
| | | | | | | | | | | the code will build when "options KGSSAPI" is specified without requiring the proposed changes that add host based initiator principal support. It will not handle the case where the client uses a host based initiator principal until those changes are committed. The code that uses those changes is #ifdef'd notyet until the krpc rpcsec_changes are committed. Approved by: kib (mentor)
* Fix the comment in sys/fs/nfs/nfs.h to correctly reflect thermacklem2009-05-221-1/+1
| | | | | | | current use of the R_xxx flags. This changed when the NFS_LEGACYRPC code was removed from the subsystem. Approved by: kib (mentor)
* Remove the unmaintained University of Michigan NFSv4 client from 8.xrwatson2009-05-222-2/+0
| | | | | | | prior to 8.0-RELEASE. Rick Macklem's new and more feature-rich NFSv234 client and server are replacing it. Discussed with: rmacklem
* Change the experimental NFSv4 client so that it does not dormacklem2009-05-181-3/+2
| | | | | | | | | the NFSv4 Close operations until ncl_inactive(). This is necessary so that the Open StateIDs are available for doing I/O on mmap'd files after VOP_CLOSE(). I also changed some indentation for the nfscl_getclose() function. Approved by: kib (mentor)
* Fixed the Null callback RPCs so that they work with the new krpc. Thisrmacklem2009-05-161-9/+10
| | | | | | | required two changes: setting the program and version numbers before connect and fixing the handling of the Null Rpc case in newnfs_request(). Approved by: kib (mentor)
* Move the nfsstat structure and proc/op number definitions on thermacklem2009-05-153-152/+177
| | | | | | | | | experimental nfs subsystem from sys/fs/nfs/nfs.h and sys/fs/nfs/nfsproto.h to sys/fs/nfs/nfsport.h and rename nfsstat to ext_nfsstat. This was done so that src/usr.bin/nfsstat.c could use it alongside the regular nfs include files and struct nfsstat. Approved by: kib (mentor)
* Apply changes to the experimental nfs server so that it uses the securityrmacklem2009-05-144-17/+11
| | | | | | | 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)
* Change the file names in the comments in sys/fs/nfs/nfs_var.h sormacklem2009-05-141-34/+30
| | | | | | | that they are the names used in FreeBSD-CURRENT. Also shuffled a few entries around, so that they under the correct comment. Approved by: kib (mentor)
* Change the name of the nfs server addsock structure from nfsd_argsrmacklem2009-05-111-1/+1
| | | | | | | to nfsd_addsock_args, so that it is consistent with the one in sys/nfsserver/nfs.h. Approved by: kib (mentor)
* Remove the thread argument from the FSD (File-System Dependent) parts ofattilio2009-05-112-9/+9
| | | | | | | | | | | | | | | | | 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.
* Do not embed struct ucred into larger netcred parent structures.kan2009-05-091-10/+0
| | | | | | | | | | | | | 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
* Add the experimental nfs subtree to the kernel, that includesrmacklem2009-05-0418-0/+10031
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)
OpenPOWER on IntegriCloud