From b29413a96467c9d0b31dac31d26d9f3f0e2128a8 Mon Sep 17 00:00:00 2001 From: sage Date: Mon, 17 Apr 2006 17:15:51 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@746 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/osd/FakeStore.cc | 17 +++++++++++++++++ ceph/osd/OSD.cc | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ceph/osd/FakeStore.cc b/ceph/osd/FakeStore.cc index 420d2ac5b41fa..7aa7dff62b3fc 100644 --- a/ceph/osd/FakeStore.cc +++ b/ceph/osd/FakeStore.cc @@ -60,6 +60,7 @@ FakeStore::FakeStore(char *base, int whoami) int FakeStore::mount() { if (g_conf.fakestore_dev) { + dout(0) << "mounting" << endl; char cmd[100]; sprintf(cmd,"mount %s", g_conf.fakestore_dev); system(cmd); @@ -101,6 +102,7 @@ int FakeStore::umount() if (g_conf.fakestore_dev) { char cmd[100]; + dout(0) << "umounting" << endl; sprintf(cmd,"umount %s", g_conf.fakestore_dev); system(cmd); } @@ -172,6 +174,14 @@ void FakeStore::wipe_dir(string mydir) int FakeStore::mkfs() { + if (g_conf.fakestore_dev) { + dout(0) << "mounting" << endl; + char cmd[100]; + sprintf(cmd,"mount %s", g_conf.fakestore_dev); + system(cmd); + } + + int r = 0; struct stat st; string mydir; @@ -213,6 +223,13 @@ int FakeStore::mkfs() wipe_dir( subdir ); } + if (g_conf.fakestore_dev) { + char cmd[100]; + dout(0) << "umounting" << endl; + sprintf(cmd,"umount %s", g_conf.fakestore_dev); + system(cmd); + } + dout(1) << "mkfs done in " << mydir << endl; return r; diff --git a/ceph/osd/OSD.cc b/ceph/osd/OSD.cc index da4cc17ed5539..624243dcefa89 100644 --- a/ceph/osd/OSD.cc +++ b/ceph/osd/OSD.cc @@ -113,7 +113,8 @@ OSD::OSD(int id, Messenger *m) pending_ops = 0; waiting_for_no_ops = false; - + if (g_conf.osd_remount_at) + g_timer.add_event_after(g_conf.osd_remount_at, new C_Remount(this)); // try in this order: -- 2.39.5