autotier
Automatic Tiering Fuse Filesystem
Public Member Functions | Public Attributes | Private Attributes | List of all members
FusePriv Class Reference

Fuse Private data class grabbed from fuse_get_context()->private_data (void*) in fuse filesystem functions. More...

#include <fuseOps.hpp>

Collaboration diagram for FusePriv:
Collaboration graph
[legend]

Public Member Functions

 ~FusePriv ()
 Destroy the Fuse Priv object, freeing all cstrings in fd_to_path_. More...
 
void insert_fd_to_path (int fd, char *path)
 Insert fd : path pair into fd_to_path_ map. More...
 
void remove_fd_to_path (int fd)
 Remove fd : path pair from fd_to_path_ map. More...
 
char * fd_to_path (int fd) const
 Return path corresponding to file descriptor. More...
 
void insert_size_at_open (int fd, uintmax_t size)
 Insert fd : size at open pair into size_at_open_ map. More...
 
void remove_size_at_open (int fd)
 Remove fd : size at open pair from size_at_open_ map. More...
 
uintmax_t size_at_open (int fd) const
 Return file size at open corresponding to fd to determine size delta at close. More...
 

Public Attributes

fs::path config_path_
 Path to configuration file TODO: see if this is used anywhere.
 
fs::path mount_point_
 Path to autotierfs mount point.
 
TierEngineautotier_
 Pointer to TierEngine.
 
std::shared_ptr< rocksdb::DB > db_
 RocksDB database holding file metadata.
 
std::vector< Tier * > tiers_
 List of pointers to tiers from TierEngine.
 
std::thread tier_worker_
 Thread running TierEngineTiering::begin()
 
std::thread adhoc_server_
 Thread running TierEngineAdhoc::process_adhoc_requests()
 

Private Attributes

std::mutex fd_to_path_mt_
 Mutex to synchronize insertion and deletion from fd_to_path_ map. More...
 
std::unordered_map< int, char * > fd_to_path_
 Map relating file descriptor to file path. More...
 
std::mutex size_at_open_mt_
 Mutex to synchronize insertion and deletion from size_at_open_ map. More...
 
std::unordered_map< int, uintmax_t > size_at_open_
 Map relating file descriptor to file size at open. More...
 

Detailed Description

Fuse Private data class grabbed from fuse_get_context()->private_data (void*) in fuse filesystem functions.

Constructor & Destructor Documentation

◆ ~FusePriv()

FusePriv::~FusePriv ( )
inline

Destroy the Fuse Priv object, freeing all cstrings in fd_to_path_.

Member Function Documentation

◆ fd_to_path()

char* FusePriv::fd_to_path ( int  fd) const
inline

Return path corresponding to file descriptor.

Parameters
fdFile descriptor
Returns
char* Path to file

◆ insert_fd_to_path()

void FusePriv::insert_fd_to_path ( int  fd,
char *  path 
)
inline

Insert fd : path pair into fd_to_path_ map.

Parameters
fdFile descriptor
pathPath to file

◆ insert_size_at_open()

void FusePriv::insert_size_at_open ( int  fd,
uintmax_t  size 
)
inline

Insert fd : size at open pair into size_at_open_ map.

Parameters
fdFile descriptor
sizeSize of file at open

◆ remove_fd_to_path()

void FusePriv::remove_fd_to_path ( int  fd)
inline

Remove fd : path pair from fd_to_path_ map.

Parameters
fdFile descriptor to remove

◆ remove_size_at_open()

void FusePriv::remove_size_at_open ( int  fd)
inline

Remove fd : size at open pair from size_at_open_ map.

Parameters
fdFile descriptor to remove

◆ size_at_open()

uintmax_t FusePriv::size_at_open ( int  fd) const
inline

Return file size at open corresponding to fd to determine size delta at close.

Parameters
fdFile descriptor
Returns
uintmax_t Size of file at open

Member Data Documentation

◆ fd_to_path_

std::unordered_map<int, char *> FusePriv::fd_to_path_
private

Map relating file descriptor to file path.

◆ fd_to_path_mt_

std::mutex FusePriv::fd_to_path_mt_
private

Mutex to synchronize insertion and deletion from fd_to_path_ map.

◆ size_at_open_

std::unordered_map<int, uintmax_t> FusePriv::size_at_open_
private

Map relating file descriptor to file size at open.

◆ size_at_open_mt_

std::mutex FusePriv::size_at_open_mt_
private

Mutex to synchronize insertion and deletion from size_at_open_ map.


The documentation for this class was generated from the following file: