Commit Graph

17 Commits

Author SHA1 Message Date
Ming-Hung Tsai
86139cf6bd [sm_recursive] Fix atomicity when applying BOPs
Any BOP should be taken only once. Therefore, we should remove BOPs
that are being processed or had been processed from the uncommitted
list.
2020-05-28 17:30:15 +08:00
Joe Thornber
4cdffafe88 [sm_recursive] Fix bug that allowed the same block to be allocated twice.
See issue 70.  Soln from mingnus.
2020-05-28 17:30:15 +08:00
Joe Thornber
128ecc27f2 [space-maps] remove count_possibly_greater_than_one
This is only ever called with a recursive space map wrapper,
and that causes too many false positives.  False positives trigger
a copy of a metadata page, so this is a false economy.
2020-05-28 07:38:58 +01:00
Joe Thornber
371d1bbd6e [space-maps/recursive] fix bug in flush_ops()
Decrements weren't being passed down properly.
2020-05-26 09:24:15 +01:00
Joe Thornber
50f8e792d3 [space-map] Make the version of inc/dec that take a count the only one. 2020-05-26 09:12:45 +01:00
Joe Thornber
12b6157c5b [space-maps/recursive] lift a lock, and add a lock 2020-05-26 08:45:35 +01:00
Joe Thornber
0e54de95e1 [space-maps/recursive] Remove some code duplication. 2020-05-26 08:38:05 +01:00
Joe Thornber
65fcda062f [space-maps/recursive] Aggregate the BOPs 2020-05-26 08:30:52 +01:00
Joe Thornber
5e6eec1bb0 [recursive space map] switch to new form 'for' statements 2020-05-26 07:49:26 +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
ee200ba85b Merge branch 'master' into space-map-checking 2015-04-07 12:18:23 +01:00
Joe Thornber
d517684c95 Initial code drop for merging block_cache 2014-07-22 16:41:39 +01:00
Joe Thornber
9f6546f621 put space map checking back in 2014-02-19 16:08:05 +00:00
Joe Thornber
8049d369a9 stuff 2013-12-11 17:28:14 +00:00
Joe Thornber
311034f771 [subtracting_span_iterator] recode using run_set 2013-07-09 11:25:09 +01:00
Joe Thornber
d8a208cbc8 A stack of space map tweaks.
new_block() is now a concrete method implemented using the virtual
find_free() and inc() methods.

recursive space map is better at giving correct reference counts.
2013-04-23 10:57:47 +01:00
Joe Thornber
326fd3408b move space maps to their own sub directory 2013-01-10 21:36:38 +00:00