summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client
Commit message (Collapse)AuthorAgeFilesLines
* Rename some functions and variables from nfs_* to nfs4_* to avoidbde2007-01-251-13/+13
| | | | | | | | | | | | | collisions with nfsclient's names. Even static names should have a unique prefix so that they can be debugged easily. Hide the unused colliding variable nfsv3_commit_on_close in "#if 0" together with other unused sysctl variables. Duplicating the nfs sysctl under nfs4 is probably just a bug. Fix some nearby style bugs. Remove duplicate $FreeBSD$.
* Rename some functions and variables (mainly vfsops entry points) frombde2007-01-251-37/+32
| | | | | | | | | | | | | | | nfs_* to nfs4_* to avoid collisions with nfsclient's names. Even static names should have a unique prefix so that they can be debugged easily. Most of the renamed functions can probably be shared. nfs4_cmount() and nfs4_sync() are identical to the nfs_* versions, and all the others except nfs4_vfsops() seem to be idendentical except for style bugs, missing support for mountroot, and bugs. Fix some nearby style bugs. Remove duplicate $FreeBSD$.
* Unstaticize nfs_iosize() in nfsclient and use it in nfs4client insteadbde2007-01-251-18/+0
| | | | | | | | | | | of duplicating it except for larger style bugs in the copy. Fix some nearby style bugs (including a harmless type mismatch) in and near the remaining copy. This is part of fixing collisions of the 2 nfs*client's names. Even static names should have a unique prefixes so that they can be debugged easily.
* Cylinder group bitmaps and blocks containing inode for a snapshotkib2007-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | file are after snaplock, while other ffs device buffers are before snaplock in global lock order. By itself, this could cause deadlock when bdwrite() tries to flush dirty buffers on snapshotted ffs. If, during the flush, COW activity for snapshot needs to allocate block and ffs_alloccg() selects the cylinder group that is being written by bdwrite(), then kernel would panic due to recursive buffer lock acquision. Avoid dealing with buffers in bdwrite() that are from other side of snaplock divisor in the lock order then the buffer being written. Add new BOP, bop_bdwrite(), to do dirty buffer flushing for same vnode in the bdwrite(). Default implementation, bufbdflush(), refactors the code from bdwrite(). For ffs device buffers, specialized implementation is used. Reviewed by: tegge, jeff, Russell Cattelan (cattelan xfs org, xfs changes) Tested by: Peter Holm X-MFC after: 3 weeks (if ever: it changes ABI)
* NFSv4 client:rees2006-11-282-1/+10
| | | | | Add support for va_birthtime Fix va_ctime to use TIME_METADATA, not TIME_CREATE
* Fixes up the handling of shared vnode lock lookups in the NFS client,mohans2006-09-132-8/+8
| | | | | | | | | | | | | | | | | | | | adds a FS type specific flag indicating that the FS supports shared vnode lock lookups, adds some logic in vfs_lookup.c to test this flag and set lock flags appropriately. - amd on 6.x is a non-starter (without this change). Using amd under heavy load results in a deadlock (with cascading vnode locks all the way to the root) very quickly. - This change should also fix the more general problem of cascading vnode deadlocks when an NFS server goes down. Ideally, we wouldn't need these changes, as enabling shared vnode lock lookups globally would work. Unfortunately, UFS, for example isn't ready for shared vnode lock lookups, crashing pretty quickly. This change is the result of discussions with Stephan Uphoff (ups@). Reviewed by: ups@
* Always supply curthread as argument to nfs_asyncio and nfs_doiokib2006-07-121-8/+2
| | | | | | | | | in nfs_strategy. Otherwise, for some buffers, signals would be ignored at the intr mounts. Reviewed by: mohan, cel MFC after: 1 month Approved by: pjd (mentor)
* While reviewing NFS client for another PR, noticed this omission in thecel2006-05-241-1/+1
| | | | | | | NFSv4 client READDIR logic. This change matches the logic in the version 2 and 3 code. Sponsored by: Network Appliance, Incorporated
* NFS over TCP retransmit behavior should default to a 60 second time out,cel2006-05-231-2/+8
| | | | | | | | | | | | mimicing the NFS reference implementation. NFS over TCP does not need fast retransmit timeouts, since network loss and congestion are managed by the transport (TCP), unlike with NFS over UDP. A long timeout prevents the unnecessary retransmission of non- idempotent NFS requests. Reviewed by: mohans, silby, rees? Sponsored by: Network Appliance, Incorporated
* Changes to make the NFS client MP safe.mohans2006-05-191-0/+4
| | | | Thanks to Kris Kennaway for testing and sending lots of bugs my way.
* Add better sanity checking to the logic that handles ioctl processingcel2006-05-131-4/+7
| | | | | | | | | | | for nfsclient and nfs4client in order to prevent local root users from panicing the system. PR: kern/77463 Submitted by: Wojciech A. Koszek Reviewed by: cel, rees MFC after: 2 weeks Security: Local root users can panic the system at will
* Use nfs4_disconnect for connections opened with nfs4_connect.rees2006-01-191-2/+2
| | | | | Submitted by: cel@citi.umich.edu MFC after: 1 week
* Add marker vnodes to ensure that all vnodes associated with the mount point aretegge2006-01-091-2/+3
| | | | | | iterated over when using MNT_VNODE_FOREACH. Reviewed by: truckman
* Obtain mount point lock before restarting sync loop if vget() failed.tegge2006-01-091-0/+1
| | | | Reviewed by: truckman
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* - We want if (mrep != NULL) not if (m_freem != NULL). m_freem will neverjeff2005-04-251-1/+1
| | | | | | be NULL and we will always leak mrep in the error case. Submitted by: Greg Taleck <gtaleck@isilon.com>
* - 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.
* - 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-39/+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-47/+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.
* Remove dead code.das2005-03-181-2/+0
| | | | Found by: Coverity Prevent analysis tool
* - It is no longer necessary to lock and unlock the vnode in nfs4_close()jeff2005-03-131-2/+0
| | | | | | as the top level does this for us now. Sponsored by: Isilon Systems, Inc.
* Follow v_id changes in NFSv[23]phk2005-02-221-13/+9
|
* Remove unused cred arg from nfs_vinvalbuf() and many bogus argumentsphk2005-01-241-8/+5
| | | | passed for it.
* This file fell out of the list when adding bufsync.phk2005-01-111-0/+1
|
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-112-8/+8
| | | | | | | | | | | | | | | | | | 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-0714-16/+16
|
* Rewrite of the NFS client's reply handling. We now have NFS socketps2004-12-062-0/+2
| | | | | | | | upcalls which do RPC header parsing and match up the reply with the request. NFS calls now sleep on the nfsreq structure. This enables us to eliminate the NFS recvlock. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
* Convert to nmount, add omount compat.phk2004-12-061-9/+28
| | | | | Take the cheap way and just put struct nfs_args in a nmount arg, we will need a userland mount_nfs4(8) program anyhow.
* 2 fixes that improve on the consistency of the NFS client cache.ps2004-12-062-4/+4
| | | | | | | | | | | - Change the cached mtime to a 'struct timespec' from a time_t. Improving the precision of the cached mtime tightens up NFS' "close-to-open" consistency considerably. - Always force an over-the-wire consistency check from nfs_open() (unless the file is marked modified). This further improves NFS' "close-to-open" consistency. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-6/+0
| | | | | | | | doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-011-64/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* don't confuse NFSMNT_ flags with MNT_ flags in statfsrees2004-12-011-1/+0
| | | | Approved by: alfred
* Remove redundant functions (repo-copied from nfsclient) for dealing withphk2004-12-011-114/+0
| | | | fifos.
* Scripted modification of vop_* prototypes to use typedefs.phk2004-12-011-25/+25
|
* Fix for a bug in nfs_mkdir() that called vrele() instead of vput()rees2004-12-011-1/+1
| | | | | | | | | in the error cases, causing panics. Adapted from similar fix to NFSv3 mkdir submitted by Mohan Srinivasan mohans at yahoo-inc dot com Approved by: alfred
* Refuse attempts to mount root filesystemphk2004-11-091-1/+1
|
* comment out debug printf.alfred2004-10-271-1/+1
| | | | Submitted by: rees
* Remove blank line which crept in.phk2004-10-261-1/+0
|
* Loose the v_dirty* and v_clean* alias macros.phk2004-10-251-1/+2
| | | | | Check the count field where we just want to know the full/empty state, rather than using TAILQ_EMPTY() or TAILQ_FIRST().
* Move the buffer method vector (buf->b_op) to the bufobj.phk2004-10-241-1/+20
| | | | | | | | | | | | | | | | | Extend it with a strategy method. Add bufstrategy() which do the usual VOP_SPECSTRATEGY/VOP_STRATEGY song and dance. Rename ibwrite to bufwrite(). Move the two NFS buf_ops to more sensible places, add bufstrategy to them. Add inlines for bwrite() and bstrategy() which calls through buf->b_bufobj->b_ops->b_{write,strategy}(). Replace almost all VOP_STRATEGY()/VOP_SPECSTRATEGY() calls with bstrategy().
* Add b_bufobj to struct buf which eventually will eliminate the need for b_vp.phk2004-10-221-7/+5
| | | | | | | | | | | | | | | | | | Initialize b_bufobj for all buffers. Make incore() and gbincore() take a bufobj instead of a vnode. Make inmem() local to vfs_bio.c Change a lot of VI_[UN]LOCK(bp->b_vp) to BO_[UN]LOCK(bp->b_bufobj) also VI_MTX() to BO_MTX(), Make buf_vlist_add() take a bufobj instead of a vnode. Eliminate other uses of bp->b_vp where bp->b_bufobj will do. Various minor polishing: remove "register", turn panic into KASSERT, use new function declarations, TAILQ_FOREACH_SAFE() etc.
* Move the VI_BWAIT flag into no bo_flag element of bufobj and call it BO_WWAITphk2004-10-211-15/+9
| | | | | | | | | | Add bufobj_wref(), bufobj_wdrop() and bufobj_wwait() to handle the write count on a bufobj. Bufobj_wdrop() replaces vwakeup(). Use these functions all relevant places except in ffs_softdep.c where the use if interlocked_sleep() makes this impossible. Rename b_vnbufs to b_bobufs now that we touch all the relevant files anyway.
* Remove NFS4 vop method vector for devices: we are desupporing device nodesphk2004-09-271-81/+12
| | | | | | | on anything but DEVFS and in this case it was not even used (see below). Put the NFS4 vop method for fifo's behind "#if 0" because it is unused. Add a XXX comment to say that I think the unusedness is a bug.
* Remove unused B_WRITEINPROG flagphk2004-09-151-8/+3
|
* Explicitly pass vnode to nfs_doio() and mountpoint to nfs_asyncio().phk2004-09-071-4/+2
|
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-4/+3
| | | | | | | | | | | | | | | | | | and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code.
* Avoid casts as lvalues.kan2004-07-281-2/+3
|
OpenPOWER on IntegriCloud