CernVM-FS
2.12.0
|
#include "cvmfs_config.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdint.h>
#include <sys/stat.h>
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include "compression/compression.h"
#include "crypto/hash.h"
#include "util/atomic.h"
#include "util/concurrency.h"
#include "util/logging.h"
#include "util/platform.h"
#include "util/posix.h"
#include "util/smalloc.h"
Go to the source code of this file.
Macros | |
#define | _FILE_OFFSET_BITS 64 |
Enumerations | |
enum | Errors { kErrorOk = 0, kErrorFixed = 1, kErrorReboot = 2, kErrorUnfixed = 4, kErrorOperational = 8, kErrorUsage = 16, kErrorOk = 0, kErrorFixed = 1, kErrorReboot = 2, kErrorUnfixed = 4, kErrorOperational = 8, kErrorUsage = 16 } |
Functions | |
static void | Usage () |
static bool | GetNextFile (string *relative_path, string *hash_name) |
static void * | MainCheck (void *data __attribute__((unused))) |
int | main (int argc, char **argv) |
Variables | |
string * | g_cache_dir |
atomic_int32 | g_num_files |
atomic_int32 | g_num_err_fixed |
atomic_int32 | g_num_err_unfixed |
atomic_int32 | g_num_err_operational |
atomic_int32 | g_num_tmp_catalog |
pthread_mutex_t | g_lock_traverse = PTHREAD_MUTEX_INITIALIZER |
DIR * | g_DIRP_current = NULL |
int | g_num_dirs = -1 |
string * | g_current_dir |
int | g_num_threads = 1 |
bool | g_fix_errors = false |
bool | g_verbose = false |
atomic_int32 | g_force_rebuild |
atomic_int32 | g_modified_cache |
#define _FILE_OFFSET_BITS 64 |
This file is part of the CernVM File System.
This tool checks a cvmfs cache directory for consistency. If necessary, the managed cache db is removed so that it will be rebuilt on next mount.
Definition at line 9 of file cvmfs_fsck.cc.
enum Errors |
Enumerator | |
---|---|
kErrorOk | |
kErrorFixed | |
kErrorReboot | |
kErrorUnfixed | |
kErrorOperational | |
kErrorUsage | |
kErrorOk | |
kErrorFixed | |
kErrorReboot | |
kErrorUnfixed | |
kErrorOperational | |
kErrorUsage |
Definition at line 37 of file cvmfs_fsck.cc.
|
static |
Definition at line 83 of file cvmfs_fsck.cc.
Referenced by MainCheck().
int main | ( | int | argc, |
char ** | argv | ||
) |
|
static |
Definition at line 139 of file cvmfs_fsck.cc.
Referenced by main().
|
static |
string* g_cache_dir |
Definition at line 46 of file cvmfs_fsck.cc.
Referenced by GetNextFile(), main(), and MainCheck().
string* g_current_dir |
Current cache sub directory
Definition at line 58 of file cvmfs_fsck.cc.
Referenced by GetNextFile(), and main().
DIR* g_DIRP_current = NULL |
Definition at line 56 of file cvmfs_fsck.cc.
Referenced by GetNextFile().
bool g_fix_errors = false |
Definition at line 61 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
atomic_int32 g_force_rebuild |
Definition at line 63 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
pthread_mutex_t g_lock_traverse = PTHREAD_MUTEX_INITIALIZER |
Traversal of the file system tree is serialized.
Definition at line 55 of file cvmfs_fsck.cc.
Referenced by GetNextFile().
atomic_int32 g_modified_cache |
Definition at line 64 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
int g_num_dirs = -1 |
Number of cache directories already examined.
Definition at line 57 of file cvmfs_fsck.cc.
Referenced by GetNextFile().
atomic_int32 g_num_err_fixed |
Definition at line 48 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
atomic_int32 g_num_err_operational |
Definition at line 50 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
atomic_int32 g_num_err_unfixed |
Definition at line 49 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
atomic_int32 g_num_files |
Definition at line 47 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
int g_num_threads = 1 |
Definition at line 60 of file cvmfs_fsck.cc.
Referenced by main().
atomic_int32 g_num_tmp_catalog |
Definition at line 51 of file cvmfs_fsck.cc.
Referenced by main(), and MainCheck().
bool g_verbose = false |
Definition at line 62 of file cvmfs_fsck.cc.
Referenced by GetNextFile(), main(), and MainCheck().