From e8eaa7e4713ec1e53a540c370c267fe6a7930620 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sat, 31 Dec 2016 02:54:16 -0500 Subject: [PATCH] trivial: mass purge of whitespace errors Signed-off-by: Zygo Blaxell --- include/crucible/btrfs.h | 2 +- include/crucible/timequeue.h | 4 ++-- lib/fs.cc | 4 ++-- src/bees-hash.cc | 4 ++-- src/bees-resolve.cc | 2 +- src/bees.cc | 2 +- src/bees.h | 4 ++-- test/Makefile | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/crucible/btrfs.h b/include/crucible/btrfs.h index 044b682..ee76ca1 100644 --- a/include/crucible/btrfs.h +++ b/include/crucible/btrfs.h @@ -130,7 +130,7 @@ }; #endif - + #ifndef BTRFS_IOC_CLONE_RANGE struct btrfs_ioctl_clone_range_args { diff --git a/include/crucible/timequeue.h b/include/crucible/timequeue.h index 6cfcf6f..098ec54 100644 --- a/include/crucible/timequeue.h +++ b/include/crucible/timequeue.h @@ -77,7 +77,7 @@ namespace crucible { void TimeQueue::push(const Task &task, double delay) { - Timestamp time = chrono::high_resolution_clock::now() + + Timestamp time = chrono::high_resolution_clock::now() + chrono::duration_cast(chrono::duration(delay)); unique_lock lock(m_mutex); while (m_set.size() > m_max_queue_depth) { @@ -91,7 +91,7 @@ namespace crucible { void TimeQueue::push_nowait(const Task &task, double delay) { - Timestamp time = chrono::high_resolution_clock::now() + + Timestamp time = chrono::high_resolution_clock::now() + chrono::duration_cast(chrono::duration(delay)); unique_lock lock(m_mutex); m_set.insert(Item(time, task)); diff --git a/lib/fs.cc b/lib/fs.cc index 9f6d4b7..511ceae 100644 --- a/lib/fs.cc +++ b/lib/fs.cc @@ -913,7 +913,7 @@ namespace crucible { ostream & operator<<(ostream &os, const BtrfsIoctlSearchHeader &hdr) { - os << "BtrfsIoctlSearchHeader { " + os << "BtrfsIoctlSearchHeader { " << static_cast(hdr) << ", data = "; hexdump(os, hdr.m_data); @@ -923,7 +923,7 @@ namespace crucible { ostream & operator<<(ostream &os, const BtrfsIoctlSearchKey &key) { - os << "BtrfsIoctlSearchKey { " + os << "BtrfsIoctlSearchKey { " << static_cast(key) << ", buf_size = " << key.m_buf_size << ", buf[" << key.m_result.size() << "] = {"; diff --git a/src/bees-hash.cc b/src/bees-hash.cc index c84a135..e41fa3b 100644 --- a/src/bees-hash.cc +++ b/src/bees-hash.cc @@ -262,8 +262,8 @@ BeesHashTable::prefetch_loop() graph_blob << "Uptime: " << m_ctx->total_timer().age() << " seconds\n"; graph_blob << "Version: " << BEES_VERSION << "\n"; - graph_blob - << "\nHash table page occupancy histogram (" << occupied_count << "/" << total_count << " cells occupied, " << (occupied_count * 100 / total_count) << "%)\n" + graph_blob + << "\nHash table page occupancy histogram (" << occupied_count << "/" << total_count << " cells occupied, " << (occupied_count * 100 / total_count) << "%)\n" << out.str() << "0% | 25% | 50% | 75% | 100% page fill\n" << "compressed " << compressed_count << " (" << percent(compressed_count, occupied_count) << ")" << " new-style " << compressed_offset_count << " (" << percent(compressed_offset_count, occupied_count) << ")" diff --git a/src/bees-resolve.cc b/src/bees-resolve.cc index 56ac0f1..d7b258e 100644 --- a/src/bees-resolve.cc +++ b/src/bees-resolve.cc @@ -105,7 +105,7 @@ BeesResolver::adjust_offset(const BeesFileRange &haystack, const BeesBlockData & bool is_legacy = false; if (m_addr.is_compressed()) { BtrfsExtentWalker ew(haystack.fd(), haystack.begin(), m_ctx->root_fd()); - BEESTRACE("haystack extent data " << ew); + BEESTRACE("haystack extent data " << ew); Extent e = ew.current(); if (m_addr.has_compressed_offset()) { off_t coff = m_addr.get_compressed_offset(); diff --git a/src/bees.cc b/src/bees.cc index e86ec4d..485df6d 100644 --- a/src/bees.cc +++ b/src/bees.cc @@ -462,7 +462,7 @@ BeesTempFile::BeesTempFile(shared_ptr ctx) : void BeesTempFile::realign() -{ +{ if (m_end_offset > BLOCK_SIZE_MAX_TEMP_FILE) { BEESLOG("temporary file size " << to_hex(m_end_offset) << " > max " << BLOCK_SIZE_MAX_TEMP_FILE); BEESCOUNT(tmp_trunc); diff --git a/src/bees.h b/src/bees.h index e0dc2eb..d685634 100644 --- a/src/bees.h +++ b/src/bees.h @@ -607,7 +607,7 @@ friend ostream & operator<<(ostream &os, const BeesRangePair &brp); }; class BeesWorkQueueBase { - string m_name; + string m_name; protected: static mutex s_mutex; @@ -622,7 +622,7 @@ public: virtual size_t active_size() const = 0; virtual list peek_active(size_t count) const = 0; - + static void for_each_work_queue(function f); }; diff --git a/test/Makefile b/test/Makefile index 1170161..b4f2d23 100644 --- a/test/Makefile +++ b/test/Makefile @@ -21,7 +21,7 @@ LDFLAGS = -L../lib -Wl,-rpath=$(shell realpath ../lib) depends.mk: *.cc for x in *.cc; do $(CXX) $(CXXFLAGS) -M "$$x"; done >> depends.mk.new mv -fv depends.mk.new depends.mk - + -include depends.mk %.o: %.cc %.h ../makeflags