XRootD
XrdPfc::DataFsState Struct Reference

#include <XrdPfcDirState.hh>

+ Inheritance diagram for XrdPfc::DataFsState:
+ Collaboration diagram for XrdPfc::DataFsState:

Public Member Functions

 DataFsState ()
 
void dump_recursively (int max_depth) const
 
DirStatefind_dirstate_for_lfn (const std::string &lfn, DirState **last_existing_dir=nullptr)
 
DirStateget_root ()
 
void init_stat_reset_times (time_t t)
 
void reset_sshot_stats (time_t last_update)
 
void reset_stats (time_t last_update)
 
void update_stats_and_usages (time_t last_update, bool purge_empty_dirs, unlink_func unlink_foo)
 

Public Attributes

DirState m_root
 
time_t m_sshot_stats_reset_time = 0
 
time_t m_stats_reset_time = 0
 
- Public Attributes inherited from XrdPfc::DataFsStateBase
long long m_disk_total = 0
 
long long m_disk_used = 0
 
long long m_file_usage = 0
 
long long m_meta_total = 0
 
long long m_meta_used = 0
 
time_t m_usage_update_time = 0
 

Detailed Description

Definition at line 118 of file XrdPfcDirState.hh.

Constructor & Destructor Documentation

◆ DataFsState()

XrdPfc::DataFsState::DataFsState ( )
inline

Definition at line 125 of file XrdPfcDirState.hh.

125 : m_root() {}

Member Function Documentation

◆ dump_recursively()

void DataFsState::dump_recursively ( int  max_depth) const

Definition at line 293 of file XrdPfcDirState.cc.

294 {
295  if (max_depth < 0)
296  max_depth = 4096;
297 
298  printf("DataFsState::dump_recursively delta_t = %lld, max_dump_depth = %d\n",
299  (long long)(m_usage_update_time - m_stats_reset_time), max_depth);
300 
301  m_root.dump_recursively("root", max_depth);
302 }
void dump_recursively(const char *name, int max_depth) const

References XrdPfc::DirState::dump_recursively(), m_root, m_stats_reset_time, and XrdPfc::DataFsStateBase::m_usage_update_time.

Referenced by XrdPfc::ResourceMonitor::heart_beat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_dirstate_for_lfn()

DirState* XrdPfc::DataFsState::find_dirstate_for_lfn ( const std::string &  lfn,
DirState **  last_existing_dir = nullptr 
)
inline

Definition at line 131 of file XrdPfcDirState.hh.

132  {
133  return m_root.find_path(lfn, -1, true, true, last_existing_dir);
134  }
DirState * find_path(const std::string &path, int max_depth, bool parse_as_lfn, bool create_subdirs, DirState **last_existing_dir=nullptr)

References XrdPfc::DirState::find_path(), and m_root.

Referenced by XrdPfc::ResourceMonitor::process_queues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_root()

DirState* XrdPfc::DataFsState::get_root ( )
inline

Definition at line 129 of file XrdPfcDirState.hh.

129 { return & m_root; }

References m_root.

Referenced by XrdPfc::ResourceMonitor::heart_beat(), XrdPfc::ResourceMonitor::perform_initial_scan(), XrdPfc::ResourceMonitor::perform_purge_check(), and XrdPfc::ResourceMonitor::process_queues().

+ Here is the caller graph for this function:

◆ init_stat_reset_times()

void XrdPfc::DataFsState::init_stat_reset_times ( time_t  t)
inline

Definition at line 127 of file XrdPfcDirState.hh.

References m_sshot_stats_reset_time, and m_stats_reset_time.

Referenced by XrdPfc::ResourceMonitor::main_thread_function().

+ Here is the caller graph for this function:

◆ reset_sshot_stats()

void DataFsState::reset_sshot_stats ( time_t  last_update)

Definition at line 287 of file XrdPfcDirState.cc.

288 {
290  m_sshot_stats_reset_time = last_update;
291 }

References m_root, m_sshot_stats_reset_time, and XrdPfc::DirState::reset_sshot_stats().

Referenced by XrdPfc::ResourceMonitor::heart_beat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_stats()

void DataFsState::reset_stats ( time_t  last_update)

Definition at line 281 of file XrdPfcDirState.cc.

282 {
284  m_stats_reset_time = last_update;
285 }

References m_root, m_stats_reset_time, and XrdPfc::DirState::reset_stats().

Referenced by XrdPfc::ResourceMonitor::heart_beat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_stats_and_usages()

void DataFsState::update_stats_and_usages ( time_t  last_update,
bool  purge_empty_dirs,
unlink_func  unlink_foo 
)

Definition at line 275 of file XrdPfcDirState.cc.

276 {
277  m_root.update_stats_and_usages(purge_empty_dirs, unlink_foo);
278  m_usage_update_time = last_update;
279 }
void update_stats_and_usages(bool purge_empty_dirs, unlink_func unlink_foo)

References m_root, XrdPfc::DataFsStateBase::m_usage_update_time, and XrdPfc::DirState::update_stats_and_usages().

Referenced by XrdPfc::ResourceMonitor::heart_beat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_root

◆ m_sshot_stats_reset_time

time_t XrdPfc::DataFsState::m_sshot_stats_reset_time = 0

◆ m_stats_reset_time

time_t XrdPfc::DataFsState::m_stats_reset_time = 0

Definition at line 121 of file XrdPfcDirState.hh.

Referenced by dump_recursively(), init_stat_reset_times(), and reset_stats().


The documentation for this struct was generated from the following files: