Commit Graph
55 Commits
Author SHA1 Message Date
Ming-Hung Tsai 9837feaee5 [thin_scan] refactoring and performance improvement (#111) 2018-08-15 07:56:45 +01:00
Ming-Hung Tsai 4b08c7793d [space map] fix accounting of allocatable blocks (#98)
Preserve the input block first to avoid reusing it in subsequent
shadow operations, e.g., shadow another block when releasing
a recursive lock. (issue #97)
2018-06-07 07:45:37 +01:00
Ming-Hung Tsai 582e424560 [space-map-disk] fix the number of free blocks (#93) 2018-04-17 14:00:44 +01:00
Ming-Hung Tsai 591f725232 [space map disk] reduce the lock counts to speed up free block searching (#84)
Avoid repetitively acquiring/releasing the bitmap while finding a free block
2017-09-04 18:05:19 +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
Ming-Hung Tsai 6c1be8d6fa [block-cache] Fix error handling in reading libaio events
io_event::res is a signed int64 in kernel, but libaio defines it
as unsigned long. We should cast it to a signed value.
2016-10-06 23:42:27 +08:00
Ming-Hung Tsai 45dbc2593a [thin_ll_restore] check preallocation of output file 2016-08-10 23:41:25 +08:00
Ming-Hung Tsai 6863db6f86 [thin] fix duplicated counting of mapped blocks in restore emitter 2016-08-10 23:40:48 +08:00
Ming-Hung Tsai 7eac48793c [space map disk] tidy up: add const qualifier 2016-06-20 00:40:10 +08:00
Ming-Hung Tsai 3439dbfdfc [metadata_counter] hide count_trees() and count_space_maps() 2016-06-20 00:30:26 +08:00
Ming-Hung Tsai 9e7af6b677 [metadata_counter] remove explicit try/catch when counting data space map
Unlike metadata_index_store, the constructor of btree_index_store
doesn't throw exceptions.
2016-06-20 00:30:26 +08:00
Ming-Hung Tsai 60eb608825 [counting_visitor] fix the path for ValueCounter 2016-06-20 00:30:25 +08:00
Ming-Hung Tsai e8f1bda1a5 [thin] store the device id in single_mapping_tree_damage_visitor for error reporting
1. fix the damage type for single_mapping_tree_damage_visitor
2. walk_mapping_tree() now requires the device id
3. update metadata_dumper and thin_ls for the new walk_mapping_tree()
2016-06-20 00:30:25 +08:00
Ming-Hung Tsai e985b8b3be [thin_scan][thin_ll_*] fix the data type for getopt_long return value to int
For toolchains represent char as unsigned type
2016-05-20 00:54:31 +08:00
Ming-Hung Tsai 55ecf87439 [thin_ll_restore] fix the data type of blocknr to uint64_t 2016-05-20 00:53:51 +08:00
Ming-Hung Tsai 2203e2b513 [btree_node_checker] tidy up the code
1. Add const qualifiers
2. Add virtual destructor
2016-05-20 00:53:35 +08:00
Ming-Hung Tsai 810e86e675 [counting_visitor] cleanup: remove redundant statements 2016-04-05 17:05:28 +08:00
Ming-Hung Tsai 9322fc9f14 [btree_damage_visitor] cleanup: remove redundant statements 2016-04-05 16:18:46 +08:00
Ming-Hung Tsai f20e2a0f40 [thin_check] cleanup: use metadata_counter 2016-04-05 16:09:58 +08:00
Ming-Hung Tsai c8aabf2948 [metadata_counter] fix repeated counting of trees 2016-04-05 16:09:58 +08:00
Ming-Hung Tsai 1dce79bd55 [btree_damage_visitor] cleanup: use btree_node_checker 2016-04-05 16:09:58 +08:00
Ming-Hung Tsai c6c5086068 [thin_ll_dump] cleanup: use btree_node_checker 2016-04-05 16:09:58 +08:00
Ming-Hung Tsai 6dc9a90fec [counting_visitor] fix unnecessary value visiting
1. Do not inherit btree_damage_visitor to avoid unnecessary
   value visiting.
   (reverts commit b22495997a)
2. Use btree_node_checker to do node checking
2016-04-05 16:09:58 +08:00
Ming-Hung Tsai 4a4dc1a5e0 [btree_node_checker] first draft
Spin-off from btree_damage_visitor
2016-04-03 00:43:43 +08:00
Ming-Hung Tsai 055623b90f [thin_ll_dump] Fix option -m to accept optional argument 2016-03-19 13:59:38 +08:00
Ming-Hung Tsai 220ece1dc8 [thin] Cleanup: move methods before data member declaration 2016-03-06 23:21:09 +08:00
Ming-Hung Tsai 8232feb855 [thin_scan] Cleanup: remove unnecessary variables 2016-03-06 11:42:38 +08:00
Ming-Hung Tsai 9f15c5589f [thin_scan] Cleanup: move methods before data member declaration 2016-03-06 11:42:38 +08:00
Ming-Hung Tsai 6fb5f8241d [thin_scan] Factor out range manipulation code 2016-03-05 22:31:09 +08:00
Ming-Hung Tsai 400613305c [thin_ll_restore] Cleanup: use device_details' constructor 2016-03-05 14:12:58 +08:00
Ming-Hung Tsai 08219a60b6 [thin] Add default constructor to struct device_details 2016-03-05 14:12:13 +08:00
Ming-Hung Tsai 08a7093cd5 [thin_ll_dump][thin_ll_restore] first draft 2016-02-27 15:24:28 +08:00
Ming-Hung Tsai b05b9aa227 [thin_scan] first draft 2016-02-27 15:24:14 +08:00
Ming-Hung Tsai 80783e7729 Add metadata_counter.{h,cc} 2016-02-27 15:23:06 +08:00
Ming-Hung Tsai d068ec8082 Add utility class binary_block_counter 2016-02-27 15:22:09 +08:00
Ming-Hung Tsai b22495997a Allow counting_visitor to work with damaged btrees 2016-02-27 15:22:00 +08:00
Ming-Hung Tsai ad03114bf7 Add utility class btree_detail::key_value_extractor 2016-02-27 15:21:44 +08:00
Ming-Hung Tsai c571a08f6c Add utility class btree_detail::noop_value_visitor 2016-02-27 15:21:32 +08:00
Ming-Hung Tsai a48227188e Add utility class btree_detail::noop_damage_visitor 2016-02-27 15:21:23 +08:00
Ming-Hung Tsai 778c153c1e [block-cache] Add check_raw() to bcache::validator 2016-02-27 15:21:13 +08:00
Ming-Hung Tsai 45e9916428 Expose validator creation interface 2016-02-27 15:21:05 +08:00
Ming-Hung Tsai 992ad02ce9 [restore_emitter] Recount device_details::mapped_blocks_ 2016-02-27 15:20:56 +08:00
Ming-Hung Tsai d28e64aff0 [xml_parser] Allow element handlers to stop parsing 2016-02-27 15:20:45 +08:00
Ming-Hung Tsai ced9929ca6 [metadata_dumper] Support dump a bottom-level data mapping tree 2016-02-27 15:20:31 +08:00
Ming-Hung Tsai 7ec47158b5 [emitter] Preserve the flags and version entries in superblock 2016-02-27 15:20:02 +08:00
Ming-Hung Tsai b47c02ed8b Show the wanted checksum in bad-superblock-checksum exception 2016-02-27 15:04:08 +08:00
Ming-Hung Tsai d2260dee34 Show the block address in exception string 2016-02-27 15:04:08 +08:00
Ming-Hung Tsai b1d4b9f7c8 Show the block address of error nodes 2016-02-27 15:04:08 +08:00
Ming-Hung Tsai 11cd796652 Show the block address if block_cache::get() failed 2016-02-27 15:04:08 +08:00
Ming-Hung Tsai 3be4fe985f [build] Add AC_SYS_LARGEFILE to check for large-file support
To use off64_t on 32-bit system
2015-11-27 23:38:55 +08:00
Ming-Hung Tsai e528fa1972 Add BLKDISCARD definition 2015-11-27 23:38:42 +08:00
Ming-Hung Tsai 856bd95d8e Fix the unit of superblock::metadata_block_size_ to be sector-based 2015-11-27 23:38:37 +08:00
Ming-Hung Tsai 03590d3c91 Fix bug in superblock UUID string copy 2015-11-27 23:38:27 +08:00
Ming-Hung Tsai 77f803c528 [build] Support external strip command 2015-11-27 23:35:46 +08:00
Ming-Hung Tsai febe80f4bb [damage_visitor] update path_tracker in error_accessing_node() 2015-11-27 23:31:12 +08:00