CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
loader Namespace Reference

Namespaces

 loader_talk
 

Classes

struct  CvmfsOptions
 
struct  SavedState
 
struct  LoadEvent
 
struct  LoaderExports
 
struct  CvmfsExports
 

Typedefs

typedef std::vector< SavedState * > StateList
 
typedef std::vector< LoadEvent * > EventList
 

Enumerations

enum  {
  KEY_HELP, KEY_VERSION, KEY_FOREGROUND, KEY_SINGLETHREAD,
  KEY_FUSE_DEBUG, KEY_CVMFS_DEBUG, KEY_OPTIONS_PARSE
}
 
enum  Failures {
  kFailOk = 0, kFailUnknown, kFailOptions, kFailPermission,
  kFailMount, kFailLoaderTalk, kFailFuseLoop, kFailLoadLibrary,
  kFailIncompatibleVersions, kFailCacheDir, kFailPeers, kFailNfsMaps,
  kFailQuota, kFailMonitor, kFailTalk, kFailSignature,
  kFailCatalog, kFailMaintenanceMode, kFailSaveState, kFailRestoreState,
  kFailOtherMount, kFailDoubleMount, kFailHistory, kFailWpad,
  kFailLockWorkspace, kFailRevisionBlacklisted, kFailNumEntries
}
 
enum  StateId {
  kStateUnknown = 0, kStateOpenDirs, kStateOpenChunks, kStateGlueBuffer,
  kStateInodeGeneration, kStateOpenFilesCounter, kStateGlueBufferV2, kStateGlueBufferV3,
  kStateGlueBufferV4, kStateOpenChunksV2, kStateOpenChunksV3, kStateOpenChunksV4,
  kStateOpenFiles, kStateNentryTracker
}
 

Functions

static void Usage (const string &exename)
 
bool CheckPremounted (const std::string &mountpoint)
 
static void stub_init (void *userdata, struct fuse_conn_info *conn)
 
static void stub_destroy (void *userdata)
 
static void stub_lookup (fuse_req_t req, fuse_ino_t parent, const char *name)
 
