summaryrefslogtreecommitdiffstats
path: root/sys/nfs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Remove __P.alfred2002-03-201-10/+10
|
* When the old nfsm_adv() macro was moved to nfsm_adv_xx(), a '>='iedowse2001-12-311-1/+1
| | | | | | | | | | | must have been inadvertently changed to '>'. This broke nfsm_adv() in the case where the advancement count is equal to the amount of data remaining in the current mbuf. Instead of moving the current position N bytes forward, nfs_adv() could end up moving it back to N bytes from the start of the mbuf data. This should fix the client-side readdirplus problems that have been reported since September.
* Avoid passing the variable `tl' to functions that just use it foriedowse2001-12-182-10/+10
| | | | | | | | | | | | | temporary storage. In the old NFS code it wasn't at all clear if the value of `tl' was used across or after macro calls, but I'm fairly confident that the convention was to keep its use local. Each ex-macro function now uses a local version of this variable, so all of the double-indirection goes away. The only exception to the `local use' rule for `tl' is nfsm_clget(), which is left unchanged by this commit. Reviewed by: peter
* Unwind some more macros. NFSMADV() was kinda silly since it was rightpeter2001-09-282-36/+42
| | | | | | | | | | next to equivalent m_len adjustments. Move the nfsm_subs.h macros into groups depending on which phase they are used in, since that affects the error recovery requirements. Collect some of the common error checking into a single macro as preparation for unwinding some more. Have nfs_rephead return a value instead of secretly modifying args. Remove some unused function arguments that were being passed around. Clarify nfsm_reply()'s error handling (I hope).
* Make nfsm_dissect() have an obvious return value.peter2001-09-272-33/+32
|
* Tidy up nfsm_build usage. This is only partially finished.peter2001-09-272-9/+8
|
* Oops, forgot to rm this last time.peter2001-09-261-564/+0
|
* Cleanup and split of nfs client and server code.peter2001-09-1827-25120/+133
| | | | This builds on the top of several repo-copies.
* nfs_strategy calls nfs_asyncio with td as NULL. So add a bandaid thatimp2001-09-181-1/+1
| | | | | | | | | | will pass NULL as the struct proc when td is NULL. This has stopped crashing on my machine. Note: The passing of NULL may be bogus, but I'll let others fix that problem. Reviewed by: jhb
* Sync some differences that were different between the copies of the filespeter2001-09-151-3/+3
| | | | that were in nfs/nfs.h and nfsserver/nfs.h in the p4 tree.
* KSE Milestone 2julian2001-09-1217-612/+621
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix some signed/unsigned integer confusion, and add bounds checking ofkris2001-09-101-4/+4
| | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks
* Pushdown Giant for nfs syscalls (nfssvc())dillon2001-08-311-12/+23
|
* Stupid error from my side in prev. commit: || -> &&ache2001-08-231-1/+1
|
* Implement l_len<0 per POSIX check.ache2001-08-231-4/+6
| | | | Check for valid l_whence too.
* Even better move: suppose that server is able to handle SEEK_END,ache2001-08-231-6/+6
| | | | | so check arguments for all but not SEEK_END case, leaving SEEK_END handling for server
* Apparently SEEK_END locking not supported by NFS. Previous variantache2001-08-231-1/+5
| | | | returns EINVAL in that case, change it to EOPNOTSUPP.
* Move <machine/*> after <sys/*>ache2001-08-231-1/+2
| | | | Pointed by: bde
* adv. lock:ache2001-08-231-5/+5
| | | | | detect off_t overflow _before_ it occurse and return EOVERFLOW instead of EINVAL
* Fix a client-side memory leak in nfs_flush(). The code allocatesiedowse2001-08-011-2/+2
| | | | | | | | | | | | | a temporary array to store struct buf pointers if the list doesn't fit in a local array. Usually it frees the array when finished, but if it jumps to the 'again' label and the new list does fit in the local array then it can forget to free a previously malloc'd M_TEMP memory. Move the free() up a line so that it frees any previously allocated memory whether or not it needs to malloc a new array. Reviewed by: dillon
* Check the filehandle size when mounting.peter2001-07-301-0/+2
| | | | Obtained from: Constantine Sapuntzakis <csapuntz@openbsd.org>
* - Sort includes.jhb2001-07-041-5/+10
| | | | - Update vmmeter statistics for vnode pagein/pageouts in getpages/putpages.
* With Alfred's permission, remove vm_mtx in favor of a fine-grained approachdillon2001-07-043-18/+12
| | | | | | | | | (this commit is just the first stage). Also add various GIANT_ macros to formalize the removal of Giant, making it easy to test in a more piecemeal fashion. These macros will allow us to test fine-grained locks to a degree before removing Giant, and also after, and to remove Giant in a piecemeal fashion via sysctl's on those subsystems which the authors believe can operate without Giant.
* - Protect the mnt_vnode list with the mntvnode lock.jhb2001-06-283-9/+24
| | | | - Use queue(9) macros.
* Unlock the process returned from pfind() if it does not return NULL.jake2001-06-011-1/+4
| | | | | | | | This fixes a witness lock violation for nfssvc returning with locks held. Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr> PR: kern/27776
OpenPOWER on IntegriCloud