CernVM-FS
2.12.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
helpers.h
Go to the documentation of this file.
1
4
#ifndef CVMFS_SHRINKWRAP_POSIX_HELPERS_H_
5
#define CVMFS_SHRINKWRAP_POSIX_HELPERS_H_
6
7
#include <sys/stat.h>
8
#include <sys/types.h>
9
10
#include <map>
11
#include <string>
12
13
#include "
statistics.h
"
14
15
#define WARNING_FILE_NAME "DO_NOT_MODIFY_THIS_IS_AN_AUTOGENERATED_DIRECTORY"
16
#define POSIX_GARBAGE_DIR "/.garbage"
17
#define POSIX_GARBAGE_FLAGGED_FILE "/flagged"
18
#define POSIX_GC_STAT_FILES_REMOVED "Files removed"
19
#define POSIX_GC_STAT_BYTES_REMOVED "Bytes removed"
20
21
const
unsigned
kDirLevels
= 2;
22
const
unsigned
kDigitsPerDirLevel
= 2;
23
24
struct
fs_traversal_posix_context
{
25
int
num_threads
;
26
std::map<ino_t, bool>
gc_flagged
;
27
};
28
32
void
InitialFsOperations
(
struct
fs_traversal_context
*
ctx
);
33
void
FinalizeFsOperations
(
struct
fs_traversal_context
*
ctx
);
34
void
InitializeWarningFile
(
struct
fs_traversal_context
*
ctx
);
35
39
std::string
BuildPath
(
struct
fs_traversal_context
*
ctx
,
const
char
*dir);
40
std::string
BuildHiddenPath
(
struct
fs_traversal_context
*
ctx
,
41
const
char
*ident);
42
int
PosixSetMeta
(
const
char
*path,
43
const
struct
cvmfs_attr
*stat_info,
bool
set_permissions =
true
);
44
45
bool
BackupMtimes
(std::string path,
struct
utimbuf *mtimes);
46
47
48
#endif // CVMFS_SHRINKWRAP_POSIX_HELPERS_H_
fs_traversal_posix_context::gc_flagged
std::map< ino_t, bool > gc_flagged
Definition:
helpers.h:26
ctx
struct cvmcache_context * ctx
Definition:
cvmfs_cache_null.cc:65
fs_traversal_posix_context
Definition:
helpers.h:24
InitialFsOperations
void InitialFsOperations(struct fs_traversal_context *ctx)
Definition:
helpers.cc:39
PosixSetMeta
int PosixSetMeta(const char *path, const struct cvmfs_attr *stat_info, bool set_permissions)
Definition:
helpers.cc:79
FinalizeFsOperations
void FinalizeFsOperations(struct fs_traversal_context *ctx)
Definition:
helpers.cc:45
statistics.h
InitializeWarningFile
void InitializeWarningFile(struct fs_traversal_context *ctx)
Definition:
helpers.cc:49
kDigitsPerDirLevel
const unsigned kDigitsPerDirLevel
Definition:
helpers.h:22
BuildPath
std::string BuildPath(struct fs_traversal_context *ctx, const char *dir)
Definition:
helpers.cc:61
kDirLevels
const unsigned kDirLevels
Definition:
helpers.h:21
BackupMtimes
bool BackupMtimes(std::string path, struct utimbuf *mtimes)
Definition:
helpers.cc:116
cvmfs_attr
Definition:
libcvmfs.h:150
BuildHiddenPath
std::string BuildHiddenPath(struct fs_traversal_context *ctx, const char *ident)
Definition:
helpers.cc:72
fs_traversal_context
Definition:
fs_traversal_interface.h:11
fs_traversal_posix_context::num_threads
int num_threads
Definition:
helpers.h:25
cvmfs
cvmfs
shrinkwrap
posix
helpers.h
Generated on Sun Dec 15 2024 01:18:12 for CernVM-FS by
1.8.5