Signed-off-by: Sage Weil <sage@redhat.com>
: ObjectStore(path),
cct(cct),
db(NULL),
+ fs(NULL),
path_fd(-1),
fsid_fd(-1),
frag_fd(-1),
<< dendl;
return r;
}
+ assert(fs == NULL);
+ fs = FS::create(path_fd);
+ dout(1) << __func__ << " using fs driver '" << fs->get_name() << "'" << dendl;
return 0;
}
{
VOID_TEMP_FAILURE_RETRY(::close(path_fd));
path_fd = -1;
+ delete fs;
+ fs = NULL;
}
int NewStore::_open_frag()
#include "common/RWLock.h"
#include "common/WorkQueue.h"
#include "os/ObjectStore.h"
+#include "os/fs/FS.h"
#include "os/KeyValueDB.h"
#include "newstore_types.h"
private:
CephContext *cct;
KeyValueDB *db;
+ FS *fs;
uuid_d fsid;
int path_fd; ///< open handle to $path
int fsid_fd; ///< open handle (locked) to $path/fsid