2013-04-23 15:21:44 +01:00
|
|
|
#ifndef THIN_FILE_UTILS_H
|
|
|
|
#define THIN_FILE_UTILS_H
|
|
|
|
|
|
|
|
#include "persistent-data/block.h"
|
2017-10-05 11:53:40 +01:00
|
|
|
#include "persistent-data/transaction_manager.h"
|
2013-04-23 15:21:44 +01:00
|
|
|
|
2013-09-16 13:42:39 +01:00
|
|
|
#include <string>
|
|
|
|
|
2013-04-23 15:21:44 +01:00
|
|
|
//----------------------------------------------------------------
|
|
|
|
|
2013-09-16 13:42:39 +01:00
|
|
|
// FIXME: move to a different unit
|
2013-09-11 11:40:46 +01:00
|
|
|
namespace persistent_data {
|
2020-04-30 14:30:01 +01:00
|
|
|
bool check_for_xml(block_manager::ptr bm);
|
2017-04-30 01:51:52 +08:00
|
|
|
persistent_data::block_address get_nr_blocks(std::string const &path, sector_t block_size = MD_BLOCK_SIZE);
|
|
|
|
block_address get_nr_metadata_blocks(std::string const &path);
|
2016-03-04 10:43:58 +00:00
|
|
|
|
2020-04-30 14:30:01 +01:00
|
|
|
block_manager::ptr open_bm(std::string const &dev_path,
|
|
|
|
block_manager::mode m, bool excl = true);
|
2017-10-05 11:53:40 +01:00
|
|
|
|
2020-04-30 14:30:01 +01:00
|
|
|
block_manager::ptr open_bm(std::string const &path);
|
|
|
|
transaction_manager::ptr open_tm(block_manager::ptr bm,
|
2017-10-05 11:53:40 +01:00
|
|
|
block_address superblock_location);
|
|
|
|
|
2013-04-23 15:21:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
|
|
|
|
#endif
|