#include <pthread.h>
#include <errno.h>
#include <iomanip>
#include "VestaSource.H"
#include "ShortIdBlock.H"
#include "FdCache.H"
#include "VRConcurrency.H"
#include "VLogHelp.H"
#include "VestaConfig.H"
#include "Mastership.H"
#include "nfsd.H"
#include "logging.H"
#include <assert.h>
#include "VestaSourceImpl.H"
#include "CharsSeq.H"
#include "CopyShortId.H"
#include "timing.H"
#include "lock_timing.H"
#include <BufStream.H>
Go to the source code of this file.
Defines | |
#define | VR_FSID nfs_port |
#define | VR_RDEV 9999 |
#define | VR_BLOCKSIZE NFS_MAXDATA |
#define | VR_BLOCKUNIT 512 |
#define | VR_DEFAULT_COW_MAX 4 |
#define | DP_SLOP 16 |
Functions | |
nfsstat | xlate_errno (int errno_val) |
nfsstat | xlate_vserr (VestaSource::errorCode err) |
void | file_fattr (fattr *attr, struct stat *st, VestaSource *vs) |
bool | attrModTimeCallback (void *closure, VestaSource::attribOp op, const char *name, const char *value, time_t timestamp) |
time_t | attrModTime (VestaSource *vs) |
nfsstat | any_fattr (fattr *attr, VestaSource *vs, int fd) |
VestaSource * | do_cow (VestaSource *vs, nfsstat *status, Basics::uint64 len=((Basics::uint64)-1)) |
nfsstat | do_getattr (nfs_fh *fh, fattr *attr, AccessControl::Identity cred) |
nfsstat | apply_sattr (sattr *newattr, VestaSource *vs, int fd, AccessControl::Identity cred, fattr *attr) |
nfsstat | do_setattr (sattrargs *argp, fattr *attr, AccessControl::Identity cred) |
nfsstat | do_lookup (diropargs *dopa, diropokres *dp, AccessControl::Identity cred) |
int | fh_fd (nfs_fh *fh, nfsstat *status, int omode, VestaSource **vsout, int *oflout, AccessControl::Identity cred) |
void | fd_inactive (void *vsin, int fd, int ofl) |
nfsstat | do_readdir (readdirargs *argp, result_types *resp, AccessControl::Identity cred) |
nfsstat | do_create (createargs *argp, diropokres *dp, AccessControl::Identity cred) |
bool | namelistCallback (void *closure, VestaSource::typeTag type, Arc arc, unsigned int index, Bit32 pseudoInode, ShortId filesid, bool master) |
bool | dirEmptyCallback (void *closure, VestaSource::typeTag type, Arc arc, unsigned int index, Bit32 pseudoInode, ShortId filesid, bool master) |
nfsstat | do_remove (diropargs *argp, AccessControl::Identity cred) |
nfsstat | do_rename (renameargs *argp, AccessControl::Identity cred) |
nfsstat | do_hardlink (linkargs *argp, AccessControl::Identity cred) |
nfsstat | do_symlink (symlinkargs *argp, AccessControl::Identity cred) |
nfsstat | do_mkdir (createargs *argp, diropokres *dp, AccessControl::Identity cred) |
nfsstat | do_readlink (nfs_fh *fh, nfspath np, AccessControl::Identity cred) |
nfsstat | do_statfs (nfs_fh *argp, result_types *resp, AccessControl::Identity cred) |
void | GlueInit () |
Variables | |
int | nfs_port |
bool | shortIdSymlink = false |
Text | shortIdSymlinkPrefix |
int | shortIdSymlinkLength = 0 |
bool | allowSymlink = false |
bool | bsdChown = false |
int | cowMax = VR_DEFAULT_COW_MAX |
CowInProgress * | cowInProgress |
struct { | |
nfsstat error | |
int errno_val | |
} | nfs_errtbl [] |
|
|
|
Definition at line 72 of file glue.C. Referenced by any_fattr(). |
|
Definition at line 73 of file glue.C. Referenced by any_fattr(). |
|
|
|
Definition at line 70 of file glue.C. Referenced by any_fattr(), and file_fattr(). |
|
Definition at line 71 of file glue.C. Referenced by any_fattr(), and file_fattr(). |
|
|
|
Definition at line 282 of file glue.C. References attrModTimeCallback(), and AttrModTimeClosure::time. Referenced by any_fattr(). |
|
Definition at line 273 of file glue.C. References AttrModTimeClosure::time. Referenced by attrModTime(). |
|
Definition at line 1708 of file glue.C. Referenced by do_remove(). |
|
|
|
Definition at line 648 of file glue.C. References any_fattr(), VestaSource::immutableFile, VestaSource::lookup(), VestaSource::mutableFile, NullLongId, LongId::readLock, RECORD_TIME_POINT, RWLOCK_LOCKED_REASON, and VestaSource::type. Referenced by nfsd_nfsproc_getattr_2(). |
|
|
|
|
|
|
|
|
Definition at line 1090 of file glue.C. References apply_sattr(), VestaSource::copyToMutable(), do_cow(), VestaAttribs::hasAttribs(), VestaSource::immutableFile, LongId::isAncestorOf(), VestaSource::longid, VestaSource::lookup(), MutableRootLongId, NullLongId, VRErrorCode::ok, RECORD_TIME_POINT, ReadersWritersLock::releaseWrite(), RWLOCK_LOCKED_REASON, VestaSource::type, VolatileRootLongId, LongId::writeLock, and xlate_vserr(). Referenced by nfsd_nfsproc_setattr_2(). |
|
Definition at line 2478 of file glue.C. References Text::cchars(), ok(), result_types::r_statfsres, and xlate_errno(). Referenced by nfsd_nfsproc_statfs_2(). |
|
Definition at line 2173 of file glue.C. References allowSymlink, VestaSource::appendableDirectory, VestaSource::dontReplace, VestaSource::ghost, VestaSource::insertStub(), VestaSource::lookup(), VestaSource::master, VRErrorCode::notFound, NullLongId, VRErrorCode::ok, RECORD_TIME_POINT, RWLOCK_LOCKED_REASON, VestaSource::stub, VestaSource::type, LongId::writeLock, and xlate_vserr(). Referenced by nfsd_nfsproc_symlink_2(). |
|
Definition at line 1398 of file glue.C. References FdCache::close(), DEVICE_FAKE_FD, and VestaSource::shortId(). Referenced by nfsd_nfsproc_read_2(), and nfsd_nfsproc_write_2(). |
|
|
Definition at line 207 of file glue.C. References VestaSource::ac, FileShortIdRootLongId, VestaAttribs::getAttrib(), AccessControl::group, ToUnixIdClosure::id, VestaSource::immutableFile, LongId::isAncestorOf(), VestaSource::linkCount(), VestaSource::longid, AccessControl::mode, AccessControl::owner, VestaSource::pseudoInode, RootLongId, ToUnixIdClosure::setid, VestaSource::type, AccessControl::vforeignGroup, AccessControl::vforeignUser, VR_FSID, VR_RDEV, and ToUnixIdClosure::vs. Referenced by any_fattr(), and apply_sattr(). |
|
Definition at line 2505 of file glue.C. References CowInProgress::active, allowSymlink, bsdChown, Text::cchars(), FdCache::close(), cowMax, DBG_ALWAYS, Repos::dprintf(), VestaConfig::get(), VestaConfig::get_int(), VestaConfig::get_Text(), NEW_PTRFREE_ARRAY, and shortIdSymlink. Referenced by main(). |
|
Definition at line 1698 of file glue.C. References NamelistClosure::val. Referenced by do_remove(). |
|
Definition at line 123 of file glue.C. References Text::cchars(), DBG_ALWAYS, Repos::dprintf(), Basics::errno_Text(), error, and nfs_errtbl. Referenced by any_fattr(), apply_sattr(), do_cow(), do_create(), do_statfs(), fh_fd(), nfsd_nfsproc_read_2(), and nfsd_nfsproc_write_2(). |
|
Definition at line 138 of file glue.C. References VRErrorCode::inappropriateOp, VRErrorCode::invalidArgs, VRErrorCode::isADirectory, VRErrorCode::longIdOverflow, VRErrorCode::nameInUse, VRErrorCode::nameTooLong, VRErrorCode::noPermission, VRErrorCode::notADirectory, VRErrorCode::notFound, VRErrorCode::notMaster, VRErrorCode::ok, VRErrorCode::outOfSpace, and VRErrorCode::rpcFailure. Referenced by apply_sattr(), do_cow(), do_create(), do_hardlink(), do_lookup(), do_mkdir(), do_readdir(), do_remove(), do_rename(), do_setattr(), and do_symlink(). |
|
Definition at line 80 of file glue.C. Referenced by do_symlink(), and GlueInit(). |
|
Definition at line 81 of file glue.C. Referenced by apply_sattr(), and GlueInit(). |
|
|
|
Definition at line 86 of file glue.C. Referenced by do_cow(), and GlueInit(). |
|
|
|
Definition at line 94 of file glue.C. Referenced by do_cow(), fh_fd(), and xlate_errno(). |
|
Referenced by xlate_errno(). |
|
Definition at line 357 of file nfsd.C. Referenced by main(). |
|
Definition at line 77 of file glue.C. Referenced by any_fattr(), do_readlink(), and GlueInit(). |
|
Definition at line 79 of file glue.C. Referenced by any_fattr(), and do_readlink(). |
|
|