Commit Graph

11 Commits

Author SHA1 Message Date
Joe Thornber
e801cc607b [block_manager] Hard code block size to 4k.
We're never going to use anything other than 4k, and by hard coding it we
avoid making block_manager a template.
2020-04-30 14:30:01 +01:00
csonto
5b5aa971a0 Detect XML in *_check tools (#86)
* [*_check] Detect XML in cache_check and era_check

This is based on previous commit b10d8d4440.

* [*_check] Fix typo in check_superblock
2017-10-05 13:47:10 +01:00
Joe Thornber
3c761e6822 [all tools] Factor out open_bm() and open_tm.
Many duplicates of this code.
2017-10-05 11:53:40 +01:00
Ming-Hung Tsai
b7d418131d Spin-off syscall-related file operations (#78)
* [file_utils] spin-off syscall-related file operations

1. Eliminate the potential circular dependency between
   persistent-data/block.h and persistent-data/file_utils.h,
   if the former one wants to include the latter.
2. Avoid namespace pollution by removing the "using namespace std"
   declaration in block.tcc.
3. Correct the header hierarchy: base/xml_utils.h now no longer
   depends on the higher-level persistent-data/file_utils.h

* [file_utils] support block files in get_file_length()
2017-04-29 18:51:52 +01:00
Joe Thornber
3c02151a4f Merge branch 'master' into v0.7-devel
Conflicts:
	persistent-data/file_utils.cc
	persistent-data/file_utils.h
2016-04-05 13:13:10 +01:00
Joe Thornber
8676198e76 [file_utils] rename get_nr_blocks() -> get_nr_metadata_blocks() and introduce get_nr_blocks() 2016-03-04 10:43:58 +00:00
Joe Thornber
59a622670c [thin_show_duplicates] wip 2015-08-19 12:32:57 +01:00
Joe Thornber
642ae6e7c2 Tools now open the metadata device in O_EXCL mode.
An attempt to stop people running the tools on active metadata.
2015-07-07 13:47:00 +01:00
Joe Thornber
d517684c95 Initial code drop for merging block_cache 2014-07-22 16:41:39 +01:00
Joe Thornber
14122d6875 Move check_file_exists() to file_utils.{h,cc} 2013-09-16 13:42:39 +01:00
Joe Thornber
6615b25e4b WIP on cache tools 2013-09-11 11:40:46 +01:00