Commit Graph

27 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
Joe Thornber
13323bd52c [cache_check] Don't even open the dev writeable if
--clear-needs-check-flag is not set
2017-03-27 08:58:56 -04:00
Joe Thornber
05c4b7b400 [cache] a lot of format 2 changes 2016-09-30 11:21:20 -04:00
Joe Thornber
c93e728ef4 [base] introduce a command type that gets registered with the app 2016-01-08 12:51:52 +00:00
Zdenek Kabelac
271ff67f91 Cache check close RO opened device before reopen.
When check_check is used with --clear-needs-check-flag option,
device needs to be opened in RW exclusive mode, but for this
existing RO exlusive open must be closed.

LVM2 will consider version 0.5.3 as a version without flag support
for cache_check since it cannot successfully pass cache_check.

TODO: when 'RO' parts detects there is nothing to 'clear' it should
completely skip RW open to avoid udev rule processing.
2015-07-28 14:37:44 +01:00
Joe Thornber
6ab0833b2e cache_check: add --clear-needs-check 2015-06-09 14:01:22 +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
6f8b7e2914 [all] Build a single executable 2014-08-27 14:01:31 +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
d517684c95 Initial code drop for merging block_cache 2014-07-22 16:41:39 +01:00
Joe Thornber
81fa131748 [cache_check] --super-block-only rather than --superblock-only
Be consistent with help and thin_check
2014-01-08 20:05:55 +00:00
Joe Thornber
8049d369a9 stuff 2013-12-11 17:28:14 +00:00
Denys Duchier
3a4c06b772 use persistent-data::bitset to avoid ambiguity 2013-11-16 21:42:23 +01:00
Joe Thornber
764ee0b0c5 [cache_check] tweak exception handling; there was a window where they weren't caught 2013-10-11 11:04:06 +01:00
Joe Thornber
d54bc41026 [cache_check] fixup version number 2013-10-11 10:33:32 +01:00
Joe Thornber
ea15a329d7 [cache_check] Now checks discard bitset 2013-10-11 10:22:02 +01:00
Joe Thornber
505cf95109 [cache_check] --super-block-only, --skip-mappings, --skip-hints 2013-10-08 11:34:10 +01:00
Joe Thornber
a20b50815e [cache_check] remove some dead code 2013-10-08 11:17:20 +01:00
Joe Thornber
be22981a7d [ache_check] hint array damage reporting 2013-10-08 11:00:05 +01:00
Joe Thornber
81a72c8a35 [cache_check] mapping damage reporter 2013-10-08 09:36:20 +01:00
Joe Thornber
42fd6b928b [cache_check] A whole bunch of superblock checks 2013-10-07 15:21:45 +01:00
Joe Thornber
fd7c539a58 [cache_check] Errors weren't being propagated up to the exit code 2013-10-04 16:08:31 +01:00
Joe Thornber
e7223037d4 [cache_check] wip 2013-10-02 10:50:42 +01:00
Joe Thornber
4360c8cbff Some work on cache_check and cache_restore 2013-08-16 16:29:41 +01:00
Joe Thornber
67551d81f1 Put error_state into into it's own file. 2013-08-16 14:07:04 +01:00