static void stub_getattr (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void stub_readlink (fuse_req_t req, fuse_ino_t ino)
 
static void stub_opendir (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void stub_releasedir (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void stub_readdir (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
 
static void stub_open (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void stub_read (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
 
static void stub_release (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void stub_statfs (fuse_req_t req, fuse_ino_t ino)
 
static void stub_getxattr (fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
 
static void stub_listxattr (fuse_req_t req, fuse_ino_t ino, size_t size)
 
static void stub_forget (fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)
 
static int ParseFuseOptions (void *data __attribute__((unused)), const char *arg, int key, struct fuse_args *outargs)
 
static fuse_args * ParseCmdLine (int argc, char *argv[])
 
static void SetFuseOperations (struct fuse_lowlevel_ops *loader_operations)
 
static void * OpenLibrary (const string &path)
 
static void CloseLibrary ()
 
static CvmfsExportsLoadLibrary (const bool debug_mode, LoaderExports *loader_exports)
 
Failures Reload (const int fd_progress, const bool stop_and_go)
 
const char * Code2Ascii (const Failures error)
 

Variables

static struct fuse_opt cvmfs_array_opts []
 
string * repository_name_ = NULL
 
string * mount_point_ = NULL
 
string * config_files_ = NULL
 
string * socket_path_ = NULL
 
string * usyslog_path_ = NULL
 
uid_t uid_ = 0
 
gid_t gid_ = 0
 
bool single_threaded_ = false
 
bool foreground_ = false
 
bool debug_mode_ = false
 
bool system_mount_ = false
 
bool grab_mountpoint_ = false
 
bool parse_options_only_ = false
 
bool suid_mode_ = false
 
bool premounted_ = false
 
bool disable_watchdog_ = false
 
bool simple_options_parsing_ = false
 
void * library_handle_
 
Fencefence_reload_
 
CvmfsExportscvmfs_exports_
 
LoaderExportsloader_exports_
 

Detailed Description

This file is part of the CernVM File System.

Typedef Documentation

typedef std::vector<LoadEvent *> loader::EventList

Definition at line 139 of file loader.h.

typedef std::vector<SavedState *> loader::StateList

Definition at line 124 of file loader.h.

Enumeration Type Documentation

anonymous enum
Enumerator
KEY_HELP 
KEY_VERSION 
KEY_FOREGROUND 
KEY_SINGLETHREAD 
KEY_FUSE_DEBUG 
KEY_CVMFS_DEBUG 
KEY_OPTIONS_PARSE 

Definition at line 81 of file loader.cc.

Possible failures when booting/mounting cvmfs. Remember to add a constant to libcvmfs.h and libcvmfs_legacy.cc when a constant to this enum is added.

Enumerator
kFailOk 
kFailUnknown 
kFailOptions 
kFailPermission 
kFailMount 
kFailLoaderTalk 
kFailFuseLoop 
kFailLoadLibrary 
kFailIncompatibleVersions 
kFailCacheDir 
kFailPeers 
kFailNfsMaps 
kFailQuota 
kFailMonitor 
kFailTalk 
kFailSignature 
kFailCatalog 
kFailMaintenanceMode 
kFailSaveState 
kFailRestoreState 
kFailOtherMount 
kFailDoubleMount 
kFailHistory 
kFailWpad 
kFailLockWorkspace 
kFailRevisionBlacklisted 
kFailNumEntries 

Definition at line 27 of file loader.h.

Enumerator
kStateUnknown 
kStateOpenDirs 
kStateOpenChunks 
kStateGlueBuffer 
kStateInodeGeneration 
kStateOpenFilesCounter 
kStateGlueBufferV2 
kStateGlueBufferV3 
kStateGlueBufferV4 
kStateOpenChunksV2 
kStateOpenChunksV3 
kStateOpenChunksV4 
kStateOpenFiles 
kStateNentryTracker 

Definition at line 91 of file loader.h.

Function Documentation

bool loader::CheckPremounted ( const std::string &  mountpoint)

For an premounted mountpoint, the argument is the file descriptor to /dev/fuse provided in the form /dev/fd/d

Definition at line 188 of file loader.cc.

Referenced by ParseFuseOptions().

Here is the caller graph for this function:

static void loader::CloseLibrary ( )
static

Definition at line 470 of file loader.cc.

Referenced by FuseMain(), and Reload().

Here is the caller graph for this function:

const char* loader::Code2Ascii ( const Failures  error)
inline

Definition at line 58 of file loader.h.

static CvmfsExports* loader::LoadLibrary ( const bool  debug_mode,
LoaderExports loader_exports 
)
static

Definition at line 484 of file loader.cc.

Referenced by FuseMain(), and Reload().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* loader::OpenLibrary ( const string &  path)
static

Definition at line 465 of file loader.cc.

Referenced by LoadLibrary().

Here is the caller graph for this function:

static fuse_args* loader::ParseCmdLine ( int  argc,
char *  argv[] 
)
static

Definition at line 406 of file loader.cc.

Referenced by FuseMain().

Here is the call graph for this function:

Here is the caller graph for this function:

static int loader::ParseFuseOptions ( void *data   __attribute__(unused),
const char *  arg,
int  key,
struct fuse_args *  outargs 
)
static

The callback used when fuse is parsing all the options We separate CVMFS options from FUSE options here.

Returns
On success zero, else non-zero

Definition at line 346 of file loader.cc.

Referenced by ParseCmdLine().

Here is the call graph for this function:

Here is the caller graph for this function:

Failures loader::Reload ( const int  fd_progress,
const bool  stop_and_go 
)

Definition at line 548 of file loader.cc.

Referenced by loader::loader_talk::MainTalk().

Here is the call graph for this function:

Here is the caller graph for this function:

static void loader::SetFuseOperations ( struct fuse_lowlevel_ops *  loader_operations)
static

Definition at line 443 of file loader.cc.

Referenced by FuseMain().

Here is the call graph for this function:

Here is the caller graph for this function:

static void loader::stub_destroy ( void *  userdata)
static

Definition at line 209 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_forget ( fuse_req_t  req,
fuse_ino_t  ino,
uint64_t  nlookup 
)
static

Definition at line 314 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_getattr ( fuse_req_t  req,
fuse_ino_t  ino,
struct fuse_file_info *  fi 
)
static

Definition at line 223 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_getxattr ( fuse_req_t  req,
fuse_ino_t  ino,
const char *  name,
size_t  size 
)
static

Definition at line 295 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_init ( void *  userdata,
struct fuse_conn_info *  conn 
)
static

Definition at line 203 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_listxattr ( fuse_req_t  req,
fuse_ino_t  ino,
size_t  size 
)
static

Definition at line 308 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_lookup ( fuse_req_t  req,
fuse_ino_t  parent,
const char *  name 
)
static

Definition at line 215 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_open ( fuse_req_t  req,
fuse_ino_t  ino,
struct fuse_file_info *  fi 
)
static

Definition at line 261 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_opendir ( fuse_req_t  req,
fuse_ino_t  ino,
struct fuse_file_info *  fi 
)
static

Definition at line 237 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_read ( fuse_req_t  req,
fuse_ino_t  ino,
size_t  size,
off_t  off,
struct fuse_file_info *  fi 
)
static

Definition at line 269 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_readdir ( fuse_req_t  req,
fuse_ino_t  ino,
size_t  size,
off_t  off,
struct fuse_file_info *  fi 
)
static

Definition at line 253 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_readlink ( fuse_req_t  req,
fuse_ino_t  ino 
)
static

Definition at line 231 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_release ( fuse_req_t  req,
fuse_ino_t  ino,
struct fuse_file_info *  fi 
)
static

Definition at line 277 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_releasedir ( fuse_req_t  req,
fuse_ino_t  ino,
struct fuse_file_info *  fi 
)
static

Definition at line 245 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::stub_statfs ( fuse_req_t  req,
fuse_ino_t  ino 
)
static

Definition at line 285 of file loader.cc.

Referenced by SetFuseOperations().

Here is the caller graph for this function:

static void loader::Usage ( const string &  exename)
static

Definition at line 150 of file loader.cc.

Variable Documentation

string* loader::config_files_ = NULL

Definition at line 129 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

struct fuse_opt loader::cvmfs_array_opts[]
static

Definition at line 92 of file loader.cc.

Referenced by ParseCmdLine(), and ParseFuseOptions().

bool loader::debug_mode_ = false

Definition at line 136 of file loader.cc.

Referenced by FuseMain(), ParseFuseOptions(), and Reload().

bool loader::disable_watchdog_ = false

Definition at line 142 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

bool loader::foreground_ = false

Definition at line 135 of file loader.cc.

Referenced by FuseMain(), ParseCmdLine(), and ParseFuseOptions().

gid_t loader::gid_ = 0

Definition at line 133 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

bool loader::grab_mountpoint_ = false

Definition at line 138 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

void* loader::library_handle_

Definition at line 144 of file loader.cc.

Referenced by CloseLibrary(), and LoadLibrary().

LoaderExports* loader::loader_exports_

Definition at line 147 of file loader.cc.

string* loader::mount_point_ = NULL

Definition at line 128 of file loader.cc.

bool loader::parse_options_only_ = false

Definition at line 139 of file loader.cc.

Referenced by FuseMain(), and ParseFuseOptions().

bool loader::premounted_ = false

Definition at line 141 of file loader.cc.

Referenced by FuseMain(), and ParseFuseOptions().

string* loader::repository_name_ = NULL

Definition at line 127 of file loader.cc.

Referenced by FuseMain(), ParseCmdLine(), and ParseFuseOptions().

bool loader::simple_options_parsing_ = false

Definition at line 143 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

bool loader::single_threaded_ = false

Definition at line 134 of file loader.cc.

Referenced by FuseMain(), and ParseFuseOptions().

string* loader::socket_path_ = NULL

Definition at line 130 of file loader.cc.

Referenced by loader::loader_talk::Fini(), FuseMain(), loader::loader_talk::Init(), and Reload().

bool loader::suid_mode_ = false

Definition at line 140 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

bool loader::system_mount_ = false

Definition at line 137 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

uid_t loader::uid_ = 0

Definition at line 132 of file loader.cc.

Referenced by FuseMain(), and ParseCmdLine().

std::string * loader::usyslog_path_ = NULL

Definition at line 131 of file loader.cc.

Referenced by FuseMain(), and loader::loader_talk::MainTalk().