| Line |
Branch |
Exec |
Source |
| 1 |
|
|
/** |
| 2 |
|
|
* This file is part of the CernVM File System |
| 3 |
|
|
* |
| 4 |
|
|
* This file defines a class which derives `SyncUnion` |
| 5 |
|
|
* to provide support for AUFS |
| 6 |
|
|
* |
| 7 |
|
|
*/ |
| 8 |
|
|
|
| 9 |
|
|
#ifndef CVMFS_SYNC_UNION_AUFS_H_ |
| 10 |
|
|
#define CVMFS_SYNC_UNION_AUFS_H_ |
| 11 |
|
|
|
| 12 |
|
|
#include <set> |
| 13 |
|
|
#include <string> |
| 14 |
|
|
|
| 15 |
|
|
#include "sync_union.h" |
| 16 |
|
|
|
| 17 |
|
|
namespace publish { |
| 18 |
|
|
/** |
| 19 |
|
|
* Syncing a cvmfs repository by the help of an overlaid AUFS |
| 20 |
|
|
* read-write volume. |
| 21 |
|
|
*/ |
| 22 |
|
|
class SyncUnionAufs : public SyncUnion { |
| 23 |
|
|
public: |
| 24 |
|
|
SyncUnionAufs(SyncMediator *mediator, const std::string &rdonly_path, |
| 25 |
|
|
const std::string &union_path, const std::string &scratch_path); |
| 26 |
|
|
|
| 27 |
|
|
void Traverse(); |
| 28 |
|
✗ |
bool SupportsHardlinks() const { return true; } |
| 29 |
|
|
|
| 30 |
|
|
protected: |
| 31 |
|
|
bool IsWhiteoutEntry(SharedPtr<SyncItem> entry) const; |
| 32 |
|
|
bool IsOpaqueDirectory(SharedPtr<SyncItem> directory) const; |
| 33 |
|
|
bool IgnoreFilePredicate(const std::string &parent_dir, |
| 34 |
|
|
const std::string &filename); |
| 35 |
|
|
std::string UnwindWhiteoutFilename(SharedPtr<SyncItem> entry) const; |
| 36 |
|
|
|
| 37 |
|
|
private: |
| 38 |
|
|
std::set<std::string> ignore_filenames_; |
| 39 |
|
|
std::string whiteout_prefix_; |
| 40 |
|
|
}; // class SyncUnionAufs |
| 41 |
|
|
} // namespace publish |
| 42 |
|
|
#endif // CVMFS_SYNC_UNION_AUFS_H_ |
| 43 |
|
|
|