Commit Graph

27 Commits

Author SHA1 Message Date
Ming-Hung Tsai
621b466333 [all] Eliminate duplicated sector_t typedefs 2020-06-19 18:07:55 +08:00
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
Ming-Hung Tsai
955e11bc28 [block-cache] fix potential file descriptor leak
Encapsulate file descriptor into an object, to ensure that an fd will be
closed properly while exception raised, e.g., the block_cache throws
exception during the block_manager's construction.
2020-02-23 15:41:16 +08:00
Joe Thornber
da3f9ca476 [block-cache] tidy hit/miss tracking 2017-08-14 14:11:53 +01:00
Joe Thornber
0a47ad5a85 [block-cache] remove BF_PREVIOUSLY_DIRTY and improve nr_dirty_ accounting. 2017-08-14 13:44:21 +01:00
Joe Thornber
398d53e0d6 [block-cache] add comment to stop me removing the list sizes again. 2017-08-14 10:17:56 +01:00
Joe Thornber
4489a9bae6 [block-cache] reverse earlier patch which took out manual counts for
nr_dirty etc.

The block list type doesn't have a constant time size() method.
2017-08-14 10:13:32 +01:00
Joe Thornber
0a06e4b21b [block-cache] Remove nr_dirty_ and nr_io_pending_.
Better to use the size of the relevant list.
2017-07-24 16:08:49 +01:00
Joe Thornber
286f70ceac Merge remote-tracking branch 'remotes/github-m-h-tsai/v0.6.2-repairtool' into 2016-02-29-mingus-merge
Conflicts:
	Makefile.in
	VERSION
	thin-provisioning/commands.cc
	thin-provisioning/commands.h
	thin-provisioning/thin_delta.cc
2016-02-29 10:29:28 +00:00
Ming-Hung Tsai
778c153c1e [block-cache] Add check_raw() to bcache::validator 2016-02-27 15:21:13 +08:00
Joe Thornber
a5a53648c9 Merge branch '2015-08-19-thin-show-duplicates' into merge-thin-ls
Conflicts:
	Makefile.in
	block-cache/block_cache.h
	main.cc
	thin-provisioning/commands.h
2016-02-24 14:31:51 +00:00
Joe Thornber
767c39cf71 [build] switch to c++11
Conflicts:
	Makefile.in
	chunker/cache_stream.cc
	chunker/cache_stream.h
	thin-provisioning/thin_archive.cc
	thin-provisioning/thin_show_duplicates.cc
	unit-tests/Makefile.in
2016-02-16 16:45:44 +00:00
Joe Thornber
639af9c3bf [block-cache] convert to use boost::intrusive rather than kernel style lists.
Major change, do not release until a lot of testing has been done.

Conflicts:
	block-cache/block_cache.h
2016-02-16 16:18:13 +00:00
Joe Thornber
c8d3ce6af5 [thin_show_duplicates] start factoring out a chunk_stream abstraction 2015-08-24 11:18:31 +01:00
Joe Thornber
b5a9cd6043 [block-cache] Create just one noop_validator
No need to create a separate one for each block.
2014-08-21 14:20:36 +01:00
Joe Thornber
4799becb01 [block-cache] fix leaking validators
The memory for the blocks is explicitly managed, and the destructors
for the blocks wasn't being called.
2014-08-21 14:19:36 +01:00
Joe Thornber
0d3942cae8 [block-manager] ensure the superblock cannot be taken concurrently with any other lock. 2014-08-21 12:18:05 +01:00
Joe Thornber
f534664f96 Add stats to block cache and remove the info fn 2014-07-31 12:18:01 +01:00
Joe Thornber
a99d6896a8 Fix a bug in the block cache read path. 2014-07-29 13:41:45 +01:00
Joe Thornber
f06a2673c5 wip 2014-07-29 11:34:26 +01:00
Joe Thornber
d482a76bda Use placement new to initialise the blocks 2014-07-28 14:32:33 +01:00
Joe Thornber
840be1b6c9 wip 2014-07-28 14:13:28 +01:00
Joe Thornber
11469a2fda Beginning to work 2014-07-25 16:14:24 +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
d9040949fc forgot block_cache itself 2014-07-22 16:43:44 +01:00