<commit_before>/**
 * This file is part of the CernVM File System.
 *
 * The NFS maps module maintains inode -- path relations.  An inode that is
 * issued once by an NFS exported file system might be asked for
 * any time later by clients.
 *
 * In "NFS mode", cvmfs will issue inodes consequtively and reuse inodes
 * based on path name.  The inode --> path and path --> inode maps are
 * handled by leveldb.  This workaround is comparable to the Fuse "noforget"
 * option, except that the mappings are persistent and thus consistent during
 * cvmfs restarts.  Also, leveldb allows for restricting the memory consumption.
 *
 * The maps are not accounted for by the cache quota.
 */

#define __STDC_FORMAT_MACROS

#include "cvmfs_config.h"
#include "nfs_maps.h"

#include <inttypes.h>
#include <pthread.h>
#include <stdint.h>

#include <cassert>
#include <cstdlib>
#include <vector>

#include "leveldb/cache.h"
#include "leveldb/db.h"
#include "leveldb/env.h"
#include "leveldb/filter_policy.h"
#include "logging.h"
#include "nfs_shared_maps.h"
#include "util/posix.h"
#include "util/string.h"

using namespace std;  // NOLINT

namespace nfs_maps {

leveldb::DB *db_inode2path_ = NULL;
leveldb::DB *db_path2inode_ = NULL;
leveldb::Cache *cache_inode2path_ = NULL;
leveldb::Cache *cache_path2inode_ = NULL;
const leveldb::FilterPolicy *filter_inode2path_ = NULL;
const leveldb::FilterPolicy *filter_path2inode_ = NULL;
leveldb::ReadOptions leveldb_read_options_;
leveldb::WriteOptions leveldb_write_options_;
uint64_t root_inode_;
uint64_t seq_;
pthread_mutex_t lock_ = PTHREAD_MUTEX_INITIALIZER;
bool spawned_ = false;  // Set to true after fork()
// If true, use sqlite db that can be put on a shared NFS volume.<commit_msg>fix includes<commit_after>/**
 * This file is part of the CernVM File System.
 *
 * The NFS maps module maintains inode -- path relations.  An inode that is
 * issued once by an NFS exported file system might be asked for
 * any time later by clients.
 *
 * In "NFS mode", cvmfs will issue inodes consequtively and reuse inodes
 * based on path name.  The inode --> path and path --> inode maps are
 * handled by leveldb.  This workaround is comparable to the Fuse "noforget"
 * option, except that the mappings are persistent and thus consistent during
 * cvmfs restarts.  Also, leveldb allows for restricting the memory consumption.
 *
 * The maps are not accounted for by the cache quota.
 */

#define __STDC_FORMAT_MACROS

#include "cvmfs_config.h"
#include "nfs_maps.h"

#include <inttypes.h>
#include <pthread.h>
#include <stdint.h>

#include <cassert>
#include <cstdlib>

#include "atomic.h"
#include "leveldb/cache.h"
#include "leveldb/db.h"
#include "leveldb/env.h"
#include "leveldb/filter_policy.h"
#include "logging.h"
#include "nfs_shared_maps.h"
#include "util/posix.h"
#include "util/string.h"

using namespace std;  // NOLINT

namespace nfs_maps {

leveldb::DB *db_inode2path_ = NULL;
leveldb::DB *db_path2inode_ = NULL;
leveldb::Cache *cache_inode2path_ = NULL;
leveldb::Cache *cache_path2inode_ = NULL;
const leveldb::FilterPolicy *filter_inode2path_ = NULL;
const leveldb::FilterPolicy *filter_path2inode_ = NULL;
leveldb::ReadOptions leveldb_read_options_;
leveldb::WriteOptions leveldb_write_options_;
uint64_t root_inode_;
uint64_t seq_;
pthread_mutex_t lock_ = PTHREAD_MUTEX_INITIALIZER;
bool spawned_ = false;  // Set to true after fork()
// If true, use sqlite db that can be put on a shared NFS volume.
{'fraction_non_alphanumeric': 0.09638205499276412, 'fraction_numerical': 0.005788712011577424, 'mean_word_length': 4.827993254637437, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '718589', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1138, 'n_words': 394}