summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
Commit message (Collapse)AuthorAgeFilesLines
* DuH!phk2003-10-181-1/+1
| | | | | bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in the file)
* Initialize bp->b_offset before calling VOP_STRATEGY().phk2003-10-182-8/+1
| | | | Remove KASSERTS and panics with B_PHYS checks which no longer apply.
* We do not get B_PHYS buffers here anymore. /dev/drum is long gone.phk2003-10-181-24/+2
|
* Since the addition of the VI_DOINGINACT flag some time ago,iedowse2003-10-051-15/+1
| | | | | | | VOP_INACTIVE routines need not worry about their vnode getting recycled if they block. Remove the code from nfs_inactive() that used vget() to get an extra vnode reference that was held during the nfs_vinvalbuf() call.
* - Remove an incorrect XXX comment. This code does respect the XLOCK sincejeff2003-10-051-1/+0
| | | | it uses vget() which will fail if the identity changes.
* - Check the XLOCK before we inspect the vnode.jeff2003-10-051-0/+4
|
* - We don't need to cache_purge() in nfs_reclaim(), vclean() does it for us.jeff2003-10-051-2/+0
|
* - Consistently set sopt_dir.jeff2003-10-043-0/+4
| | | | Pointed out by: pete@isilon.com
* - Acquire the vnode interlock prior to dropping the mntvnode_mtx.jeff2003-10-041-1/+2
| | | | | - Make a note of the lack of XLOCK protection in this code. We would access a vnode while it is changing identities without Giant.
* - Remove the backtrace() call from the *_vinvalbuf() functions. Thanks to ajeff2003-10-041-5/+6
| | | | | | | | stack trace supplied by phk, I now understand what's going on here. The check for VI_XLOCK stops us from calling vinvalbuf once the vnode has been partially torn down in vclean(). It is not clear that this would cause a problem. Document this in nfs_bio.c, which is where the other two filesystems copied this code from.
* - Remove interlock protection around VI_XLOCK. The interlock is notjeff2003-09-191-4/+3
| | | | | | | | | | | | | sufficient to guarantee that this race is not hit. The XLOCK will likely have to be redesigned due to the way reference counting and mutexes work in FreeBSD. We currently can not be guaranteed that xlock was not set and cleared while we were blocked on the interlock while waiting to check for XLOCK. This would lead us to reference a vnode which was not the vnode we requested. - Add a backtrace() call inside of INVARIANTS in the hopes of finding out if this condition is ever hit. It should not, since we should be retaining a reference to the vnode in these cases. The reference would be sufficient to block recycling.
* Name the vnode method vectors consistently with the rest of the filesystems.phk2003-09-124-21/+21
| | | | This improves the output of src/tools/tools/vop_table
* Remove now unused BOOTP tags related to NFS swap device.phk2003-09-051-3/+0
|
* KNF: parentheses around return values.dds2003-09-041-4/+4
| | | | | | Suggested by: bde Approved by: schweikh (mentor - blanket) MFC after: 6 weeks
* Fix errno return values to better represent failure reasons fordds2003-09-021-4/+9
| | | | | | | | read and open. Approved by: schweikh (mentor) Agreed: bde MFC after: 6 weeks
* Remove the magic way of configuring NFS backed swap.phk2003-08-154-243/+1
| | | | | | | | | | | | | This code dates back to the very first diskless support on FreeBSD, back when swapon(8) couldn't simply be run on a NFS backed file. Suggested replacement command sequence on the client: dd if=/dev/zero of=/swapfile bs=1k count=1 oseek=100000 swapon /swapfile rm -f /swapfile For whatever value of 100000 you want.
* 0) preallocate per-interface context structures without the ifnet lock heldbillf2003-08-071-25/+38
| | | | | | | | 1) avoid immediately calling bzero() after malloc() by passing M_ZERO 2) do not initialize individual members of the global context to zero 3) remove an unused assignment of ifctx in bootpc_init() Reviewed by: tegge
* Fix a problem that occurs when truncating files on NFSv3 mounts: we needtjr2003-07-291-1/+7
| | | | | | | | | | | | to set np->n_size back to the desired size again after calling nfs_meta_setsize(), since it could end up in nfs_loadattrcache() getting called, which would change n_size back to the value it had before the truncate request was issued. The result of this bug is that the size info cached in the nfsnode becomes incorrect, lseek(fd, ofs, SEEK_END) seeks past the end of the file, stat() returns the wrong size, etc. PR: 41792 MFC after: 2 weeks
* Add fdidx argument to vn_open() and vn_open_cred() and pass -1 throughout.phk2003-07-271-1/+1
|
* Change idle sleep indentifier to "-" for nfsiodphk2003-07-021-1/+1
|
* Lock the vm object when freeing a page.alc2003-06-171-1/+9
|
* Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementationsphk2003-06-151-0/+2
| | | | to check that the buffer points to the correct vnode.
* Initialize struct vfsops C99-sparsely.phk2003-06-121-14/+7
| | | | | Submitted by: hmp Reviewed by: phk
* When removing a sillyrename file, make sure that the directory vnodeiedowse2003-06-121-0/+6
| | | | | | | | | | has not been cleaned in the meantime, since this can happen during a forced unmount. Also add a comment that nfs_removeit() should really be locking the directory vnode before calling nfs_removerpc(). Reported by: mbr Tested by: mbr MFC after: 1 week
* Use __FBSDID().obrien2003-06-111-1/+3
|
* Add the comment I meant to add about not passing in PCATCH to therwatson2003-06-111-0/+8
| | | | tsleep(). Note the XXX.
* On a socket creation error, don't close the socket.hsu2003-06-091-1/+2
|
* Remove unsed variables.phk2003-05-311-7/+2
| | | | | | Add explicit breaks to switch Found by: FlexeLint
* The IO_NOWDRAIN and B_NOWDRAIN hacks are no longer needed to preventphk2003-05-311-6/+0
| | | | | | deadlocks with vnode backed md(4) devices because md now uses a kthread to run the bio requests instead of doing it directly from the bio down path.
* rpc.lockd stability workaround: remove PCATCH from the tsleep() inrwatson2003-05-301-1/+1
| | | | | | | | | | | | | | | | | nfs_lock.c. Right now, if we permit a signal to interrupt the sleep, we will slip the lock and no process on that client, the server, or any other client will be able to acquire the lock. This can happen, for example, if a user hits Ctrl-C or Ctrl-T while a process is waiting for the lock. By removing PCATCH, we prevent that from happening, at the cost of not permitting a user-requested lock abort: also nasty. However, a user interface bug might be preferable to a serious semantic bug, so we go with that for now. We need to teach the rpc.lockd/kernel protocol how to abort lock requests, and rpc.lockd how to handle aborted lock requests; patches for the kernel bit are floating around, but no rpc.lockd bit yet. Approved by: re (scottl)
* Deal with the possibility of negative available space from the file serverpeter2003-05-191-3/+6
| | | | | | | | to avoid Bad Things(TM) happening (eg: df crashing with a floating point exception). Submitted by: Harold Gutch <logix@foobar.franken.de> Approved by: re (scottl)
* This change grabs the vnode lock for NFS client vnodes when callingrwatson2003-05-152-1/+7
| | | | | | | | | | VOP_SETATTR() or VOP_GETATTR(); without these locks (a) VFS_DEBUG_LOCKS will panic, and (b) it may be possible to corrupt entries in the cached vnode attributes in the nfsnode, since nfsnode attribute cache data is also protected by the vnode lock. Approved by: re (jhb) Pointed out by: VFS_DEBUG_LOCKS
* - Merge struct procsig with struct sigacts.jhb2003-05-131-1/+3
| | | | | | | | | | | | | | | | | - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson)
* Instead of recording the Unix time in a process when it starts, record thedes2003-05-011-0/+1
| | | | | | | uptime. Where necessary, convert it back to Unix time by adding boottime to it. This fixes a potential problem in the accounting code, which would compute the elapsed time incorrectly if the Unix time was stepped during the lifetime of the process.
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-04-292-4/+2
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* VOP_FSYNC() expects to be called with the vnode locked, so lock fvp intruckman2003-04-241-1/+9
| | | | | | nfs_rename() before calling VOP_FSYNC() and unlock fvp immediately after. Reviewed by: bde
* Fix a bug with df on large (>1TB) nfsv3 file servers on 32 bit clientpeter2003-04-241-11/+23
| | | | | | | machines where the 'long' number of blocks in struct statfs wont fit. Instead of chosing an artificial 512 byte block size, simply scale it up until we avoid an overflow. NFSv3 reports the sizes in bytes, and the blocksize is a figment of nfsclient's imagination.
* Release the vnode interlock in nfs_flush() before calling nfs_sigintr(),truckman2003-04-231-1/+2
| | | | | and grab it again later if necessary. This prevents a lock order reversal because nfs_sigintr() calls PROC_LOCK().
* Revert change 1.201 (removing mapping of VAPPEND to VWRITE).thomas2003-03-311-32/+2
| | | | | | | | | | Instead, use the generic vaccess() operation to determine whether an operation is permitted. This avoids embedding knowledge on vnode permission bits such as VAPPEND in the NFS client. PR: kern/46515 vaccess() patch submitted by: "Peter Edwards" <pmedwards@eircom.net> Approved by: tjr, roberto (mentor)
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withjeff2003-03-311-1/+1
| | | | | | | a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK.
* 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
OpenPOWER on IntegriCloud