CernVM-FS  2.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BaseMagicXattr Class Referenceabstract

#include <magic_xattr.h>

Inheritance diagram for BaseMagicXattr:
Collaboration diagram for BaseMagicXattr:

Public Member Functions

 BaseMagicXattr ()
virtual bool PrepareValueFenced ()
virtual std::string GetValue ()=0
virtual MagicXattrFlavor GetXattrFlavor ()
void Lock (PathString path, catalog::DirectoryEntry *dirent)
void Release ()
virtual ~BaseMagicXattr ()

Protected Attributes

PathString path_
pthread_mutex_t access_mutex_


class MagicXattrManager

Detailed Description

This is a base class for magic extended attribute. Concrete extended attributes inherit from this class. It should be generally used only in cooperation with MagicXattrManager. It contains an access mutex. Users should use Lock() and Release() before and after usage (Lock() is called implicitly in MagicXattrManager).

To read out the attribute value, do: 0. Get an instance through MagicXattrManager::Get()

  1. Call PrepareValueFenced() inside FuseRemounter::fence()
  2. Call GetValue() to get the actual value (can be called outside the fence)

Definition at line 40 of file magic_xattr.h.

Constructor & Destructor Documentation

BaseMagicXattr::BaseMagicXattr ( )

Definition at line 44 of file magic_xattr.h.

Here is the call graph for this function:

virtual BaseMagicXattr::~BaseMagicXattr ( )

Definition at line 74 of file magic_xattr.h.

Member Function Documentation

virtual MagicXattrFlavor BaseMagicXattr::GetXattrFlavor ( )

Reimplemented in AuthzMagicXattr, SymlinkMagicXattr, RegularMagicXattr, and WithHashMagicXattr.

Definition at line 61 of file magic_xattr.h.

void BaseMagicXattr::Lock ( PathString  path,
catalog::DirectoryEntry dirent 

Definition at line 63 of file magic_xattr.h.

Referenced by MagicXattrManager::GetLocked(), and MagicXattrRAIIWrapper::MagicXattrRAIIWrapper().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BaseMagicXattr::PrepareValueFenced ( )
void BaseMagicXattr::Release ( )

Definition at line 69 of file magic_xattr.h.

Referenced by MagicXattrRAIIWrapper::~MagicXattrRAIIWrapper().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class MagicXattrManager

Definition at line 41 of file magic_xattr.h.

Member Data Documentation

pthread_mutex_t BaseMagicXattr::access_mutex_

Definition at line 81 of file magic_xattr.h.

Referenced by BaseMagicXattr(), Lock(), and Release().

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