summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
Commit message (Collapse)AuthorAgeFilesLines
* Add O_NONBLOCK to the vn_open_cred() flags for NFS client locking whenrwatson2003-03-261-3/+13
| | | | | | | | | | | | | | | opening the POSIX fifo; convert ENXIO error returns to EOPNOTSUPP. This improves handling of the case where the /var/run/lock fifo exists but there is no listener: we immediately return EOPNOTSUPP rather than blocking until a listener turns up. This could occur during a diskless boot before rpc.lockd is loaded, or if the lock file persists across a reboot following the disabling of rpc.lockd. This may have suddenly started to occur due to fifo blocking fixes--previously it looks like attempts to read on a fifo with no listener would time out due to insufficient resources. Reviewed by: alfred
* req can not be NULL or we'd die.alfred2003-03-261-6/+3
| | | | Sponsored by: RED
* Map VAPPEND to VWRITE in nfsspec_access() - VAPPEND is never set in thetjr2003-03-211-0/+7
| | | | | mode returned by VOP_GETATTR. This fixes incorrect "Permission denied" errors when trying to append to a file on an NFSv2 mount.
* - Add a forgotten BUF_LOCK()jeff2003-03-141-0/+1
| | | | Most sincere apologies to: jake
* - Lock the buf before inspecting its contents.jeff2003-03-131-6/+4
|
* - Add a new 'flags' parameter to getblk().jeff2003-03-041-3/+3
| | | | | | | | | | - Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT flag to the initial BUF_LOCK(). This will eventually be used in cases were we want to use a buffer only if it is not currently in use. - Convert all consumers of the getblk() api to use this extra parameter. Reviwed by: arch Not objected to by: mckusick
* Finish cleanup of vprint() which was begun with changing v_tag to a string.njl2003-03-031-2/+2
| | | | | | Remove extraneous uses of vop_null, instead defering to the default op. Rename vnode type "vfs" to the more descriptive "syncer". Fix formatting for various filesystems that use vop_print.
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-023-13/+13
|
* - The interlock was not being droped in nfs_flush() if the first part ofjeff2003-02-261-2/+5
| | | | | | | | an if clause was true. Break the two clauses out into seperate statements since they require different actions. Reported/Tested by: jake Spotted by: jhb
* - Properly handle the vnode interlock in nfs_fsync.jeff2003-02-251-1/+1
| | | | Reported by: phk
* - Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.jeff2003-02-251-9/+9
| | | | | | | | | | - Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking bufs on the clean/dirty queues. This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another BUF_LOCK with a LK_TIMEFAIL to a single lock. Reviewed by: arch, mckusick
* Back out M_* changes, per decision of the TRB.imp2003-02-198-33/+33
| | | | Approved by: trb
* Get rid of a silly message I added back in Sept 2001 (1.68).peter2003-02-181-4/+1
|
* Lock proc while accessing p_siglist, p_sigmask and p_sigignoretjr2003-02-151-1/+5
| | | | in nfs_sigintr().
* Provide a sysctl to allow defaulting of the connectionless (-c) featuredillon2003-01-221-0/+15
| | | | | | | | to mount_nfs. The sysctl defaults to 1 (paranoid mode). Setting it to 0 will allow an NFS client to receive replies on a different IP then they were sent to by default. Submitted by: Sean Eric Fagan <sef@kithrup.com>
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-218-33/+33
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Since Jeffr made the std* functions the default in rev 1.63 ofphk2003-01-041-6/+0
| | | | | | | kern/vfs_defaults.c it is wrong for the individual filesystems to use the std* functions as that prevents override of the default. Found by: src/tools/tools/vop_table
* Convert calls to BUF_STRATEGY to VOP_STRATEGY calls. This is a no-op sincephk2003-01-031-1/+1
| | | | all BUF_STRATEGY did in the first place was call VOP_STRATEGY.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Abstract-out the constants for the sequential heuristic.dillon2002-12-281-1/+1
| | | | | | No operational changes. MFC after: 1 day
* SMP locking for radix nodes.hsu2002-12-241-0/+2
|
* Avoid holding the vnode interlock around malloc() or free() to prevent aalc2002-12-231-2/+8
| | | | | | lock order reversal. Reviewed by: jeff
* SMP locking for ifnet list.hsu2002-12-222-1/+9
|
* do not try to free a mountpoint that we did not allocate.dillon2002-12-211-4/+9
| | | | X-MFC after: immediately
* reapply 1.26 through 1.28.alfred2002-11-201-18/+6
| | | | Approved by: re
* forgot about 5.x freeze, backout 1.26 through 1.28 pending re@ appoval.alfred2002-11-201-6/+18
|
* remove useless casts, unused macros and cleanup a line wrap.alfred2002-11-201-9/+3
|
* comment and untwist error return logicalfred2002-11-201-4/+3
|
* Remove an outdated comment complaining about exporting struct ucredalfred2002-11-201-5/+0
| | | | to userspace, I fixed it a while ago.
* Don't examine an un-initialized variable.phk2002-10-201-4/+0
| | | | Spotted by: FlexeLint.
* Remove extern declarations of stuff which is static in nfs_node.cphk2002-10-202-6/+3
| | | | | | Move related macro to nfs_node.c Spotted by: FlexeLint
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock). In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme. Sponsored by: DARPA & NAI Labs.
* Change iov_base's type from `char *' to the standard `void *'. Allmike2002-10-112-10/+21
| | | | | 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 *'.
* Some kernel threads try to do significant work, and the default KSTACK_PAGESscottl2002-10-021-1/+1
| | | | | | | | | | | | | doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates. Reviewed by: jake, peter, jhb
* Back our kernel support for reliable signal queues.jmallett2002-10-011-7/+2
| | | | Requested by: rwatson, phk, and many others
* Lock access to the signal queue, and related structures, with PROC_LOCK.jmallett2002-09-301-1/+5
| | | | Submitted by: jhb
* Convert use of p_siglist and old SIG*() macros to use <sys/ksiginfo.h>jmallett2002-09-301-2/+3
| | | | | | prototyped functions to get a sigset_t, and further to check for any queued signals, rather than an empty signal set, to go with the move to signal queues rather than signal sets.
* Be consistent about "static" functions: if the function is markedphk2002-09-281-1/+1
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Remove an errant debugging printf that got left in during my lastrwatson2002-09-271-1/+0
| | | | | | commit. Pointed out by: guido
* Apparently pxeboot passes in a mygateway of non-zero sin lengthrwatson2002-09-261-1/+6
| | | | | | | | | | from DHCP in the event that no gateway is returned from DHCP, breaking the assumption that we skip the routing insertion of the gateway if the sin length is zero. Check also for s_addr of 0 to avoid the "Oh no, adding my default route failed" panic, making it possible to pxeboot machines on segments without default routes. Arguably this could be a bug in pxeboot, or in the TUNABLE code, but this makes my boxes boot.
* - Lock access to the buf lists.jeff2002-09-255-16/+36
| | | | | - Use vrefcnt() where appropriate. - Add some locking asserts.
* Moved nfs_diskless setup code from autoconf.c to nfsclient/nfs_diskless.cjake2002-09-223-5/+241
| | | | | | | so that it is MI. Allow nfs_mountroot to return an error if the nfs_diskless struct is not valid, rather than panicing later on. Call nfs_setup_diskless() from nfs_mountroot if NFS_ROOT is defined, like bootpc_init(). Removed legacy root mount support for sparc64, and enabled NFS_ROOT by default.
* Use m_length() instead of home-rolled versions.phk2002-09-181-7/+1
|
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-142-3/+3
| | | | | | | | | | | | v_tag is now const char * and should only be used for debugging. Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP. Suggested by: phk Reviewed by: bde, rwatson (earlier version)
* Now that we have a cached mount credential in struct mount, use it isteadphk2002-09-083-5/+1
| | | | of a private cached copy.
* Use `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn'tbde2002-09-051-1/+1
| | | | a prerequisite.
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidsobomax2002-08-181-1/+1
| | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net
* Remove a case of exposing 'struct ucred' to userspace. Use a struct xucredalfred2002-08-152-2/+2
| | | | | | for LOCKD_MSG instead. Requested by: rwatson
* In order to better support flexible and extensible access control,rwatson2002-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make a series of modifications to the credential arguments relating to file read and write operations to cliarfy which credential is used for what: - Change fo_read() and fo_write() to accept "active_cred" instead of "cred", and change the semantics of consumers of fo_read() and fo_write() to pass the active credential of the thread requesting an operation rather than the cached file cred. The cached file cred is still available in fo_read() and fo_write() consumers via fp->f_cred. These changes largely in sys_generic.c. For each implementation of fo_read() and fo_write(), update cred usage to reflect this change and maintain current semantics: - badfo_readwrite() unchanged - kqueue_read/write() unchanged pipe_read/write() now authorize MAC using active_cred rather than td->td_ucred - soo_read/write() unchanged - vn_read/write() now authorize MAC using active_cred but VOP_READ/WRITE() with fp->f_cred Modify vn_rdwr() to accept two credential arguments instead of a single credential: active_cred and file_cred. Use active_cred for MAC authorization, and select a credential for use in VOP_READ/WRITE() based on whether file_cred is NULL or not. If file_cred is provided, authorize the VOP using that cred, otherwise the active credential, matching current semantics. Modify current vn_rdwr() consumers to pass a file_cred if used in the context of a struct file, and to always pass active_cred. When vn_rdwr() is used without a file_cred, pass NOCRED. These changes should maintain current semantics for read/write, but avoid a redundant passing of fp->f_cred, as well as making it more clear what the origin of each credential is in file descriptor read/write operations. Follow-up commits will make similar changes to other file descriptor operations, and modify the MAC framework to pass both credentials to MAC policy modules so they can implement either semantic for revocation. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Introduce typedefs for the member functions of struct vfsops and employphk2002-08-132-10/+7
| | | | | | | these in the main filesystems. This does not change the resulting code but makes the source a little bit more grepable. Sponsored by: DARPA and NAI Labs.
OpenPOWER on IntegriCloud