summaryrefslogtreecommitdiffstats
path: root/sys/nfs
Commit message (Collapse)AuthorAgeFilesLines
* Move the NFS FHA (File Handle Affinity) code from sys/nfsserver token2013-04-172-0/+668
| | | | | | | | sys/nfs, since it is now shared by the two NFS servers. Suggested by: rmacklem Sponsored by: Spectra Logic MFC after: 2 weeks
* Use m_get() and m_getcl() instead of compat macros.glebius2013-03-151-2/+2
|
* Functions m_getm2() and m_get2() have different order of arguments,glebius2013-03-121-1/+1
| | | | | | | and that can drive someone crazy. While m_get2() is young and not documented yet, change its order of arguments to match m_getm2(). Sorry for churn, but better now than later.
* Use m_get2() to get mbuf of appropriate size.glebius2013-03-121-3/+1
| | | | Sponsored by: Nginx, Inc.
* Remove the unused nfs_curusec().jhb2013-01-172-10/+0
|
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-052-8/+8
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Add an nfssvc() option to the kernel for the new NFS clientrmacklem2012-12-022-2/+10
| | | | | | | | which dumps out the actual options being used by an NFS mount. This will be used to implement a "-m" option for nfsstat(1). Reviewed by: alfred MFC after: 2 weeks
* Add two new options to the nfssvc(2) syscall that allowrmacklem2012-10-142-1/+4
| | | | | | | | | | processes running as root to suspend/resume execution of the kernel nfsd threads. An earlier version of this patch was tested by Vincent Hoffman (vince at unsane.co.uk) and John Hickey (jh at deterlab.net). Reviewed by: kib MFC after: 2 weeks
* Revert previous commit...kevlo2012-10-101-1/+1
| | | | Pointyhat to: kevlo (myself)
* Prefer NULL over 0 for pointerskevlo2012-10-091-1/+1
|
* - Typo fixgonzo2012-08-161-3/+6
| | | | | | - style(9) fix Spotted by: kib@, Andrey Zonov
* Merge somewhat modified r230399 from projects/armv6:gonzo2012-08-161-0/+16
| | | | | | | | | | Add timeout to wait for network controllers to appear when netbooting. USB ethernet adapter initialization usually is delayed and they're not available immidiately after autoconfiguration. So we need to wait a bit before giving up Reviewed by: stas@
* Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:bz2012-02-171-4/+3
| | | | | | | | | | | | Extend the so far IPv4-only support for multiple routing tables (FIBs) introduced in r178888 to IPv6 providing feature parity. This includes an extended rtalloc(9) KPI for IPv6, the necessary adjustments to the network stack, and user land support as in netstat. Sponsored by: Cisco Systems, Inc. Reviewed by: melifaro (basically) MFC after: 10 days
* Some cleanup of BOOTP code. Initially I wanted to just change the ifioctl()glebius2011-12-131-236/+177
| | | | | | | | | | | | | usage, but end up with more changes. - Use SIOCAIFADDR instead of old rusty SIOCSIFADDR, SIOCSIFBRDADDR and SIOCSIFNETMASK. - Use queue(9) instead of hand made stailq. - Use one socket for all ifioctl() and send/receive operations. - Use __func__ instead of cut-n-paste in logging and panics. - Axe some dead or strange code. Tested by: gonzo, Stefan Bethke <stb lassitu.de>
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-2/+3
| | | | This means that their use is restricted to a single C file.
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-161-1/+1
| | | | | | | | | | | | | 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)
* Set proper root device name when legacy NFS client is compiled into kernel.gber2011-06-291-0/+4
| | | | Approved by: cognet (mentor)
* Change the sysctl naming for the old and new NFS clientsrmacklem2011-05-151-1/+1
| | | | | to vfs.oldnfs.xxx and vfs.nfs.xxx respectively. This makes the default nfs client use vfs.nfs.xxx after r221124.
* Move sys/nfsclient/nfs_kdtrace.h to sys/nfs/nfs_kdtrace.h sormacklem2011-05-061-0/+120
| | | | it can be used by the new NFS client as well as the old one.
* Modify the NFS nfssvc(2) syscall so that it allowsrmacklem2011-05-051-3/+6
| | | | | | anyone to get the statistics for the new NFS subsystem. MFC after: 2 weeks
* Add kernel support for NFSSVC_ZEROCLTSTATS and NFSSVC_ZEROSRVSTATSrmacklem2011-05-041-0/+2
| | | | | | | so that they can be used by nfsstat(1) to implement the "-z" option for the new NFS subsystem. MFC after: 2 weeks
* Revert r221306, since NFSSVC_ZEROSTATS zero'd both client andrmacklem2011-05-041-1/+0
| | | | | server stats, when separate modifiers for NFSSVC_GETSTATS for each of client and server stats is what it required by nfsstat(1).
* Implemented a mount option "nocto" that disables cache coherencyru2011-05-041-0/+2
| | | | | | | | checking at open time. It may improve performance for read-only NFS mounts. Use deliberately. MFC after: 1 week Reviewed by: rmacklem, jhb (earlier version)
* Add the kernel support needed to zero out the nfsstatsrmacklem2011-05-011-0/+1
| | | | | | | structure for the new NFS subsystem. This will be used by nfsstats.c to implement the "-z" option. MFC after: 2 weeks
* Fix the experimental NFS client so that it does not boguslyrmacklem2011-04-255-0/+2907
| | | | | | | | | | | | | | set the f_flags field of "struct statfs". This had the interesting effect of making the NFSv4 mounts "disappear" after r221014, since NFSMNT_NFSV4 and MNT_IGNORE became the same bit. Move the files used for a diskless NFS root from sys/nfsclient to sys/nfs in preparation for them to be used by both NFS clients. Also, move the declaration of the three global data structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c so that they are defined when either client uses them. Reviewed by: jhb MFC after: 2 weeks
* Modify the experimental NFSv4 server so that it posts a SIGUSR2rmacklem2011-01-142-1/+2
| | | | | | | | | | | 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
* Fix the nlm so that it no longer depends on the regularrmacklem2011-01-032-2/+5
| | | | | | | | nfs client and, as such, can be loaded for the experimental nfs client without the regular client. Reviewed by: jhb MFC after: 2 weeks
* Fix the type of the 3rd argument for nm_getinfo so that it worksrmacklem2010-10-191-1/+1
| | | | | | | for architectures like sparc64. Suggested by: kib MFC after: 2 weeks
* Modify the NFS clients and the NLM so that the NLM can be usedrmacklem2010-10-193-5/+60
| | | | | | | | | | | | | by both clients. Since the NLM uses various fields of the nfsmount structure, those fields were extracted and put in a separate nfs_mountcommon structure stored in sys/nfs/nfs_mountcommon.h. This structure also has a function pointer for a function that extracts the required information from the mount point and nfs vnode for that particular client, for information stored differently by the clients. Reviewed by: jhb MFC after: 2 weeks
* Move sys/nfsclient/nfs_lock.c into sys/nfs and build it as a separatermacklem2010-07-242-0/+486
| | | | | | | | | | | module that can be used by both the regular and experimental nfs clients. This fixes the problem reported by jh@ where /dev/nfslock would be registered twice when both nfs clients were used. I also defined the size of the lm_fh field to be the correct value, as it should be the maximum size of an NFSv3 file handle. Reviewed by: jh MFC after: 2 weeks
* Factor out the code shared between NFS client and server into its ownmarius2010-02-161-5/+15
| | | | | | | | module. With r203732 it became apparent that creating the sysctl nodes twice causes at least a warning, however the whole code shouldn't be present twice in the first place. Discussed with: rmacklem
* - Move nfs_realign() from the NFS client to the shared NFS code andmarius2010-02-092-0/+68
| | | | | | | | | | | | | | | | | remove the NFS server version in order to reduce code duplication. The shared version now uses a second parameter how, which is passed on to m_get(9) and m_getcl(9) as the server used M_WAIT while the client requires M_DONTWAIT, and replaces the the previously unused parameter hsiz. - Change nfs_realign() to use nfsm_aligned() so as with other NFS code the alignment check isn't actually performed on platforms without strict alignment requirements for performance reasons because as the comment suggests unaligned data only occasionally occurs with TCP. - Change fha_extract_info() to use nfs_realign() with M_DONTWAIT rather than M_WAIT because it's called with the RPC sp_lock held. Reviewed by: jhb, rmacklem MFC after: 1 week
* Some style(9) fixesmarius2010-02-092-22/+24
|
* Revert rev 192323 (nfs_common.c only):marcel2009-07-121-3/+2
| | | | | | | | | | | | | | | | | The D-cache flushing added here was to deal with I-cache incoherency observed on ia64. However, the problem was in the implementation of pmap_enter_object() for ia64: it was missing I-cache coherency logic for prefaulted pages. After this got added in rev 195625, testing showed that no D-cache flushing was required. The SIGILL that was observed on Book-E (see commit log for rev 192323) ended up not being related to I-cache incoherency, but was found to be caused by bad memory. This discovery further undermined the need for D-cache flushing in the NFS I/O code, triggering the reversal. Approved by: re (kensmith)
* Remove the old kernel RPC implementation and the NFS_LEGACYRPC option.dfr2009-06-302-109/+0
| | | | Approved by: re
* Replace AUDIT_ARG() with variable argument macros with a set more morerwatson2009-06-271-1/+1
| | | | | | | | | | | | | | specific macros for each audit argument type. This makes it easier to follow call-graphs, especially for automated analysis tools (such as fxr). In MFC, we should leave the existing AUDIT_ARG() macros as they may be used by third-party kernel modules. Suggested by: brooks Approved by: re (kib) Obtained from: TrustedBSD Project MFC after: 1 week
* Add cpu_flush_dcache() for use after non-DMA based I/O so that amarcel2009-05-181-2/+3
| | | | | | | | | | | | | | | | | | | | | possible future I-cache coherency operation can succeed. On ARM for example the L1 cache can be (is) virtually mapped, which means that any I/O that uses temporary mappings will not see the I-cache made coherent. On ia64 a similar behaviour has been observed. By flushing the D-cache, execution of binaries backed by md(4) and/or NFS work reliably. For Book-E (powerpc), execution over NFS exhibits SIGILL once in a while as well, though cpu_flush_dcache() hasn't been implemented yet. Doing an explicit D-cache flush as part of the non-DMA based I/O read operation eliminates the need to do it as part of the I-cache coherency operation itself and as such avoids pessimizing the DMA-based I/O read operations for which D-cache are already flushed/invalidated. It also allows future optimizations whereby the bcopy() followed by the D-cache flush can be integrated in a single operation, which could be implemented using on-chips DMA engines, by-passing the D-cache altogether.
* Adding sys/nfs/nfssvc.h and sys/nfs/nfs_nfssvc.c in preparation forrmacklem2009-04-072-0/+220
| | | | | | | | | | | sharing of the nfssvc() system call between nfsserver and the nfsv4 server. Building of nfs_nfssvc.c will be committed later, at the time the .c files in sys/nfsserver are updated. To do so now would result in nfssvc() multiply defined. Submitted by: rmacklem Reviewed by: dfr Approved by: kib (mentor)
* Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.ru2008-03-251-2/+2
| | | | | | | | | | Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true since the advent of MBUMA. Reviewed by: arch There are ongoing disputes as to whether we want to switch to directly using UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation.
* NFSv4 client:rees2006-11-281-15/+17
| | | | | Add support for va_birthtime Fix va_ctime to use TIME_METADATA, not TIME_CREATE
* Fixes for NFS crashes on architectures that require strict alignment.ps2005-07-142-3/+18
| | | | | | | | | | - Fix nfsm_disct() so that after pulling up data, the remaining data is aligned if necessary. - Fix nfs_clnt_tcp_soupcall() to bcopy() the rpc length out of the mbuf (instead of casting m_data to a uint32). Submitted by: Pyun YongHyeon Reviewed by: Mohan Srinivasan
* /* -> /*- for license, minor formatting changesimp2005-01-075-5/+5
|
* Add non-blocking versions of nfsm_dissect() and friends, for use fromps2004-12-062-4/+29
| | | | | | | | | socket callbacks or similar callers, from both the NFS client and the server. Instituted nfsm_dissect_nonblock(), nfsm_dissect_xx_nonblock(). And nfsm_disct() now takes an extra M_TRYWAIT/M_DONTWAIT argument. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
* Remove advertising clause from University of California Regent'simp2004-04-075-20/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* University of Michigan's Citi NFSv4 kernel client code.alfred2003-11-142-7/+296
| | | | Submitted by: Jim Rees <rees@umich.edu>
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Change iov_base's type from `char *' to the standard `void *'. Allmike2002-10-111-1/+2
| | | | | uses of iov_base which assume its type is `char *' (in order to do pointer arithmetic) have been updated to cast iov_base to `char *'.
* nfsnode.h was moved to ../nfsclient ages ago. I forgot to remove it here.peter2002-09-061-210/+0
|
* Remove unused include.jeff2002-03-201-1/+0
|
OpenPOWER on IntegriCloud