|
autotier
Automatic Tiering Fuse Filesystem
|
TierEngine component to handle ad hoc commands. More...
#include <adhoc.hpp>


Public Member Functions | |
| TierEngineAdhoc (const fs::path &config_path, const ConfigOverrides &config_overrides) | |
| Construct a new Tier Engine Adhoc object. More... | |
| ~TierEngineAdhoc () | |
| Destroy the Tier Engine Adhoc object. More... | |
| void | set_socket_permissions (void) |
Get the gid for group autotier and set the owner of the socket to root:autotier. More... | |
| void | process_adhoc_requests (void) |
| Function for ad hoc server thread. Listens to named FIFO in run_path_ to receive ad hoc commands from running autotier while mounted. Grabs command and queues work as an AdHoc object in TierEngineBase::adhoc_work_. More... | |
| void | process_oneshot (const AdHoc &work) |
| Enqueue oneshot AdHoc command into adhoc_work_. More... | |
| void | process_pin_unpin (const AdHoc &work) |
| Enqueue pin or unpin AdHoc command into adhoc_work_. More... | |
| void | process_status (const AdHoc &work) |
| Iterate through list of tiers, printing ID, path, current usage, and watermark. More... | |
| void | process_config (void) |
| Dump current configuration settings from memory. More... | |
| void | process_list_pins (void) |
| Send all pinned files with the corresponding tier they are pinned to. More... | |
| void | process_list_popularity (void) |
| Send all file paths in filesystem along with popularity. More... | |
| void | process_which_tier (AdHoc &work) |
| Send table of each argument file along with its corresponding tier name and full backend path. More... | |
| template<typename... Args> | |
| void | enqueue_work (Args &&...args) |
| Emplace an AdHoc job into the work queue. More... | |
| void | execute_queued_work (void) |
| Process each Adhoc job enqueued in adhoc_queue_, popping them. Called by the tiering thread as part of the main tier loop in begin(). | |
| void | pin_files (const std::vector< std::string > &args) |
| Iterate through each string in args[1:] to tier name in args[0]. Sets Metadata::pinned_ flag of each file then moves the file. More... | |
| void | unpin_files (const std::vector< std::string > &args) |
| Iterate through args, clearing the Metadata::pinned_ flag of each file. More... | |
| void | shutdown_socket_server (void) |
| Call socket_server.shutdown() to wake adhoc server thread from wait_for_connection() More... | |
Public Member Functions inherited from TierEngineBase | |
| TierEngineBase (const fs::path &config_path, const ConfigOverrides &config_overrides) | |
| Construct a new Tier Engine Base object. More... | |
| virtual | ~TierEngineBase (void) |
| Destroy the Tier Engine Base object. More... | |
| int | create_run_path (void) const |
| Creates path for FIFOs and database, chowning to root:autotier. More... | |
| std::list< Tier > & | get_tiers (void) |
| Get reference to the list of tiers.Used in fusePassthrough.cpp to get references to each tier for finding full backend paths. More... | |
| Tier * | tier_lookup (fs::path p) |
| Find Tier from path. More... | |
| Tier * | tier_lookup (std::string id) |
| Find tier from ID. More... | |
| void | mount_point (const fs::path &mount_point) |
| Set the mount_point_ variable. More... | |
| virtual bool | tier (void) |
| Virtual tier function to allow other components to call TierEngineTiering::tier(). More... | |
| virtual bool | currently_tiering (void) const |
Private Attributes | |
| bool | oneshot_in_queue_ |
| ffd::UnixSocketServer | socket_server_ |
| IPC server. | |
Additional Inherited Members | |
Protected Member Functions inherited from TierEngineBase | |
| virtual void | exit (int status) const |
| Virtual exit function that can be overridden by other components for cleanup. More... | |
Protected Attributes inherited from TierEngineBase | |
| bool | stop_flag_ |
| Set to false to make thread exit. Used to continue or cancel sleeping after being woken to do ad hoc command work. More... | |
| std::list< Tier > | tiers_ |
| List of tiers built from configuration file. | |
| Config | config_ |
| Configuration read from config_file path. | |
| fs::path | run_path_ |
| Path to mutex lock file, ad hoc FIFO, and database. Defaults to /var/lib/autotier/<hash of config path>, can be overridden in config. | |
| fs::path | mount_point_ |
| Where autotier filesystem is mounted, set by mount_point(). | |
| ConcurrentQueue< AdHoc > | adhoc_work_ |
| std::condition_variable | sleep_cv_ |
| Condition variable to use wait_until to sleep between tiering, used for the ad hoc server thread or the main thread to wake the tiering thread from sleep. More... | |
| std::shared_ptr< rocksdb::DB > | db_ |
| Nosql database holding file metadata. | |
TierEngine component to handle ad hoc commands.
| TierEngineAdhoc::TierEngineAdhoc | ( | const fs::path & | config_path, |
| const ConfigOverrides & | config_overrides | ||
| ) |
| TierEngineAdhoc::~TierEngineAdhoc | ( | ) |
Destroy the Tier Engine Adhoc object.
|
inline |
Emplace an AdHoc job into the work queue.
| work | Job to execute. |
| void TierEngineAdhoc::pin_files | ( | const std::vector< std::string > & | args | ) |
Iterate through each string in args[1:] to tier name in args[0]. Sets Metadata::pinned_ flag of each file then moves the file.
| args | Tier name and list of files to pin. |
| void TierEngineAdhoc::process_adhoc_requests | ( | void | ) |
Function for ad hoc server thread. Listens to named FIFO in run_path_ to receive ad hoc commands from running autotier while mounted. Grabs command and queues work as an AdHoc object in TierEngineBase::adhoc_work_.
| void TierEngineAdhoc::process_config | ( | void | ) |
Dump current configuration settings from memory.
| void TierEngineAdhoc::process_list_pins | ( | void | ) |
Send all pinned files with the corresponding tier they are pinned to.
| void TierEngineAdhoc::process_list_popularity | ( | void | ) |
Send all file paths in filesystem along with popularity.
| void TierEngineAdhoc::process_oneshot | ( | const AdHoc & | work | ) |
Enqueue oneshot AdHoc command into adhoc_work_.
| work | The command to be processed, containing needed args_. |
| void TierEngineAdhoc::process_pin_unpin | ( | const AdHoc & | work | ) |
Enqueue pin or unpin AdHoc command into adhoc_work_.
| work | The command to be processed, containing needed args_. |
| void TierEngineAdhoc::process_status | ( | const AdHoc & | work | ) |
Iterate through list of tiers, printing ID, path, current usage, and watermark.
| work | The command to be processed, containing needed args_. |
| void TierEngineAdhoc::process_which_tier | ( | AdHoc & | work | ) |
Send table of each argument file along with its corresponding tier name and full backend path.
| work | The command to be processed, containing needed args_. |
| void TierEngineAdhoc::set_socket_permissions | ( | void | ) |
Get the gid for group autotier and set the owner of the socket to root:autotier.
| void TierEngineAdhoc::shutdown_socket_server | ( | void | ) |
Call socket_server.shutdown() to wake adhoc server thread from wait_for_connection()
| void TierEngineAdhoc::unpin_files | ( | const std::vector< std::string > & | args | ) |
Iterate through args, clearing the Metadata::pinned_ flag of each file.
| args | List of file paths to unpin. |
1.8.17