summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
Commit message (Collapse)AuthorAgeFilesLines
* FIx for a bug in the change that made nfs_timer() MPSAFE. We need tops2005-07-271-0/+2
| | | | | | | grab Giant before calling pru_send() (if running with mpsafenet = 0). Found by: Jeremie Le Hen. Fixed by: Maxime Henrion
* In nfs_nget() if two threads race on the same filehandle, the loser shouldps2005-07-271-1/+2
| | | | | | | | cause the nfsnode to get freed. This fixes a potential vnode (and nfsnode) leak in that path. Submitted by: Mohan Srinivasan Reviewed by: phk
* Remove the NFS client rslock. The rslock was used to serializeps2005-07-213-114/+2
| | | | | | | | | | | writers that want to extend the file. It was also used to serialize readers that might want to read the last block of the file (with a writer extending the file). Now that we support vnode locking for NFS, the rslock is unnecessary. Writers grab the exclusive vnode lock before writing and readers grab the shared (or in some cases the exclusive) lock. Submitted by: Mohan Srinivasan
* Make nfs_timer() MPSAFE. With this change, the bottom half of the NFSps2005-07-193-12/+23
| | | | | | | client (the interface with the protocol stack and callouts) is Giant-free. Submitted by: Mohan Srinivasan.
* Fix for a NFS soft mounts bug where if the number of retries exceedsps2005-07-181-1/+2
| | | | | | | | the max rexmits, the request was not being bounced back with a ETIMEDOUT error. Reported by: Oliver Lehmann Submitted by: Mohan Srinivasan
* Fixes for NFS crashes on architectures that require strict alignment.ps2005-07-141-1/+2
| | | | | | | | | | - 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
* Ifdef out the incomplete non-blocking IO implementation for NFSgreen2005-06-161-0/+2
| | | | | | | | pending discussion of how implementation would proceed. Applications like -lc_r expect select(3) to match the EAGAIN-status of IO functions. Approved by: re
* Fix a serious deadlock with the NFS client. Given a large enoughgreen2005-06-104-2/+77
| | | | | | | | | | | | | | | | | | | | | | | | atomic write request, it can fill the buffer cache with the entirety of that write in order to handle retries. However, it never drops the vnode lock, or else it wouldn't be atomic, so it ends up waiting indefinitely for more buf memory that cannot be gotten as it has it all, and it waits in an uncancellable state. To fix this, hibufspace is exported and scaled to a reasonable fraction. This is used as the limit of how much of an atomic write request by the NFS client will be handled asynchronously. If the request is larger than this, it will be turned into a synchronous request which won't deadlock the system. It's possible this value is far off from what is required by some, so it shall be tunable as soon as mount_nfs(8) learns of the new field. The slowdown between an asynchronous and a synchronous write on NFS appears to be on the order of 2x-4x. General nod by: gad MFC after: 2 weeks More testing: wes PR: kern/79208
* Ugh. Previous commit got the logic exactly backward.des2005-05-171-2/+2
| | | | | Submitted by: bland Pointy hat to: des
* Revision 1.173 broke updating a mount from ro to rw. Fix that by clearingdes2005-05-171-1/+11
| | | | | | the MNT_RDONLY flag if MNT_UPDATE is set and "ro" was not specified. Suggested by: cognet
* set R_MUSTRESEND flag in mark_for_reconnect so re-connected requests getrees2005-05-101-12/+6
| | | | | | | | | | | re-sent instead of timing out. don't log an error message on reconnection, which is not an error. remove unused nfs_mrep_before_tsleep. Reviewed by: Mohan Srinivasan Approved by: alfred
* Fix a bug in NFS/TCP where retransmissions would not reliably happenps2005-05-041-3/+11
| | | | | | | if the server rebooted or tore down the connection for any reason. Found by: Jonathan Noack. Submitted by: Mohan Srinivasan.
* Don't copy the NFSMNT_* flags into struct statfs's f_flags field,iedowse2005-05-021-1/+0
| | | | | | | | | | | as they have no connection with the expected MNT_* flags. This bug was exposed 18 months ago when the assignments to f_flags in vfs_syscalls.c were moved to before the VFS_STATFS() call. It was fixed in the CSRG source 10 years ago, but we never picked up that change. PR: kern/80390 MFC after: 1 week
* When NFS was converted to the new mount syscall, code was written that setsdes2005-04-271-3/+1
| | | | | | | | | | | the MNT_RDONLY flag if the "ro" option was passed in from userland, and clears it otherwise. In the diskless case, the MNT_RDONLY flag is already set when this code is reached, but there are no mount options, so it was incorrectly cleared. Change the logic so the MNT_RDONLY flag is set if the "ro" option was specified, and left alone otherwise. Note that the NFS code will still happily let you mount a filesystem RW even if the server exports it RO. I'm not sure how to fix that.
* While I'm here, list the new kenv (boot.netif.name) along with the others.des2005-04-261-0/+1
|
* When netbooting, as soon as we've figured out which interface we booteddes2005-04-262-0/+3
| | | | from, store its name in a kenv variable.
* TCP reconnect is not an error.rees2005-04-181-3/+3
| | | | | | Change the message from LOG_ERR to LOG_INFO. Approved by: alfred
* - cache_lookup() relocks the parent in the DOTDOT case for us.jeff2005-04-141-2/+0
| | | | | Spotted by: phk Sponsored by: Isilon Systems, Inc.
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-3/+2
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* - LK_NOPAUSE is a nop now.jeff2005-03-311-1/+1
| | | | Sponsored by: Isilon Systems, Inc.
* - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.cjeff2005-03-291-3/+2
| | | | | prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT.
* - cache_lookup() now locks the new vnode for us to prevent some races.jeff2005-03-291-38/+18
| | | | | | Remove redundant code. Sponsored by: Isilon Systems, Inc.
* - We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.jeff2005-03-281-45/+10
| | | | | | | | | | | - Network filesystems are written with a special idiom that checks the cache first, and may even unlock dvp before discovering that a network round-trip is required to resolve the name. I believe dvp is prevented from being recycled even in the forced unmount case by the shared lock on the mount point. If not, this code should grow checks for VI_DOOMED after it relocks dvp or it will access NULL v_data fields. Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-241-1/+1
| | | | | | | | these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem. Sponsored by: Isilon Systems, Inc.
* - The NFS client was incorrectly masking SIGSTOP (which isps2005-03-231-19/+6
| | | | | | | | | | | non-maskable). - The NFS client needs to guard against spurious wakeups while waiting for the response. ltrace causes the process under question to wakeup (possibly from ptrace()), which causes NFS to wakeup from tsleep without the response being delivered. Submitted by: Mohan Srinivasan
* Don't brelse(bp) if bp is null. Also, eliminate some redundancydas2005-03-181-18/+5
| | | | | | and dead code. Found by: Coverity Prevent analysis tool
* Use vfs_hash.phk2005-03-162-155/+42
|
* MFp4: use the function to fix the packet header length instead of rollingjmg2005-03-161-7/+1
| | | | our own...
* - VOP_INACTIVE should no longer drop the vnode lock.jeff2005-03-131-1/+0
| | | | Sponsored by: Isilon Systems, Inc.
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-132-2/+2
| | | | | | the filesystem. Check that rather than VI_XLOCK. Sponsored by: Isilon Systems, Inc.
* - It is no longer necessary to lock and unlock the vnode in nfs_close() asjeff2005-03-131-6/+1
| | | | | | the top level does this for us now. Sponsored by: Isilon Systems, Inc.
* Minor cleanup in nfs_request() and removal of a comment that doesn'tps2005-02-261-10/+1
| | | | | | reflect reality. Submitted by: Mohan Srinivasan
* vp->v_id is a private field for the vfs namecache and it is a big mistakephk2005-02-221-13/+9
| | | | | | | that NFS ever started using it. Long time ago I added the necessary vhold()/vdrop() calls to replace it, but forgot to remove the v_id code. Do it now.
* Try to unbreak the vnode locking around vop_reclaim() (based mostly onphk2005-02-191-0/+2
| | | | | | | | | patch from kan@). Pull bufobj_invalbuf() out of vinvalbuf() and make g_vfs call it on close. This is not yet a generally safe function, but for this very specific use it is safe. This solves the problem with buffers not being flushed by unmount or after failed mount attempts.
* Fix for a potential NFS client race where shared data is updated fromps2005-02-181-0/+4
| | | | | | base context as well as the socket callback. Submitted by: Mohan Srinivasan
* Drop Giant before calling kthread_exit().jhb2005-02-071-0/+1
|
* Style cleanup for O_DIRECT sysctl comment introduced in nfs_vnops.c:1.242.rwatson2005-01-291-8/+9
|
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Create a vnode_pager object when a file is opened.phk2005-01-241-0/+1
|
* Remove unused cred arg from nfs_vinvalbuf() and many bogus argumentsphk2005-01-244-21/+16
| | | | passed for it.
* Mostly back out rev 1.33 from quite some time ago, and the followup fixespeter2005-01-181-25/+11
| | | | | | | | | and tweaks. The code was actually quite broken because it discarded the upper bits of the 64 bit division. We only had a 50% chance of scaling up the blocksize for large NFS client mounts when it was needed. For 5.x and beyond, this was harmless because we could represent the result in either case. For 4.x this was a big problem though. (4.x also has a df(1) bug to compound the problem)
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-141-2/+2
|
* Include opt_bootp.h for BOOTP_NFSROOTbrian2005-01-121-0/+2
| | | | | | PR: 73183 Submitted by: Darrin Smith sdar at salseast dot org MFC after: 7 days
* Add BO_SYNC() and add a default which uses the secret vnode pointerphk2005-01-111-0/+1
| | | | and VOP_FSYNC() for now.
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-112-9/+9
| | | | | | | | | | | | | | | | | | I'm not sure why a credential was added to these in the first place, it is not used anywhere and it doesn't make much sense: The credentials for syncing a file (ability to write to the file) should be checked at the system call level. Credentials for syncing one or more filesystems ("none") should be checked at the system call level as well. If the filesystem implementation needs a particular credential to carry out the syncing it would logically have to the cached mount credential, or a credential cached along with any delayed write data. Discussed with: rwatson
* /* -> /*- for license, minor formatting changesimp2005-01-0716-16/+16
|
* If the NFS/TCP stream is out of sync between the client and server,ps2005-01-051-1/+1
| | | | | | | | and if the client (erroneously) reads the RPC length as 0 bytes, the client can loop around in the socket callback. Explicitly check for the length being 0 case and teardown/re-connect. Submitted by: Mohan Srinivasan
* Turn NFS directio off until the stability issues are resolved.ps2004-12-231-1/+1
|
* Change the NFS sillyrename convention so that we won't run outps2004-12-162-12/+18
| | | | | | | | | | | | of sillyrenames (which were limited to 58 per pid per directory, for no good reason). The new format of sillyrenames looks like .nfs.0000b31a.00d24.4 ^^^^^^^^ ^^^^^ ticks pid Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Obtained from: Yahoo!
* First cut of NFS direct IO support.ps2004-12-156-4/+228
| | | | | | | | | | | | | | - NFS direct IO completely bypasses the buffer and page caches. If a file is open for direct IO all caching is disabled. - Direct IO for Directories will be addressed later. - 2 new NFS directio related sysctls are added. One is a knob to disable NFS direct IO completely (direct IO is enabled by default). The other is to disallow mmaped IO on a file that has at least one O_DIRECT open (see the comment in nfs_vnops.c for more details). The default is to allow mmaps on a file that has O_DIRECT opens. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Obtained from: Yahoo!
OpenPOWER on IntegriCloud