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
 
DirState * find_dirstate_for_lfn (const std::string &lfn, DirState **last_existing_dir=nullptr)
 
DirState * get_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 139 of file XrdPfcDirState.hh.

Constructor & Destructor Documentation

◆ DataFsState()

XrdPfc::DataFsState::DataFsState ( )
inline

Definition at line 146 of file XrdPfcDirState.hh.

146 : m_root() {}

Member Function Documentation

◆ dump_recursively()

void DataFsState::dump_recursively ( int  max_depth) const

Definition at line 294 of file XrdPfcDirState.cc.

295 {
296  if (max_depth < 0)
297  max_depth = 4096;
298 
299  printf("DataFsState::dump_recursively delta_t = %lld, max_dump_depth = %d\n",
300  (long long)(m_usage_update_time - m_stats_reset_time), max_depth);
301 
302  m_root.dump_recursively("root", max_depth);
303 }
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 152 of file XrdPfcDirState.hh.

153  {
154  return m_root.find_path(lfn, -1, true, true, last_existing_dir);
155  }
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 150 of file XrdPfcDirState.hh.

150 { 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 148 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 288 of file XrdPfcDirState.cc.

289 {
291  m_sshot_stats_reset_time = last_update;
292 }

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 282 of file XrdPfcDirState.cc.

283 {
285  m_stats_reset_time = last_update;
286 }

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 276 of file XrdPfcDirState.cc.

277 {
278  m_root.update_stats_and_usages(purge_empty_dirs, unlink_foo);
279  m_usage_update_time = last_update;
280 }
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 142 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: