Commit Graph

55 Commits

Author SHA1 Message Date
Joe Thornber
4313469475 [all] Switch from boost::shared_ptr -> std::shared_ptr.
Shared_ptr has moved into the standard library since these tools were
first written.
2020-04-30 15:02:43 +01:00
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
Joe Thornber
5e347dddbf [various] remove dead code.
Squashes warnings from clang++
2020-04-08 12:12:59 +01:00
Joe Thornber
207ef304c3 [era/restore_emitter] remove a noop
Pointless self assignment.  Value in suerpblock does get assigned properly.
2018-12-12 10:23:35 +00:00
Joe Thornber
f80200d179 [era_check] If the superblock fails the checksum try other checks. 2017-10-05 16:21:17 +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
825a58922d [era_invalidate] Tweak --help message. 2017-10-05 12:48:36 +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
Joe Thornber
924a996fa7 [era_restore] Ignore errors from zero_superblock.
Since it's on the error path.
2017-10-05 11:49:01 +01:00
Joe Thornber
5b92f410ec [*_restore] if things go wrong wipe the superblock.
So we don't leave the metadata device with partially restored metadata.
2017-09-28 14:39:24 +01:00
Joe Thornber
48e7ab89a5 [*_dump] Fix segfault when given a tiny metadata file 2017-09-21 10:22:38 +01:00
Joe Thornber
f7d79339e8 [man pages] Various updates. 2017-09-18 16:10:56 +01:00
Martin Pelikán
1be512580c Fix build with libc++ by disambiguating std::bitset away. (#83) 2017-08-26 12:53:33 +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
c2fdbad322 Merge branch '2016-07-07-improve-thin-repair-error-message' into v0.7-devel
Conflicts:
	Makefile.in
	VERSION
	configure.ac
	persistent-data/file_utils.cc
2016-07-11 15:51:30 +01:00
Joe Thornber
4779fb9b80 [various] Improve documentation
Output file must be preallocated.
2016-07-11 14:53:03 +01:00
Ming-Hung Tsai
778c153c1e [block-cache] Add check_raw() to bcache::validator 2016-02-27 15:21:13 +08:00
Joe Thornber
c93e728ef4 [base] introduce a command type that gets registered with the app 2016-01-08 12:51:52 +00:00
Joe Thornber
78b24dee19 [era_invalidate] Don't open in exclusive mode if using a metadata snap.
Patch from bobk-rey on github
2015-09-08 10:12:56 +01:00
Joe Thornber
25b4b526f4 Introduce error_string() as a portable replacement for strerror_r() 2015-01-16 12:54:09 +00:00
Joe Thornber
4c026458d5 Squash a couple of annoying compiler warnings 2014-09-02 10:13:26 +01:00
Joe Thornber
4c04a18b05 [era] era_dump should show bool values as 'true' or 'false' rather than 0 or 1 2014-09-01 14:45:05 +01:00
Joe Thornber
6f8b7e2914 [all] Build a single executable 2014-08-27 14:01:31 +01:00
Joe Thornber
828f654800 [*_restore] Add progress bar to cache_restore and era_restore.
A lot of refactoring common code between the restore tools.
2014-08-26 13:05:21 +01:00
Joe Thornber
d17ad86a88 [*_restore] Use a little wrapper class for the expat XML_Parser to ensure it gets destroyed. 2014-08-26 11:23:29 +01:00
Joe Thornber
a7c96c0e1e [everything] Fix circular shared pointer references.
We had a cycle from transaction_manager <-> space_map, and also from
the ref_counters back up to the tm.

This prevented objects being destroyed when various programs exited.

From now on we'll try and only use a shared ptr if ownership is
implied.  Otherwise a reference will be used (eg, for up pointers).
2014-08-26 11:14:49 +01:00
Joe Thornber
1a632f9d53 [era/xml restorer] bug fixes 2014-08-21 11:22:12 +01:00
Joe Thornber
5465c95134 [era/xml format] bring in line with the Ruby library 2014-08-21 11:21:47 +01:00
Joe Thornber
85ab149685 [era/metadata.{h,cc}] Support creation of new metadata 2014-08-21 11:20:43 +01:00
Joe Thornber
94356a1648 [era_check] Was returning after just checking the superblock.
Presumably old debug.
2014-08-15 10:11:35 +01:00
Joe Thornber
157eca4dd0 [era_restore] tweak help message 2014-08-12 10:20:29 +01:00
Joe Thornber
283ab4ad99 first drop of era_restore 2014-08-07 15:43:01 +01:00
Joe Thornber
8f73241119 [era] parser for the XML format 2014-08-06 16:30:38 +01:00
Joe Thornber
a75a2118a0 era_invalidate: update help to reflect --metadata-snapshot 2014-08-06 11:15:18 +01:00
Joe Thornber
7e870ea5a6 start removing block_manager<>::block 2014-07-25 14:46:51 +01:00
Joe Thornber
b32908d5c2 work in progress 2014-07-25 10:35:04 +01:00
Joe Thornber
d517684c95 Initial code drop for merging block_cache 2014-07-22 16:41:39 +01:00
Joe Thornber
e77e8715b0 Remove ambiguity between boost::uint64_t and ::uint64_t.
This has been causing people problems on uclibc builds.
2014-07-02 08:19:20 +00:00
Joe Thornber
5e3f4cf532 [era] Provide a default ctr for era_detail to quieten coverity 2014-06-26 15:35:48 +01:00
Joe Thornber
37f4c38ec3 [era/writeset_tree] Initialise era_ in the ctr to quieten coverity 2014-06-26 15:29:33 +01:00
root
72e20c2d40 remove some dead code 2014-06-16 13:41:07 +01:00
Joe Thornber
7eabc78d6d [era] qualify btiset 2014-04-01 17:43:15 +01:00
Joe Thornber
49e59ca781 [era_dump] add --logical 2014-02-14 14:35:25 +00:00
Joe Thornber
54f38e6702 [era_invalidate] Change to output ranges. 2014-02-12 11:49:41 +00:00
Joe Thornber
d3afa57082 era_invalidate 2014-01-31 16:31:27 +00:00
Joe Thornber
344f4b1e08 Factor out base/indented_stream.h 2014-01-31 13:43:39 +00:00
Joe Thornber
8531a2befa [era] switch from bloom filters to writesets 2014-01-29 21:37:25 +00:00
Joe Thornber
9e0540e1b6 era_check, era_dump 2014-01-23 00:46:03 +00:00
Joe Thornber
bed0f369a8 [era_check] Now checks bloom tree 2014-01-14 23:59:12 +00:00
Joe Thornber
41d25aa9e4 [era_check] Was always returning FATAL 2014-01-13 13:58:38 +00:00