mirror of
https://github.com/Zygo/bees.git
synced 2025-08-03 14:23:29 +02:00
uuid: drop dependency on uuid.h
The weird things distros do to the path where uuid.h gets installed have broken bees builds for the last time. We were only using uuid to support a legacy feature that was removed over four years ago. Hypothetical users who are upgrading directly from bees v0.1 should probably restart all the crawlers anyway--there were bugs. Also, if any such users exist, I respect their tremendous patience with the horrible performance all these years--bees got about 30x faster since v0.1. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@@ -10,7 +10,7 @@ all: $(BEES) $(PROGRAMS)
|
||||
include ../makeflags
|
||||
-include ../localconf
|
||||
|
||||
LIBS = -lcrucible -luuid -lpthread
|
||||
LIBS = -lcrucible -lpthread
|
||||
BEES_LDFLAGS = -L../lib $(LDFLAGS)
|
||||
|
||||
BEES_OBJS = \
|
||||
|
@@ -941,10 +941,6 @@ BeesContext::set_root_fd(Fd fd)
|
||||
Stat st(fd);
|
||||
THROW_CHECK1(invalid_argument, st.st_ino, st.st_ino == BTRFS_FIRST_FREE_OBJECTID);
|
||||
m_root_fd = fd;
|
||||
BtrfsIoctlFsInfoArgs fsinfo;
|
||||
fsinfo.do_ioctl(fd);
|
||||
m_root_uuid = fsinfo.uuid();
|
||||
BEESLOGINFO("Filesystem UUID is " << m_root_uuid);
|
||||
|
||||
// 65536 is big enough for two max-sized extents.
|
||||
// Need enough total space in the cache for the maximum number of active threads.
|
||||
|
@@ -84,20 +84,8 @@ BeesRoots::set_workaround_btrfs_send(bool do_avoid)
|
||||
string
|
||||
BeesRoots::crawl_state_filename() const
|
||||
{
|
||||
string rv;
|
||||
|
||||
// Legacy filename included UUID
|
||||
rv += "beescrawl.";
|
||||
rv += m_ctx->root_uuid();
|
||||
rv += ".dat";
|
||||
|
||||
struct stat buf;
|
||||
if (fstatat(m_ctx->home_fd(), rv.c_str(), &buf, AT_SYMLINK_NOFOLLOW)) {
|
||||
// Use new filename
|
||||
rv = "beescrawl.dat";
|
||||
}
|
||||
|
||||
return rv;
|
||||
// Legacy filename included UUID. That feature was removed in 2016.
|
||||
return "beescrawl.dat";
|
||||
}
|
||||
|
||||
ostream &
|
||||
@@ -149,12 +137,6 @@ BeesRoots::state_save()
|
||||
|
||||
m_crawl_state_file.write(ofs.str());
|
||||
|
||||
// Renaming things is hard after release
|
||||
if (m_crawl_state_file.name() != "beescrawl.dat") {
|
||||
renameat(m_ctx->home_fd(), m_crawl_state_file.name().c_str(), m_ctx->home_fd(), "beescrawl.dat");
|
||||
m_crawl_state_file.name("beescrawl.dat");
|
||||
}
|
||||
|
||||
BEESNOTE("relocking crawl state");
|
||||
lock.lock();
|
||||
// Not really correct but probably close enough
|
||||
|
@@ -734,7 +734,6 @@ class BeesContext : public enable_shared_from_this<BeesContext> {
|
||||
|
||||
string m_root_path;
|
||||
Fd m_root_fd;
|
||||
string m_root_uuid;
|
||||
|
||||
mutable mutex m_blacklist_mutex;
|
||||
set<BeesFileId> m_blacklist;
|
||||
@@ -771,7 +770,6 @@ public:
|
||||
Fd root_fd() const { return m_root_fd; }
|
||||
Fd home_fd();
|
||||
string root_path() const { return m_root_path; }
|
||||
string root_uuid() const { return m_root_uuid; }
|
||||
|
||||
BeesFileRange scan_forward(const BeesFileRange &bfr);
|
||||
|
||||
|
Reference in New Issue
Block a user