From 21c8b59ff4488047c19f27684c7fb069fc4859f9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 6 May 2009 11:56:08 -0700 Subject: [PATCH] osd: do not use ebofs Don't compile or use ebofs. --- src/Makefile.am | 36 ++++++++---------------------------- src/cosd.cc | 1 - src/dupstore.cc | 16 +++++++++------- src/osd/Ager.cc | 14 +++++++++----- src/osd/OSD.cc | 8 ++++---- src/streamtest.cc | 6 +++--- 6 files changed, 33 insertions(+), 48 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 283986e99be0b..d6a71f02bedcc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,11 +33,11 @@ dumpjournal_LDADD = libosdc.a libcrush.a libcommon.a # osd cosd_SOURCES = cosd.cc msg/SimpleMessenger.cc -cosd_LDADD = libosd.a libos.a libebofs.a libcrush.a libcommon.a +cosd_LDADD = libosd.a libos.a libcrush.a libcommon.a dupstore_SOURCES = dupstore.cc -dupstore_LDADD = libos.a libebofs.a libcommon.a +dupstore_LDADD = libos.a libcommon.a streamtest_SOURCES = streamtest.cc -streamtest_LDADD = libebofs.a libos.a libcommon.a +streamtest_LDADD = libos.a libcommon.a # synthetic client csyn_SOURCES = csyn.cc msg/SimpleMessenger.cc @@ -66,7 +66,7 @@ bin_PROGRAMS += cfuse if WITH_DEBUG fakefuse_SOURCES = fakefuse.cc msg/FakeMessenger.cc client/fuse.cc client/fuse_ll.cc -fakefuse_LDADD = -lfuse libmon.a libmds.a libosd.a libos.a libebofs.a \ +fakefuse_LDADD = -lfuse libmon.a libmds.a libosd.a libos.a \ libclient.a libosdc.a libcrush.a bin_PROGRAMS += fakefuse endif @@ -78,16 +78,11 @@ if WITH_DEBUG psim_SOURCES = psim.cc psim_LDADD = libcrush.a libcommon.a -test_ebofs_SOURCES = ebofs/test.ebofs.cc -test_ebofs_LDADD = libebofs.a libos.a libcommon.a -mkfs_ebofs_SOURCES = ebofs/mkfs.ebofs.cc -mkfs_ebofs_LDADD = libebofs.a libos.a libcommon.a - fakesyn_SOURCES = fakesyn.cc msg/FakeMessenger.cc -fakesyn_LDADD = libmon.a libmds.a libosd.a libos.a libebofs.a \ +fakesyn_LDADD = libmon.a libmds.a libosd.a libos.a \ libclient.a libosdc.a libcrush.a libcommon.a -bin_PROGRAMS += psim test.ebofs mkfs.ebofs fakesyn +bin_PROGRAMS += psim fakesyn endif @@ -160,7 +155,7 @@ AM_LDFLAGS = noinst_LIBRARIES = \ libcommon.a libcrush.a \ libmon.a libmds.a libosdc.a libosd.a libclient.a \ - libos.a libebofs.a + libos.a noinst_LIBRARIES += libcrush_so.a #libcephclient_so.a @@ -261,11 +256,6 @@ libmds_a_SOURCES = \ mds/SessionMap.cc \ mds/MDLog.cc -libebofs_a_SOURCES = \ - ebofs/BlockDevice.cc \ - ebofs/BufferCache.cc \ - ebofs/Ebofs.cc \ - ebofs/Allocator.cc libos_a_SOURCES = \ os/FileJournal.cc \ os/FileStore.cc \ @@ -333,16 +323,6 @@ noinst_HEADERS = \ crush/mapper.h\ crush/sample.txt\ crush/types.h\ - ebofs/Allocator.h\ - ebofs/BlockDevice.h\ - ebofs/BufferCache.h\ - ebofs/Cnode.h\ - ebofs/Ebofs.h\ - ebofs/Onode.h\ - ebofs/Table.h\ - ebofs/csum.h\ - ebofs/nodes.h\ - ebofs/types.h\ include/Context.h\ include/Distribution.h\ include/LogEntry.h\ @@ -598,5 +578,5 @@ all_sources = $(cmon_SOURCES) $(ceph_SOURCES) $(mkmonfs_SOURCES) $(monmaptool_SO $(dumpjournal_SOURCES) $(cosd_SOURCES) $(dupstore_SOURCES) $(streamtest_SOURCES) $(csyn_SOURCES) \ $(testmsgr_SOURCES) $(cfuse_SOURCES) $(fakefuse_SOURCES) $(psim_SOURCES) \ $(libcrush_so_a_SOURCES) $(libcommon_files) $(libcrush_a_SOURCES) \ - $(libmon_a_SOURCES) $(libmds_a_SOURCES) $(libebofs_a_SOURCES) $(libos_a_SOURCES) $(libosd_a_SOURCES) \ + $(libmon_a_SOURCES) $(libmds_a_SOURCES) $(libos_a_SOURCES) $(libosd_a_SOURCES) \ $(libosdc_a_SOURCES) $(libclient_a_SOURCES) diff --git a/src/cosd.cc b/src/cosd.cc index 0ff53dee2272b..ce77998fe252a 100644 --- a/src/cosd.cc +++ b/src/cosd.cc @@ -27,7 +27,6 @@ using namespace std; #include "mon/MonClient.h" #include "osd/OSD.h" -#include "ebofs/Ebofs.h" #include "msg/SimpleMessenger.h" diff --git a/src/dupstore.cc b/src/dupstore.cc index f88c414290a9d..bc9d025a8692c 100644 --- a/src/dupstore.cc +++ b/src/dupstore.cc @@ -13,7 +13,7 @@ */ #include -#include "ebofs/Ebofs.h" +//#include "ebofs/Ebofs.h" #include "os/FileStore.h" #include "common/common_init.h" @@ -94,15 +94,17 @@ int main(int argc, const char **argv) ObjectStore *src = 0, *dst = 0; - if (strcmp(args[0], "ebofs") == 0) - src = new Ebofs(args[1]); - else if (strcmp(args[0], "filestore") == 0) + //if (strcmp(args[0], "ebofs") == 0) + //src = new Ebofs(args[1]); + //else + if (strcmp(args[0], "filestore") == 0) src = new FileStore(args[1]); else usage(); - if (strcmp(args[2], "ebofs") == 0) - dst = new Ebofs(args[3]); - else if (strcmp(args[2], "filestore") == 0) + //if (strcmp(args[2], "ebofs") == 0) + //dst = new Ebofs(args[3]); + //else + if (strcmp(args[2], "filestore") == 0) dst = new FileStore(args[3]); else usage(); diff --git a/src/osd/Ager.cc b/src/osd/Ager.cc index e0deaea465286..b5530488706e3 100644 --- a/src/osd/Ager.cc +++ b/src/osd/Ager.cc @@ -10,7 +10,7 @@ #include "common/Clock.h" // ick -#include "ebofs/Ebofs.h" +//#include "ebofs/Ebofs.h" #include #include #include @@ -208,7 +208,7 @@ void Ager::age(int time, utime_t until = start; until.sec_ref() += time; - int elapsed = 0; + //int elapsed = 0; int freelist_inc = 60; utime_t nextfl = start; nextfl.sec_ref() += freelist_inc; @@ -282,15 +282,17 @@ void Ager::age(int time, st); // dump freelist? + /* if (g_clock.now() > nextfl) { elapsed += freelist_inc; save_freelist(elapsed); nextfl.sec_ref() += freelist_inc; } + */ } // dump the freelist - save_freelist(0); + //save_freelist(0); exit(0); // hack // ok! @@ -317,12 +319,13 @@ void Ager::load_freelist() ::read(fd, bl.c_str(), st.st_size); ::close(fd); - ((Ebofs*)store)->_import_freelist(bl); + //((Ebofs*)store)->_import_freelist(bl); store->sync(); store->sync(); } -void Ager::save_freelist(int el) + +/*void Ager::save_freelist(int el) { generic_dout(1) << "save_freelist " << el << dendl; char s[100]; @@ -335,3 +338,4 @@ void Ager::save_freelist(int el) ::write(fd, bl.c_str(), bl.length()); ::close(fd); } +*/ diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 8548f02dde2ee..d0361907a4819 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -20,7 +20,6 @@ #include "OSDMap.h" #include "os/FileStore.h" -#include "ebofs/Ebofs.h" #ifdef USE_OSBDB #include "osbdb/OSBDB.h" @@ -101,15 +100,16 @@ ObjectStore *OSD::create_object_store(const char *dev, const char *jdev) if (::stat(dev, &st) != 0) return 0; - if (g_conf.ebofs) - return new Ebofs(dev, jdev); + //if (g_conf.ebofs) + //return new Ebofs(dev, jdev); if (g_conf.filestore) return new FileStore(dev, jdev); if (S_ISDIR(st.st_mode)) return new FileStore(dev, jdev); else - return new Ebofs(dev, jdev); + return 0; + //return new Ebofs(dev, jdev); } diff --git a/src/streamtest.cc b/src/streamtest.cc index 3c6bef2ce8df5..ec28247a82508 100644 --- a/src/streamtest.cc +++ b/src/streamtest.cc @@ -13,7 +13,7 @@ */ #include -#include "ebofs/Ebofs.h" +//#include "ebofs/Ebofs.h" #include "os/FileStore.h" #include "common/common_init.h" @@ -98,8 +98,8 @@ int main(int argc, const char **argv) cout << "#dev " << filename << ", " << seconds << " seconds, " << bytes << " bytes per write" << std::endl; - ObjectStore *fs = new Ebofs(filename, journal); - //ObjectStore *fs = new FileStore(filename); + //ObjectStore *fs = new Ebofs(filename, journal); + ObjectStore *fs = new FileStore(filename); if (fs->mount() < 0) { cout << "mount failed" << std::endl; -- 2.39.5