1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-18 05:45:45 +02:00

Merge branch 'master' into subvol-threads

This commit is contained in:
Zygo Blaxell 2017-12-21 14:01:51 -05:00
commit 02181956d2
5 changed files with 11 additions and 13 deletions

View File

@ -28,6 +28,11 @@ test: lib src
scripts/beesd: scripts/beesd.in
sed -e's#@LIBEXEC_PREFIX@#$(LIBEXEC_PREFIX)#' -e's#@PREFIX@#$(PREFIX)#' "$<" >"$@"
scripts/beesd@.service: scripts/beesd@.service.in
sed -e's#@LIBEXEC_PREFIX@#$(LIBEXEC_PREFIX)#' -e's#@PREFIX@#$(PREFIX)#' "$<" >"$@"
scripts: scripts/beesd scripts/beesd@.service
README.html: README.md
$(MARKDOWN) README.md > README.html.new
mv -f README.html.new README.html
@ -38,7 +43,7 @@ install: lib src test
install -Dm755 bin/bees $(LIBEXEC_PREFIX)/bees
install_scripts: ## Install scipts
install_scripts: scripts/beesd
install_scripts:
install -Dm755 scripts/beesd $(PREFIX)/usr/sbin/beesd
install -Dm644 scripts/beesd.conf.sample $(PREFIX)/etc/bees/beesd.conf.sample
install -Dm644 scripts/beesd@.service $(PREFIX)/lib/systemd/system/beesd@.service

View File

@ -100,12 +100,6 @@ namespace crucible {
} while (0)
// macros for checking a constraint
#define CHECK_CONSTRAINT(value, expr) do { \
if (!(expr)) { \
THROW_ERROR(out_of_range, #value << " = " << value << " failed constraint check (" << #expr << ")"); \
} \
} while(0)
#define THROW_CHECK0(type, expr) do { \
if (!(expr)) { \
THROW_ERROR(type, "failed constraint check (" << #expr << ")"); \

View File

@ -625,7 +625,7 @@ namespace crucible {
void
Fiemap::do_ioctl(int fd)
{
CHECK_CONSTRAINT(m_min_count, m_min_count <= m_max_count);
THROW_CHECK1(out_of_range, m_min_count, m_min_count <= m_max_count);
auto extent_count = m_min_count;
vector<char> ioctl_arg = vector_copy_struct<fiemap>(this);

View File

@ -425,6 +425,7 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
if (found_addr.is_toxic()) {
BEESINFO("WORKAROUND: abandoned toxic match for hash " << hash << " addr " << found_addr);
// Don't push these back in because we'll never delete them.
// Extents may become non-toxic so give them a chance to expire.
// hash_table->push_front_hash_addr(hash, found_addr);
BEESCOUNT(scan_toxic_hash);
return bfr;
@ -441,12 +442,10 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
if (resolved.is_toxic()) {
BEESINFO("WORKAROUND: abandoned toxic match at found_addr " << found_addr << " matching bbd " << bbd);
BEESCOUNT(scan_toxic_match);
#if 0
// Don't push these back in because we'll never delete them.
// Make sure we never see this hash again
// Make sure we never see this hash again.
// It has become toxic since it was inserted into the hash table.
found_addr.set_toxic();
hash_table->push_front_hash_addr(hash, found_addr);
#endif
abandon_extent = true;
} else if (!resolved.count()) {
BEESCOUNT(scan_resolve_zero);