From ba2cc1eb6e0e869bf66f884290a40e99ae5fbc37 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 23 Dec 2015 10:58:30 -0500 Subject: [PATCH] os/filestore: move FileStore to os/filestore/* Signed-off-by: Sage Weil --- src/os/Makefile.am | 66 +++++------ src/os/ObjectMap.h | 5 +- src/os/ObjectStore.cc | 2 +- .../{ => filestore}/BtrfsFileStoreBackend.cc | 2 +- .../{ => filestore}/BtrfsFileStoreBackend.h | 0 src/os/{ => filestore}/CollectionIndex.h | 16 +-- src/os/{ => filestore}/DBObjectMap.cc | 4 +- src/os/{ => filestore}/DBObjectMap.h | 6 +- src/os/{ => filestore}/FDCache.h | 0 src/os/{ => filestore}/FileJournal.cc | 68 +++++------ src/os/{ => filestore}/FileJournal.h | 12 +- src/os/{ => filestore}/FileStore.cc | 110 +++++++++--------- src/os/{ => filestore}/FileStore.h | 22 ++-- .../GenericFileStoreBackend.cc | 2 +- .../{ => filestore}/GenericFileStoreBackend.h | 0 src/os/{ => filestore}/HashIndex.cc | 10 +- src/os/{ => filestore}/HashIndex.h | 28 ++--- src/os/{ => filestore}/IndexManager.cc | 12 +- src/os/{ => filestore}/IndexManager.h | 6 +- src/os/{ => filestore}/Journal.h | 8 +- .../{ => filestore}/JournalingObjectStore.cc | 15 ++- .../{ => filestore}/JournalingObjectStore.h | 8 +- src/os/{ => filestore}/LFNIndex.cc | 40 +++---- src/os/{ => filestore}/LFNIndex.h | 36 +++--- src/os/{ => filestore}/SequencerPosition.h | 2 +- src/os/{ => filestore}/WBThrottle.cc | 4 +- src/os/{ => filestore}/WBThrottle.h | 0 src/os/{ => filestore}/XfsFileStoreBackend.cc | 2 +- src/os/{ => filestore}/XfsFileStoreBackend.h | 2 +- src/os/{ => filestore}/ZFSFileStoreBackend.cc | 0 src/os/{ => filestore}/ZFSFileStoreBackend.h | 0 src/os/{ => filestore}/chain_xattr.cc | 4 +- src/os/{ => filestore}/chain_xattr.h | 0 src/test/ObjectMap/test_object_map.cc | 4 +- src/test/bench/small_io_bench_fs.cc | 2 +- src/test/encoding/types.h | 4 +- src/test/filestore/TestFileStore.cc | 2 +- src/test/objectstore/FileStoreDiff.cc | 2 +- src/test/objectstore/FileStoreDiff.h | 2 +- src/test/objectstore/FileStoreTracker.h | 2 +- src/test/objectstore/chain_xattr.cc | 2 +- src/test/objectstore/store_test.cc | 2 +- src/test/objectstore/test_idempotent.cc | 2 +- .../objectstore/test_idempotent_sequence.cc | 2 +- src/test/os/TestLFNIndex.cc | 4 +- src/test/test_filejournal.cc | 4 +- src/test/test_trans.cc | 2 +- src/test/xattr_bench.cc | 2 +- src/tools/ceph_objectstore_tool.cc | 2 +- src/tools/ceph_osdomap_tool.cc | 2 +- 50 files changed, 268 insertions(+), 266 deletions(-) rename src/os/{ => filestore}/BtrfsFileStoreBackend.cc (99%) rename src/os/{ => filestore}/BtrfsFileStoreBackend.h (100%) rename src/os/{ => filestore}/CollectionIndex.h (97%) rename src/os/{ => filestore}/DBObjectMap.cc (99%) rename src/os/{ => filestore}/DBObjectMap.h (99%) rename src/os/{ => filestore}/FDCache.h (100%) rename src/os/{ => filestore}/FileJournal.cc (98%) rename src/os/{ => filestore}/FileJournal.h (99%) rename src/os/{ => filestore}/FileStore.cc (99%) rename src/os/{ => filestore}/FileStore.h (99%) rename src/os/{ => filestore}/GenericFileStoreBackend.cc (99%) rename src/os/{ => filestore}/GenericFileStoreBackend.h (100%) rename src/os/{ => filestore}/HashIndex.cc (99%) rename src/os/{ => filestore}/HashIndex.h (98%) rename src/os/{ => filestore}/IndexManager.cc (96%) rename src/os/{ => filestore}/IndexManager.h (97%) rename src/os/{ => filestore}/Journal.h (96%) rename src/os/{ => filestore}/JournalingObjectStore.cc (98%) rename src/os/{ => filestore}/JournalingObjectStore.h (97%) rename src/os/{ => filestore}/LFNIndex.cc (98%) rename src/os/{ => filestore}/LFNIndex.h (98%) rename src/os/{ => filestore}/SequencerPosition.h (99%) rename src/os/{ => filestore}/WBThrottle.cc (99%) rename src/os/{ => filestore}/WBThrottle.h (100%) rename src/os/{ => filestore}/XfsFileStoreBackend.cc (99%) rename src/os/{ => filestore}/XfsFileStoreBackend.h (99%) rename src/os/{ => filestore}/ZFSFileStoreBackend.cc (100%) rename src/os/{ => filestore}/ZFSFileStoreBackend.h (100%) rename src/os/{ => filestore}/chain_xattr.cc (99%) rename src/os/{ => filestore}/chain_xattr.h (100%) diff --git a/src/os/Makefile.am b/src/os/Makefile.am index 1a6aa573996..a5cd08deaa1 100644 --- a/src/os/Makefile.am +++ b/src/os/Makefile.am @@ -9,7 +9,6 @@ noinst_LIBRARIES += libos_types.a if ENABLE_SERVER libos_a_SOURCES = \ - os/chain_xattr.cc \ os/fs/FS.cc \ os/bluestore/kv.cc \ os/bluestore/Allocator.cc \ @@ -19,34 +18,35 @@ libos_a_SOURCES = \ os/bluestore/BlueStore.cc \ os/bluestore/FreelistManager.cc \ os/bluestore/StupidAllocator.cc \ + os/filestore/chain_xattr.cc \ + os/filestore/DBObjectMap.cc \ + os/filestore/FileJournal.cc \ + os/filestore/FileStore.cc \ + os/filestore/GenericFileStoreBackend.cc \ + os/filestore/HashIndex.cc \ + os/filestore/IndexManager.cc \ + os/filestore/JournalingObjectStore.cc \ + os/filestore/LFNIndex.cc \ + os/filestore/WBThrottle.cc \ os/kstore/kv.cc \ os/kstore/KStore.cc \ - os/DBObjectMap.cc \ os/GenericObjectMap.cc \ - os/FileJournal.cc \ - os/FileStore.cc \ - os/GenericFileStoreBackend.cc \ - os/HashIndex.cc \ - os/IndexManager.cc \ - os/JournalingObjectStore.cc \ - os/LFNIndex.cc \ os/MemStore.cc \ os/KeyValueStore.cc \ - os/ObjectStore.cc \ - os/WBThrottle.cc + os/ObjectStore.cc if LINUX -libos_a_SOURCES += os/BtrfsFileStoreBackend.cc +libos_a_SOURCES += os/filestore/BtrfsFileStoreBackend.cc endif if WITH_LIBXFS libos_a_SOURCES += \ os/fs/XFS.cc \ - os/XfsFileStoreBackend.cc + os/filestore/XfsFileStoreBackend.cc endif if WITH_LIBZFS -libos_a_SOURCES += os/ZFSFileStoreBackend.cc +libos_a_SOURCES += os/filestore/ZFSFileStoreBackend.cc endif libos_a_CXXFLAGS = ${AM_CXXFLAGS} -I rocksdb/include -fPIC @@ -58,8 +58,6 @@ libos_a_LIBADD += $(LIBOS_TP) endif noinst_HEADERS += \ - os/btrfs_ioctl.h \ - os/chain_xattr.h \ os/bluestore/bluefs_types.h \ os/bluestore/bluestore_types.h \ os/bluestore/kv.h \ @@ -70,33 +68,35 @@ noinst_HEADERS += \ os/bluestore/BlueStore.h \ os/bluestore/FreelistManager.h \ os/bluestore/StupidAllocator.h \ + os/btrfs_ioctl.h \ + os/filestore/chain_xattr.h \ + os/filestore/BtrfsFileStoreBackend.h \ + os/filestore/CollectionIndex.h \ + os/filestore/DBObjectMap.h \ + os/filestore/FileJournal.h \ + os/filestore/FileStore.h \ + os/filestore/FDCache.h \ + os/filestore/GenericFileStoreBackend.h \ + os/filestore/HashIndex.h \ + os/filestore/IndexManager.h \ + os/filestore/Journal.h \ + os/filestore/JournalingObjectStore.h \ + os/filestore/LFNIndex.h \ + os/filestore/SequencerPosition.h \ + os/filestore/WBThrottle.h \ + os/filestore/XfsFileStoreBackend.h \ + os/filestore/ZFSFileStoreBackend.h os/kstore/kstore_types.h \ os/kstore/KStore.h \ os/kstore/kv.h \ - os/BtrfsFileStoreBackend.h \ - os/CollectionIndex.h \ - os/DBObjectMap.h \ os/GenericObjectMap.h \ - os/FileJournal.h \ - os/FileStore.h \ - os/FDCache.h \ os/fs/FS.h \ os/fs/XFS.h \ - os/GenericFileStoreBackend.h \ - os/HashIndex.h \ - os/IndexManager.h \ - os/Journal.h \ - os/JournalingObjectStore.h \ - os/LFNIndex.h \ os/MemStore.h \ os/KeyValueStore.h \ os/ObjectMap.h \ os/ObjectStore.h \ - os/PageSet.h \ - os/SequencerPosition.h \ - os/WBThrottle.h \ - os/XfsFileStoreBackend.h \ - os/ZFSFileStoreBackend.h + os/PageSet.h if WITH_LIBZFS libos_zfs_a_SOURCES = os/ZFS.cc diff --git a/src/os/ObjectMap.h b/src/os/ObjectMap.h index e7a64a47f9d..c4efc7fbc20 100644 --- a/src/os/ObjectMap.h +++ b/src/os/ObjectMap.h @@ -15,12 +15,13 @@ #ifndef OS_KEYVALUESTORE_H #define OS_KEYVALUESTORE_H -#include "IndexManager.h" -#include "SequencerPosition.h" #include #include #include "include/memory.h" #include "kv/KeyValueDB.h" +#include "common/hobject.h" + +class SequencerPosition; /** * Encapsulates the FileStore key value store diff --git a/src/os/ObjectStore.cc b/src/os/ObjectStore.cc index 32923af4b1a..55f9f7fd01f 100644 --- a/src/os/ObjectStore.cc +++ b/src/os/ObjectStore.cc @@ -18,7 +18,7 @@ #include "common/Formatter.h" #include "common/safe_io.h" -#include "FileStore.h" +#include "filestore/FileStore.h" #include "MemStore.h" #include "KeyValueStore.h" #if defined(HAVE_LIBAIO) diff --git a/src/os/BtrfsFileStoreBackend.cc b/src/os/filestore/BtrfsFileStoreBackend.cc similarity index 99% rename from src/os/BtrfsFileStoreBackend.cc rename to src/os/filestore/BtrfsFileStoreBackend.cc index 8c2273344a4..19a6e353aab 100644 --- a/src/os/BtrfsFileStoreBackend.cc +++ b/src/os/filestore/BtrfsFileStoreBackend.cc @@ -29,7 +29,7 @@ #include "include/assert.h" #ifndef __CYGWIN__ -#include "btrfs_ioctl.h" +#include "os/btrfs_ioctl.h" #endif #include diff --git a/src/os/BtrfsFileStoreBackend.h b/src/os/filestore/BtrfsFileStoreBackend.h similarity index 100% rename from src/os/BtrfsFileStoreBackend.h rename to src/os/filestore/BtrfsFileStoreBackend.h diff --git a/src/os/CollectionIndex.h b/src/os/filestore/CollectionIndex.h similarity index 97% rename from src/os/CollectionIndex.h rename to src/os/filestore/CollectionIndex.h index 97e17bae1b7..a9947cce531 100644 --- a/src/os/CollectionIndex.h +++ b/src/os/filestore/CollectionIndex.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #ifndef OS_COLLECTIONINDEX_H @@ -28,7 +28,7 @@ */ class CollectionIndex { protected: - /** + /** * Object encapsulating a returned path. * * A path to an object (existent or non-existent) becomes invalid @@ -51,7 +51,7 @@ protected: /// Normal Constructor Path( string path, ///< [in] Path to return. - CollectionIndex* ref) + CollectionIndex* ref) : full_path(path), parent_ref(ref), parent_coll(parent_ref->coll()) {} /// Debugging Constructor @@ -59,7 +59,7 @@ protected: string path, ///< [in] Path to return. coll_t coll) ///< [in] collection : full_path(path), parent_coll(coll) {} - + /// Getter for the stored path. const char *path() const { return full_path.c_str(); } @@ -99,7 +99,7 @@ protected: virtual coll_t coll() const = 0; - /** + /** * Initializes the index. * * @return Error Code, 0 for success @@ -177,7 +177,7 @@ protected: virtual int prep_delete() { return 0; } CollectionIndex(coll_t collection): - access_lock_name ("CollectionIndex::access_lock::" + collection.to_str()), + access_lock_name ("CollectionIndex::access_lock::" + collection.to_str()), access_lock(access_lock_name.c_str()) {} /* diff --git a/src/os/DBObjectMap.cc b/src/os/filestore/DBObjectMap.cc similarity index 99% rename from src/os/DBObjectMap.cc rename to src/os/filestore/DBObjectMap.cc index 449a5de2fb7..04340439c7a 100644 --- a/src/os/DBObjectMap.cc +++ b/src/os/filestore/DBObjectMap.cc @@ -10,7 +10,7 @@ #include "include/memory.h" #include -#include "ObjectMap.h" +#include "os/ObjectMap.h" #include "kv/KeyValueDB.h" #include "DBObjectMap.h" #include @@ -390,7 +390,7 @@ int DBObjectMap::DBObjectMapIteratorImpl::in_complete_region(const string &to_te } /** - * Moves parent_iter to the next position both out of the complete_region and + * Moves parent_iter to the next position both out of the complete_region and * not equal to key_iter. Then, we set cur_iter to parent_iter if valid and * less than key_iter and key_iter otherwise. */ diff --git a/src/os/DBObjectMap.h b/src/os/filestore/DBObjectMap.h similarity index 99% rename from src/os/DBObjectMap.h rename to src/os/filestore/DBObjectMap.h index 4b81acbd948..1b574854823 100644 --- a/src/os/DBObjectMap.h +++ b/src/os/filestore/DBObjectMap.h @@ -11,7 +11,7 @@ #include "include/memory.h" #include -#include "ObjectMap.h" +#include "os/ObjectMap.h" #include "kv/KeyValueDB.h" #include "osd/osd_types.h" #include "common/Mutex.h" @@ -19,6 +19,8 @@ #include "common/simple_cache.hpp" #include +#include "SequencerPosition.h" + /** * DBObjectMap: Implements ObjectMap in terms of KeyValueDB * @@ -505,7 +507,7 @@ private: void _set_header(Header header, const bufferlist &bl, KeyValueDB::Transaction t); - /** + /** * Removes header seq lock and possibly object lock * once Header is out of scope * @see lookup_parent diff --git a/src/os/FDCache.h b/src/os/filestore/FDCache.h similarity index 100% rename from src/os/FDCache.h rename to src/os/filestore/FDCache.h diff --git a/src/os/FileJournal.cc b/src/os/filestore/FileJournal.cc similarity index 98% rename from src/os/FileJournal.cc rename to src/os/filestore/FileJournal.cc index 698f2b31c07..f9e0cc5131b 100644 --- a/src/os/FileJournal.cc +++ b/src/os/filestore/FileJournal.cc @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #include "acconfig.h" @@ -19,7 +19,7 @@ #include "FileJournal.h" #include "include/color.h" #include "common/perf_counters.h" -#include "os/FileStore.h" +#include "FileStore.h" #include "include/compat.h" @@ -59,7 +59,7 @@ int FileJournal::_open(bool forwrite, bool create) } if (create) flags |= O_CREAT; - + if (fd >= 0) { if (TEMP_FAILURE_RETRY(::close(fd))) { int err = errno; @@ -115,7 +115,7 @@ int FileJournal::_open(bool forwrite, bool create) max_size -= max_size % block_size; dout(1) << "_open " << fn << " fd " << fd - << ": " << max_size + << ": " << max_size << " bytes, block size " << block_size << " bytes, directio = " << directio << ", aio = " << aio @@ -316,7 +316,7 @@ int FileJournal::_open_file(int64_t oldsize, blksize_t blksize, } free(buf); } - + dout(10) << "_open journal is not a block device, NOT checking disk " << "write cache on '" << fn << "'" << dendl; @@ -477,8 +477,8 @@ int FileJournal::open(uint64_t fs_op_seq) zero_buf = new char[header.alignment]; memset(zero_buf, 0, header.alignment); - dout(10) << "open header.fsid = " << header.fsid - //<< " vs expected fsid = " << fsid + dout(10) << "open header.fsid = " << header.fsid + //<< " vs expected fsid = " << fsid << dendl; if (header.fsid != fsid) { derr << "FileJournal::open: ondisk fsid " << header.fsid << " doesn't match expected " << fsid @@ -499,7 +499,7 @@ int FileJournal::open(uint64_t fs_op_seq) return -EINVAL; } if (header.alignment != block_size && directio) { - dout(0) << "open journal alignment " << header.alignment << " does not match block size " + dout(0) << "open journal alignment " << header.alignment << " does not match block size " << block_size << " (required for direct_io journal mode)" << dendl; return -EINVAL; } @@ -778,7 +778,7 @@ int FileJournal::read_header(header_t *hdr) const return -EINVAL; } - + /* * Unfortunately we weren't initializing the flags field for new * journals! Aie. This is safe(ish) now that we have only one @@ -876,7 +876,7 @@ int FileJournal::prepare_multi_write(bufferlist& bl, uint64_t& orig_ops, uint64_ if (full_state != FULL_NOTFULL) return -ENOSPC; - + while (!writeq_empty()) { list items; batch_pop_write(items); @@ -1002,7 +1002,7 @@ int FileJournal::prepare_single_write(write_item &next_write, bufferlist& bl, of // add to write buffer dout(15) << "prepare_single_write " << orig_ops << " will write " << queue_pos << " : seq " << seq << " len " << orig_len << " -> " << size << dendl; - + unsigned seq_offset = offsetof(entry_header_t, seq); unsigned magic1_offset = offsetof(entry_header_t, magic1); unsigned magic2_offset = offsetof(entry_header_t, magic2); @@ -1073,7 +1073,7 @@ int FileJournal::write_bl(off64_t& pos, bufferlist& bl) void FileJournal::do_write(bufferlist& bl) { // nothing to do? - if (bl.length() == 0 && !must_write_header) + if (bl.length() == 0 && !must_write_header) return; buffer::ptr hbp; @@ -1088,10 +1088,10 @@ void FileJournal::do_write(bufferlist& bl) hbp = prepare_header(); } - dout(15) << "do_write writing " << write_pos << "~" << bl.length() + dout(15) << "do_write writing " << write_pos << "~" << bl.length() << (hbp.length() ? " + header":"") << dendl; - + utime_t from = ceph_clock_now(g_ceph_context); // entry @@ -1195,10 +1195,10 @@ void FileJournal::do_write(bufferlist& bl) #endif } - utime_t lat = ceph_clock_now(g_ceph_context) - from; + utime_t lat = ceph_clock_now(g_ceph_context) - from; dout(20) << "do_write latency " << lat << dendl; - write_lock.Lock(); + write_lock.Lock(); assert(write_pos == pos); assert(write_pos % header.alignment == 0); @@ -1253,7 +1253,7 @@ void FileJournal::write_thread_entry() continue; } } - + #ifdef HAVE_LIBAIO if (aio) { Mutex::Locker locker(aio_lock); @@ -1300,7 +1300,7 @@ void FileJournal::write_thread_entry() while (!writeq_empty()) { put_throttle(1, peek_write().orig_len); pop_write(); - } + } print_header(header); r = 0; } else { @@ -1342,7 +1342,7 @@ void FileJournal::do_aio_write(bufferlist& bl) } // nothing to do? - if (bl.length() == 0 && !must_write_header) + if (bl.length() == 0 && !must_write_header) return; buffer::ptr hbp; @@ -1354,10 +1354,10 @@ void FileJournal::do_aio_write(bufferlist& bl) // entry off64_t pos = write_pos; - dout(15) << "do_aio_write writing " << pos << "~" << bl.length() + dout(15) << "do_aio_write writing " << pos << "~" << bl.length() << (hbp.length() ? " + header":"") << dendl; - + // split? off64_t split = 0; if (pos + bl.length() > header.max_size) { @@ -1421,7 +1421,7 @@ int FileJournal::write_aio_bl(off64_t& pos, bufferlist& bl, uint64_t seq) align_bl(pos, bl); dout(20) << "write_aio_bl " << pos << "~" << bl.length() << " seq " << seq << dendl; - + while (bl.length() > 0) { int max = MIN(bl.buffers().size(), IOV_MAX-1); iovec *iov = new iovec[max]; @@ -1439,7 +1439,7 @@ int FileJournal::write_aio_bl(off64_t& pos, bufferlist& bl, uint64_t seq) bufferlist tbl; bl.splice(0, len, &tbl); // move bytes from bl -> tbl - // lock only aio_queue, current aio, aio_num, aio_bytes, which may be + // lock only aio_queue, current aio, aio_num, aio_bytes, which may be // modified in check_aio_completion aio_lock.Lock(); aio_queue.push_back(aio_info(tbl, pos, bl.length() > 0 ? 0 : seq)); @@ -1453,7 +1453,7 @@ int FileJournal::write_aio_bl(off64_t& pos, bufferlist& bl, uint64_t seq) aio_num++; aio_bytes += aio.len; - + // need to save current aio len to update write_pos later because current // aio could be ereased from aio_queue once it is done uint64_t cur_len = aio.len; @@ -1501,7 +1501,7 @@ void FileJournal::write_finish_thread_entry() continue; } } - + dout(20) << "write_finish_thread_entry waiting for aio(s)" << dendl; io_event event[16]; int r = io_getevents(aio_ctx, 1, 16, event, NULL); @@ -1513,7 +1513,7 @@ void FileJournal::write_finish_thread_entry() derr << "io_getevents got " << cpp_strerror(r) << dendl; assert(0 == "got unexpected error from io_getevents"); } - + { Mutex::Locker locker(aio_lock); for (int i=0; i > journalq; // track seq offsets, so we can trim later. uint64_t writing_seq; - + // throttle Throttle throttle_ops, throttle_bytes; @@ -389,7 +389,7 @@ private: aio_ctx(0), aio_num(0), aio_bytes(0), #endif - last_committed_seq(0), + last_committed_seq(0), journaled_since_start(0), full_state(FULL_NOTFULL), fd(-1), diff --git a/src/os/FileStore.cc b/src/os/filestore/FileStore.cc similarity index 99% rename from src/os/FileStore.cc rename to src/os/filestore/FileStore.cc index 0eca9d90eac..de2df61a0c4 100644 --- a/src/os/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -8,9 +8,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #include "include/int_types.h" @@ -150,7 +150,7 @@ ostream& operator<<(ostream& out, const FileStore::OpSequencer& s) return out << *s.parent; } -int FileStore::get_cdir(coll_t cid, char *s, int len) +int FileStore::get_cdir(coll_t cid, char *s, int len) { const string &cid_str(cid.to_str()); return snprintf(s, len, "%s/current/%s", basedir.c_str(), cid_str.c_str()); @@ -379,7 +379,7 @@ int FileStore::lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghob } if (!exist) return -ENOENT; - + RWLock::WLocker l2((index_new.index)->access_lock); r = index_new->lookup(newoid, &path_new, &exist); @@ -434,7 +434,7 @@ int FileStore::lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghob assert(!m_filestore_fail_eio || r != -EIO); return r; } - } + } return 0; } @@ -511,7 +511,7 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbit backend(NULL), index_manager(do_update), lock("FileStore::lock"), - force_sync(false), + force_sync(false), sync_entry_timeo_lock("sync_entry_timeo_lock"), timer(g_ceph_context, sync_entry_timeo_lock), stop(false), sync_thread(this), @@ -657,7 +657,7 @@ void FileStore::collect_metadata(map *pm) char partition_path[PATH_MAX]; char dev_node[PATH_MAX]; int rc = 0; - + (*pm)["filestore_backend"] = backend->get_name(); ostringstream ss; ss << "0x" << std::hex << m_fs_type << std::dec; @@ -898,13 +898,13 @@ int FileStore::mkfs() ret = backend->create_checkpoint(s, NULL); VOID_TEMP_FAILURE_RETRY(::close(current_fd)); if (ret < 0 && ret != -EEXIST) { - VOID_TEMP_FAILURE_RETRY(::close(fd)); + VOID_TEMP_FAILURE_RETRY(::close(fd)); derr << "mkfs: failed to create snap_1: " << cpp_strerror(ret) << dendl; goto close_fsid_fd; } } } - VOID_TEMP_FAILURE_RETRY(::close(fd)); + VOID_TEMP_FAILURE_RETRY(::close(fd)); } ret = KeyValueDB::test_init(superblock.omap_backend, omap_dir); if (ret < 0) { @@ -1103,7 +1103,7 @@ int FileStore::_sanity_check_fs() (int)m_filestore_journal_parallel + (int)m_filestore_journal_trailing) > 1) { dout(0) << "mount ERROR: more than one of filestore journal {writeahead,parallel,trailing} enabled" << dendl; - cerr << TEXT_RED + cerr << TEXT_RED << " ** WARNING: more than one of 'filestore journal {writeahead,parallel,trailing}'\n" << " is enabled in ceph.conf. You must choose a single journal mode." << TEXT_NORMAL << std::endl; @@ -1113,7 +1113,7 @@ int FileStore::_sanity_check_fs() if (!backend->can_checkpoint()) { if (!journal || !m_filestore_journal_writeahead) { dout(0) << "mount WARNING: no btrfs, and no journal in writeahead mode; data may be lost" << dendl; - cerr << TEXT_RED + cerr << TEXT_RED << " ** WARNING: no btrfs AND (no journal OR journal not in writeahead mode)\n" << " For non-btrfs volumes, a writeahead journal is required to\n" << " maintain on-disk consistency in the event of a crash. Your conf\n" @@ -1266,7 +1266,7 @@ int FileStore::mount() CompatSet supported_compat_set = get_fs_supported_compat_set(); dout(5) << "basedir " << basedir << " journal " << journalpath << dendl; - + // make sure global base dir exists if (::access(basedir.c_str(), R_OK | W_OK)) { ret = -errno; @@ -1310,7 +1310,7 @@ int FileStore::mount() } else if (ret == 0) { if (do_update || (int)version_stamp < g_conf->filestore_update_to) { derr << "FileStore::mount : stale version stamp detected: " - << version_stamp + << version_stamp << ". Proceeding, do_update " << "is set, performing disk format upgrade." << dendl; @@ -1580,7 +1580,7 @@ int FileStore::mount() Index index; ret = get_index(*i, &index); if (ret < 0) { - derr << "Unable to mount index " << *i + derr << "Unable to mount index " << *i << " with error: " << ret << dendl; goto close_current_fd; } @@ -1705,10 +1705,10 @@ void FileStore::init_temp_collections() } } -int FileStore::umount() +int FileStore::umount() { dout(5) << "umount " << basedir << dendl; - + flush(); sync(); do_force_sync(); @@ -1831,7 +1831,7 @@ void FileStore::op_queue_reserve_throttle(Op *o, ThreadPool::TPHandle *handle) if (handle) handle->suspend_tp_timeout(); - if (throttle_ops.should_wait(1) || + if (throttle_ops.should_wait(1) || (throttle_bytes.get_current() // let single large ops through! && throttle_bytes.should_wait(o->bytes))) { dout(2) << "waiting " << throttle_ops.get_current() + 1 << " > " << max_ops << " ops || " @@ -1881,7 +1881,7 @@ void FileStore::_finish_op(OpSequencer *osr) { list to_queue; Op *o = osr->dequeue(&to_queue); - + utime_t lat = ceph_clock_now(g_ceph_context); lat -= o->start; @@ -1971,14 +1971,14 @@ int FileStore::queue_transactions(Sequencer *posr, list &tls, if (m_filestore_journal_parallel) { dout(5) << "queue_transactions (parallel) " << o->op << " " << o->tls << dendl; - + _op_journal_transactions(tbl, orig_len, o->op, ondisk, osd_op); - + // queue inside submit_manager op submission lock queue_op(osr, o); } else if (m_filestore_journal_writeahead) { dout(5) << "queue_transactions (writeahead) " << o->op << " " << o->tls << dendl; - + osr->queue_journal(o->op); _op_journal_transactions(tbl, orig_len, o->op, @@ -2030,7 +2030,7 @@ int FileStore::queue_transactions(Sequencer *posr, list &tls, apply_manager.op_apply_start(op); int r = do_transactions(tls, op); - + if (r >= 0) { _op_journal_transactions(tbl, orig_len, op, ondisk, osd_op); } else { @@ -2090,7 +2090,7 @@ int FileStore::_do_transactions( if (handle) handle->reset_tp_timeout(); } - + return r; } @@ -2187,7 +2187,7 @@ void FileStore::_set_replay_guard(coll_t cid, } _set_replay_guard(fd, spos, 0, in_progress); VOID_TEMP_FAILURE_RETRY(::close(fd)); -} +} void FileStore::_set_replay_guard(int fd, @@ -2243,7 +2243,7 @@ void FileStore::_close_replay_guard(coll_t cid, } _close_replay_guard(fd, spos); VOID_TEMP_FAILURE_RETRY(::close(fd)); -} +} void FileStore::_close_replay_guard(int fd, const SequencerPosition& spos) { @@ -2363,7 +2363,7 @@ unsigned FileStore::_do_transaction( #endif Transaction::iterator i = t.begin(); - + SequencerPosition spos(op_seq, trans_num, 0); while (i.have_op()) { if (handle) @@ -2388,7 +2388,7 @@ unsigned FileStore::_do_transaction( tracepoint(objectstore, touch_exit, r); } break; - + case Transaction::OP_WRITE: { coll_t cid = i.get_cid(op->cid); @@ -2405,7 +2405,7 @@ unsigned FileStore::_do_transaction( tracepoint(objectstore, write_exit, r); } break; - + case Transaction::OP_ZERO: { coll_t cid = i.get_cid(op->cid); @@ -2419,13 +2419,13 @@ unsigned FileStore::_do_transaction( tracepoint(objectstore, zero_exit, r); } break; - + case Transaction::OP_TRIMCACHE: { // deprecated, no-op } break; - + case Transaction::OP_TRUNCATE: { coll_t cid = i.get_cid(op->cid); @@ -2438,7 +2438,7 @@ unsigned FileStore::_do_transaction( tracepoint(objectstore, truncate_exit, r); } break; - + case Transaction::OP_REMOVE: { coll_t cid = i.get_cid(op->cid); @@ -2450,7 +2450,7 @@ unsigned FileStore::_do_transaction( tracepoint(objectstore, remove_exit, r); } break; - + case Transaction::OP_SETATTR: { coll_t cid = i.get_cid(op->cid); @@ -2471,7 +2471,7 @@ unsigned FileStore::_do_transaction( tracepoint(objectstore, setattr_exit, r); } break; - + case Transaction::OP_SETATTRS: { coll_t cid = i.get_cid(op->cid); @@ -2512,7 +2512,7 @@ unsigned FileStore::_do_transaction( tracepoint(objectstore, rmattrs_exit, r); } break; - + case Transaction::OP_CLONE: { coll_t cid = i.get_cid(op->cid); @@ -2892,7 +2892,7 @@ bool FileStore::exists(coll_t cid, const ghobject_t& oid) tracepoint(objectstore, exists_exit, retval); return retval; } - + int FileStore::stat( coll_t cid, const ghobject_t& oid, struct stat *st, bool allow_eio) { @@ -3125,7 +3125,7 @@ int FileStore::fiemap(coll_t cid, const ghobject_t& oid, dout(10) << "read couldn't open " << cid << "/" << oid << ": " << cpp_strerror(r) << dendl; goto done; } - + if (backend->has_seek_data_hole()) { dout(15) << "seek_data/seek_hole " << cid << "/" << oid << " " << offset << "~" << len << dendl; r = _do_seek_hole_data(**fd, offset, len, &exomap); @@ -3148,7 +3148,7 @@ done: int FileStore::_remove(coll_t cid, const ghobject_t& oid, - const SequencerPosition &spos) + const SequencerPosition &spos) { dout(15) << "remove " << cid << "/" << oid << dendl; int r = lfn_unlink(cid, oid, spos); @@ -3197,7 +3197,7 @@ int FileStore::_write(coll_t cid, const ghobject_t& oid, << cpp_strerror(r) << dendl; goto out; } - + // seek actual = ::lseek64(**fd, offset, SEEK_SET); if (actual < 0) { @@ -3579,7 +3579,7 @@ int FileStore::_clone_range(coll_t cid, const ghobject_t& oldoid, const ghobject class SyncEntryTimeout : public Context { public: - SyncEntryTimeout(int commit_timeo) + SyncEntryTimeout(int commit_timeo) : m_commit_timeo(commit_timeo) { } @@ -3625,7 +3625,7 @@ void FileStore::sync_entry() if (woke < min_interval) { utime_t t = min_interval; t -= woke; - dout(20) << "sync_entry waiting for another " << t + dout(20) << "sync_entry waiting for another " << t << " to reach min interval " << min_interval << dendl; sync_cond.WaitInterval(g_ceph_context, lock, t); } @@ -3635,7 +3635,7 @@ void FileStore::sync_entry() again: fin.swap(sync_waiters); lock.Unlock(); - + op_tp.pause(); if (apply_manager.commit_start()) { utime_t start = ceph_clock_now(g_ceph_context); @@ -3709,7 +3709,7 @@ void FileStore::sync_entry() assert(0 == "error during fsync of op_seq"); } } - + utime_t done = ceph_clock_now(g_ceph_context); utime_t lat = done - start; utime_t dur = done - startwait; @@ -3747,7 +3747,7 @@ void FileStore::sync_entry() } else { op_tp.unpause(); } - + lock.Lock(); finish_contexts(g_ceph_context, fin, 0); fin.clear(); @@ -3835,7 +3835,7 @@ void FileStore::flush() cond.Wait(lock); assert(0); } - + if (m_filestore_journal_writeahead) { if (journal) journal->flush(); @@ -4180,7 +4180,7 @@ int FileStore::_setattrs(coll_t cid, const ghobject_t& oid, map::iterator p = aset.begin(); @@ -4549,7 +4549,7 @@ int FileStore::collection_version_current(coll_t c, uint32_t *version) *version = index->collection_version(); if (*version == target_version) return 1; - else + else return 0; } @@ -4627,7 +4627,7 @@ int FileStore::list_collections(vector& ls, bool include_temp) return r; } -int FileStore::collection_stat(coll_t c, struct stat *st) +int FileStore::collection_stat(coll_t c, struct stat *st) { tracepoint(objectstore, collection_stat_enter, c.c_str()); char fn[PATH_MAX]; @@ -4642,7 +4642,7 @@ int FileStore::collection_stat(coll_t c, struct stat *st) return r; } -bool FileStore::collection_exists(coll_t c) +bool FileStore::collection_exists(coll_t c) { tracepoint(objectstore, collection_exists_enter, c.c_str()); struct stat st; @@ -4651,8 +4651,8 @@ bool FileStore::collection_exists(coll_t c) return ret; } -bool FileStore::collection_empty(coll_t c) -{ +bool FileStore::collection_empty(coll_t c) +{ tracepoint(objectstore, collection_empty_enter, c.c_str()); dout(15) << "collection_empty " << c << dendl; Index index; @@ -4910,7 +4910,7 @@ ObjectMap::ObjectMapIterator FileStore::get_omap_iterator(coll_t c, if (r < 0) { dout(10) << __func__ << " " << c << "/" << hoid << " = 0 " << "(get_index failed with " << cpp_strerror(r) << ")" << dendl; - return ObjectMap::ObjectMapIterator(); + return ObjectMap::ObjectMapIterator(); } { assert(NULL != index.index); @@ -4985,7 +4985,7 @@ int FileStore::_create_collection( return 0; } -int FileStore::_destroy_collection(coll_t c) +int FileStore::_destroy_collection(coll_t c) { int r = 0; char fn[PATH_MAX]; @@ -5030,7 +5030,7 @@ int FileStore::_collection_add(coll_t c, coll_t oldcid, const ghobject_t& o, const SequencerPosition& spos) { dout(15) << "collection_add " << c << "/" << o << " from " << oldcid << "/" << o << dendl; - + int dstcmp = _check_replay_guard(c, o, spos); if (dstcmp < 0) return 0; @@ -5335,7 +5335,7 @@ int FileStore::_split_collection(coll_t cid, assert(NULL != to.index); RWLock::WLocker l2((to.index)->access_lock); - + r = from->split(rem, bits, to.index); } diff --git a/src/os/FileStore.h b/src/os/filestore/FileStore.h similarity index 99% rename from src/os/FileStore.h rename to src/os/filestore/FileStore.h index ac7490b5ee4..cb77287f4c6 100644 --- a/src/os/FileStore.h +++ b/src/os/filestore/FileStore.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ @@ -28,7 +28,7 @@ using namespace std; #include "include/assert.h" -#include "ObjectStore.h" +#include "os/ObjectStore.h" #include "JournalingObjectStore.h" #include "common/Timer.h" @@ -37,7 +37,7 @@ using namespace std; #include "common/Mutex.h" #include "HashIndex.h" #include "IndexManager.h" -#include "ObjectMap.h" +#include "os/ObjectMap.h" #include "SequencerPosition.h" #include "FDCache.h" #include "WBThrottle.h" @@ -124,7 +124,7 @@ private: std::string current_op_seq_fn; std::string omap_dir; uuid_d fsid; - + size_t blk_size; ///< fs block size int fsid_fd, op_fd, basedir_fd, current_fd; @@ -151,10 +151,10 @@ private: // ObjectMap boost::scoped_ptr object_map; - + // helper fns int get_cdir(coll_t cid, char *s, int len); - + /// read a uuid from fd int read_fsid(int fd, uuid_d *uuid); @@ -200,7 +200,7 @@ private: Sequencer *parent; Mutex apply_lock; // for apply mutual exclusion int id; - + /// get_max_uncompleted bool _get_max_uncompleted( uint64_t *seq ///< [out] max uncompleted seq @@ -392,7 +392,7 @@ private: PerfCounters *logger; public: - int lfn_find(const ghobject_t& oid, const Index& index, + int lfn_find(const ghobject_t& oid, const Index& index, IndexedPath *path = NULL); int lfn_truncate(coll_t cid, const ghobject_t& oid, off_t length); int lfn_stat(coll_t cid, const ghobject_t& oid, struct stat *buf); @@ -416,7 +416,7 @@ public: int _detect_fs(); int _sanity_check_fs(); - + bool test_mount_in_use(); int read_op_seq(uint64_t *seq); int write_op_seq(int, uint64_t seq); diff --git a/src/os/GenericFileStoreBackend.cc b/src/os/filestore/GenericFileStoreBackend.cc similarity index 99% rename from src/os/GenericFileStoreBackend.cc rename to src/os/filestore/GenericFileStoreBackend.cc index 4bba4130ccf..d62d6221b3f 100644 --- a/src/os/GenericFileStoreBackend.cc +++ b/src/os/filestore/GenericFileStoreBackend.cc @@ -41,7 +41,7 @@ #include "common/sync_filesystem.h" #include "common/SloppyCRCMap.h" -#include "os/chain_xattr.h" +#include "os/filestore/chain_xattr.h" #define SLOPPY_CRC_XATTR "user.cephos.scrc" diff --git a/src/os/GenericFileStoreBackend.h b/src/os/filestore/GenericFileStoreBackend.h similarity index 100% rename from src/os/GenericFileStoreBackend.h rename to src/os/filestore/GenericFileStoreBackend.h diff --git a/src/os/HashIndex.cc b/src/os/filestore/HashIndex.cc similarity index 99% rename from src/os/HashIndex.cc rename to src/os/filestore/HashIndex.cc index 27edf0de6d2..a358ef3a814 100644 --- a/src/os/HashIndex.cc +++ b/src/os/filestore/HashIndex.cc @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #include "include/types.h" @@ -275,7 +275,7 @@ int HashIndex::col_split_level( if (r < 0) return r; } - + r = to.set_info(path, to_info); if (r < 0) @@ -635,7 +635,7 @@ bool HashIndex::must_merge(const subdir_info_s &info) { bool HashIndex::must_split(const subdir_info_s &info) { return (info.hash_level < (unsigned)MAX_HASH_LEVEL && info.objs > ((unsigned)(abs(merge_threshold)) * 16 * split_multiplier)); - + } int HashIndex::initiate_merge(const vector &path, subdir_info_s info) { diff --git a/src/os/HashIndex.h b/src/os/filestore/HashIndex.h similarity index 98% rename from src/os/HashIndex.h rename to src/os/filestore/HashIndex.h index c3808bd9667..2ed21860e62 100644 --- a/src/os/HashIndex.h +++ b/src/os/filestore/HashIndex.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #ifndef CEPH_HASHINDEX_H @@ -36,15 +36,15 @@ extern string reverse_hexdigit_bits_string(string l); * - F - 0 * @endverbatim * - * A file is located at the longest existing directory from the root + * A file is located at the longest existing directory from the root * given by the hex characters in the hash beginning with the least * significant. - * + * * ex: ghobject_t("object", CEPH_NO_SNAP, 0xA4CEE0D2) * would be located in (root)/2/D/0/ - * + * * Subdirectories are created when the number of objects in a directory - * exceed (abs(merge_threshhold)) * 16 * split_multiplier. The number of objects in a directory + * exceed (abs(merge_threshhold)) * 16 * split_multiplier. The number of objects in a directory * is encoded as subdir_info_s in an xattr on the directory. */ class HashIndex : public LFNIndex { @@ -74,7 +74,7 @@ private: uint32_t hash_level; ///< Hashlevel of subdir. subdir_info_s() : objs(0), subdirs(0), hash_level(0) {} - + void encode(bufferlist &bl) const { __u8 v = 1; @@ -83,7 +83,7 @@ private: ::encode(subdirs, bl); ::encode(hash_level, bl); } - + void decode(bufferlist::iterator &bl) { __u8 v; @@ -103,7 +103,7 @@ private: int op; vector path; - InProgressOp(int op, const vector &path) + InProgressOp(int op, const vector &path) : op(op), path(path) {} InProgressOp(bufferlist::iterator &bl) { @@ -129,8 +129,8 @@ private: ::decode(path, bl); } }; - - + + public: /// Constructor. HashIndex( @@ -292,9 +292,9 @@ private: uint32_t match, ///< [in] bits to match unsigned *mkdirred ///< [in,out] path[:mkdirred] has been mkdirred ); - - /** + + /** * Get string representation of ghobject_t/hash * * e.g: 0x01234567 -> "76543210" diff --git a/src/os/IndexManager.cc b/src/os/filestore/IndexManager.cc similarity index 96% rename from src/os/IndexManager.cc rename to src/os/filestore/IndexManager.cc index 1415939f92d..3a3e5c99a7b 100644 --- a/src/os/IndexManager.cc +++ b/src/os/filestore/IndexManager.cc @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #include "include/memory.h" @@ -36,13 +36,13 @@ static int set_version(const char *path, uint32_t version) { bufferlist bl; ::encode(version, bl); - return chain_setxattr(path, "user.cephos.collection_version", bl.c_str(), + return chain_setxattr(path, "user.cephos.collection_version", bl.c_str(), bl.length(), true); } static int get_version(const char *path, uint32_t *version) { bufferptr bp(PATH_MAX); - int r = chain_getxattr(path, "user.cephos.collection_version", + int r = chain_getxattr(path, "user.cephos.collection_version", bp.c_str(), bp.length()); if (r < 0) { if (r != -ENOENT) { @@ -62,7 +62,7 @@ static int get_version(const char *path, uint32_t *version) { IndexManager::~IndexManager() { - for (ceph::unordered_map ::iterator it = col_indices.begin(); + for (ceph::unordered_map ::iterator it = col_indices.begin(); it != col_indices.end(); ++it) { delete it->second; diff --git a/src/os/IndexManager.h b/src/os/filestore/IndexManager.h similarity index 97% rename from src/os/IndexManager.h rename to src/os/filestore/IndexManager.h index b167e7de28f..da71807dad1 100644 --- a/src/os/IndexManager.h +++ b/src/os/filestore/IndexManager.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #ifndef OS_INDEXMANAGER_H #define OS_INDEXMANAGER_H diff --git a/src/os/Journal.h b/src/os/filestore/Journal.h similarity index 96% rename from src/os/Journal.h rename to src/os/filestore/Journal.h index 400b1ea8b15..602e8ea7c36 100644 --- a/src/os/Journal.h +++ b/src/os/filestore/Journal.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ @@ -75,7 +75,7 @@ public: virtual int prepare_entry(list& tls, bufferlist* tbl) = 0; // reads/recovery - + }; #endif diff --git a/src/os/JournalingObjectStore.cc b/src/os/filestore/JournalingObjectStore.cc similarity index 98% rename from src/os/JournalingObjectStore.cc rename to src/os/filestore/JournalingObjectStore.cc index 599a1b568cb..e47b2e6e8b3 100644 --- a/src/os/JournalingObjectStore.cc +++ b/src/os/filestore/JournalingObjectStore.cc @@ -16,8 +16,8 @@ void JournalingObjectStore::journal_start() dout(10) << "journal_start" << dendl; finisher.start(); } - -void JournalingObjectStore::journal_stop() + +void JournalingObjectStore::journal_stop() { dout(10) << "journal_stop" << dendl; finisher.stop(); @@ -55,7 +55,7 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq) int err = journal->open(op_seq); if (err < 0) { - dout(3) << "journal_replay open failed with " + dout(3) << "journal_replay open failed with " << cpp_strerror(err) << dendl; delete journal; journal = 0; @@ -78,7 +78,7 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq) continue; } assert(op_seq == seq-1); - + dout(3) << "journal_replay: applying op seq " << seq << dendl; bufferlist::iterator p = bl.begin(); list tls; @@ -94,7 +94,7 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq) op_seq = seq; while (!tls.empty()) { - delete tls.front(); + delete tls.front(); tls.pop_front(); } @@ -236,12 +236,12 @@ void JournalingObjectStore::ApplyManager::commit_finish() { Mutex::Locker l(com_lock); dout(10) << "commit_finish thru " << committing_seq << dendl; - + if (journal) journal->committed_thru(committing_seq); committed_seq = committing_seq; - + map >::iterator p = commit_waiters.begin(); while (p != commit_waiters.end() && p->first <= committing_seq) { @@ -266,4 +266,3 @@ void JournalingObjectStore::_op_journal_transactions( apply_manager.add_waiter(op, onjournal); } } - diff --git a/src/os/JournalingObjectStore.h b/src/os/filestore/JournalingObjectStore.h similarity index 97% rename from src/os/JournalingObjectStore.h rename to src/os/filestore/JournalingObjectStore.h index bba3767b2c3..e757526b749 100644 --- a/src/os/JournalingObjectStore.h +++ b/src/os/filestore/JournalingObjectStore.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,15 +7,15 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #ifndef CEPH_JOURNALINGOBJECTSTORE_H #define CEPH_JOURNALINGOBJECTSTORE_H -#include "ObjectStore.h" +#include "os/ObjectStore.h" #include "Journal.h" #include "FileJournal.h" #include "common/RWLock.h" diff --git a/src/os/LFNIndex.cc b/src/os/filestore/LFNIndex.cc similarity index 98% rename from src/os/LFNIndex.cc rename to src/os/filestore/LFNIndex.cc index af2df6a9268..7f8e6d00ffe 100644 --- a/src/os/LFNIndex.cc +++ b/src/os/filestore/LFNIndex.cc @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #include @@ -44,8 +44,8 @@ const string LFNIndex::LFN_ATTR = "user.cephos.lfn"; const string LFNIndex::PHASH_ATTR_PREFIX = "user.cephos.phash."; const string LFNIndex::SUBDIR_PREFIX = "DIR_"; const string LFNIndex::FILENAME_COOKIE = "long"; -const int LFNIndex::FILENAME_PREFIX_LEN = FILENAME_SHORT_LEN - FILENAME_HASH_LEN - - FILENAME_COOKIE.size() - +const int LFNIndex::FILENAME_PREFIX_LEN = FILENAME_SHORT_LEN - FILENAME_HASH_LEN - + FILENAME_COOKIE.size() - FILENAME_EXTRA; void LFNIndex::maybe_inject_failure() { @@ -220,8 +220,8 @@ int LFNIndex::remove_objects(const vector &dir, i != holes.end(); ++i) { if (candidate == chain.rend() || *i > candidate->first) { - string remove_path_name = - get_full_path(dir, lfn_get_short_name(to_clean->second, *i)); + string remove_path_name = + get_full_path(dir, lfn_get_short_name(to_clean->second, *i)); maybe_inject_failure(); int r = ::unlink(remove_path_name.c_str()); maybe_inject_failure(); @@ -360,7 +360,7 @@ int LFNIndex::move_object( } -static int get_hobject_from_oinfo(const char *dir, const char *file, +static int get_hobject_from_oinfo(const char *dir, const char *file, ghobject_t *o) { char path[PATH_MAX]; @@ -420,7 +420,7 @@ int LFNIndex::list_objects(const vector &to_list, int max_objs, } if (index_version == HASH_INDEX_TAG) get_hobject_from_oinfo(to_list_path.c_str(), short_name.c_str(), &obj); - + out->insert(pair(short_name, obj)); ++listed; } else { @@ -505,7 +505,7 @@ int LFNIndex::path_exists(const vector &to_check, int *exists) } int LFNIndex::add_attr_path(const vector &path, - const string &attr_name, + const string &attr_name, bufferlist &attr_value) { string full_path = get_full_path_subdir(path); @@ -516,7 +516,7 @@ int LFNIndex::add_attr_path(const vector &path, } int LFNIndex::get_attr_path(const vector &path, - const string &attr_name, + const string &attr_name, bufferlist &attr_value) { string full_path = get_full_path_subdir(path); @@ -550,7 +550,7 @@ int LFNIndex::remove_attr_path(const vector &path, maybe_inject_failure(); return chain_removexattr(full_path.c_str(), mangled_attr_name.c_str()); } - + string LFNIndex::lfn_generate_object_name_keyless(const ghobject_t &oid) { char s[FILENAME_MAX_LEN]; @@ -568,7 +568,7 @@ string LFNIndex::lfn_generate_object_name_keyless(const ghobject_t &oid) while (*i && t < end) { if (*i == '\\') { *t++ = '\\'; - *t++ = '\\'; + *t++ = '\\'; } else if (*i == '.' && i == oid.hobj.oid.name.c_str()) { // only escape leading . *t++ = '\\'; *t++ = '.'; @@ -592,7 +592,7 @@ string LFNIndex::lfn_generate_object_name_keyless(const ghobject_t &oid) } static void append_escaped(string::const_iterator begin, - string::const_iterator end, + string::const_iterator end, string *out) { for (string::const_iterator i = begin; i != end; ++i) { @@ -709,7 +709,7 @@ string LFNIndex::lfn_generate_object_name_poolless(const ghobject_t &oid) return full_name; } -int LFNIndex::lfn_get_name(const vector &path, +int LFNIndex::lfn_get_name(const vector &path, const ghobject_t &oid, string *mangled_name, string *out_path, int *hardlink) @@ -863,8 +863,8 @@ int LFNIndex::lfn_unlink(const vector &path, return 0; } string subdir_path = get_full_path_subdir(path); - - + + int i = 0; for ( ; ; ++i) { string candidate = lfn_get_short_name(oid, i); @@ -993,9 +993,9 @@ static int parse_object(const char *s, ghobject_t& o) o.hobj.snap = CEPH_NOSNAP; else if (strncmp(bar+1, "snapdir", 7) == 0) o.hobj.snap = CEPH_SNAPDIR; - else + else o.hobj.snap = strtoull(bar+1, NULL, 16); - + uint32_t hobject_hash_input; sscanf(hash, "_%X", &hobject_hash_input); o.hobj.set_hash(hobject_hash_input); @@ -1019,7 +1019,7 @@ bool LFNIndex::lfn_parse_object_name_keyless(const string &long_name, ghobject_t } static bool append_unescaped(string::const_iterator begin, - string::const_iterator end, + string::const_iterator end, string *out) { for (string::const_iterator i = begin; i != end; ++i) { diff --git a/src/os/LFNIndex.h b/src/os/filestore/LFNIndex.h similarity index 98% rename from src/os/LFNIndex.h rename to src/os/filestore/LFNIndex.h index 31a100a7e8d..8f04407fc85 100644 --- a/src/os/LFNIndex.h +++ b/src/os/filestore/LFNIndex.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system @@ -7,9 +7,9 @@ * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software + * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ @@ -29,19 +29,19 @@ #include "CollectionIndex.h" -/** +/** * LFNIndex also encapsulates logic for manipulating * subdirectories of of a collection as well as the long filename * logic. * * The protected methods provide machinery for derived classes to * manipulate subdirectories and objects. - * + * * The virtual methods are to be overridden to provide the actual * hashed layout. - * + * * User must call created when an object is created. - * + * * Syncronization: Calling code must ensure that there are no object * creations or deletions during the lifetime of a Path object (except * of an object at that path). @@ -72,7 +72,7 @@ return -1; \ } \ - + class LFNIndex : public CollectionIndex { /// Hash digest output size. @@ -131,7 +131,7 @@ public: const char *base_path, ///< [in] path to Index root uint32_t index_version, double _error_injection_probability=0) - : CollectionIndex(collection), + : CollectionIndex(collection), base_path(base_path), index_version(index_version), error_injection_enabled(false), @@ -199,7 +199,7 @@ public: uint32_t bits, //< [in] bits to check CollectionIndex* dest //< [in] destination index ) = 0; - + /// @see CollectionIndex int split( uint32_t match, @@ -285,17 +285,17 @@ protected: * @return Error Code, 0 on success. */ int remove_objects( - const vector &dir, + const vector &dir, const map &to_remove, map *remaining ); - - /** + + /** * Moves contents of from into to. * * Invalidates mangled names in to. If interupted, all objects will be - * present in to before objects are removed from from. Ignores EEXIST + * present in to before objects are removed from from. Ignores EEXIST * while linking into to. * @return Error Code, 0 on success */ @@ -304,7 +304,7 @@ protected: const vector &to ///< [in] Dest subdirectory. ); - /** + /** * Remove an object from from. * * Invalidates mangled names in from. @@ -317,7 +317,7 @@ protected: /** * Gets the filename corresponding to oid in from. - * + * * The filename may differ between subdirectories. Furthermore, * file creations ore removals in from may invalidate the name. * @return Error code on failure, 0 on success @@ -394,7 +394,7 @@ protected: /// Read into attr_value atribute attr_name on path. int get_attr_path( const vector &path, ///< [in] Path to read. - const string &attr_name, ///< [in] Attribute to read. + const string &attr_name, ///< [in] Attribute to read. bufferlist &attr_value ///< [out] Attribute value read. ); @@ -453,7 +453,7 @@ private: ///Transate a file into and ghobject_t. int lfn_translate( const vector &path, ///< [in] Path containing the file. - const string &short_name, ///< [in] Filename to translate. + const string &short_name, ///< [in] Filename to translate. ghobject_t *out ///< [out] Object found. ); ///< @return Negative error code on error, 0 if not an object, 1 else diff --git a/src/os/SequencerPosition.h b/src/os/filestore/SequencerPosition.h similarity index 99% rename from src/os/SequencerPosition.h rename to src/os/filestore/SequencerPosition.h index 38f11f08dc4..c2ecf853bcf 100644 --- a/src/os/SequencerPosition.h +++ b/src/os/filestore/SequencerPosition.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef __CEPH_OS_SEQUENCERPOSITION_H diff --git a/src/os/WBThrottle.cc b/src/os/filestore/WBThrottle.cc similarity index 99% rename from src/os/WBThrottle.cc rename to src/os/filestore/WBThrottle.cc index 04c6922dfa1..6eb559dc016 100644 --- a/src/os/WBThrottle.cc +++ b/src/os/filestore/WBThrottle.cc @@ -3,7 +3,7 @@ #include "acconfig.h" -#include "os/WBThrottle.h" +#include "os/filestore/WBThrottle.h" #include "common/perf_counters.h" WBThrottle::WBThrottle(CephContext *cct) : @@ -141,7 +141,7 @@ bool WBThrottle::get_next_should_flush( return false; assert(!pending_wbs.empty()); ghobject_t obj(pop_object()); - + ceph::unordered_map >::iterator i = pending_wbs.find(obj); *next = boost::make_tuple(obj, i->second.second, i->second.first); diff --git a/src/os/WBThrottle.h b/src/os/filestore/WBThrottle.h similarity index 100% rename from src/os/WBThrottle.h rename to src/os/filestore/WBThrottle.h diff --git a/src/os/XfsFileStoreBackend.cc b/src/os/filestore/XfsFileStoreBackend.cc similarity index 99% rename from src/os/XfsFileStoreBackend.cc rename to src/os/filestore/XfsFileStoreBackend.cc index cf8bfe19388..365692ca867 100644 --- a/src/os/XfsFileStoreBackend.cc +++ b/src/os/filestore/XfsFileStoreBackend.cc @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system diff --git a/src/os/XfsFileStoreBackend.h b/src/os/filestore/XfsFileStoreBackend.h similarity index 99% rename from src/os/XfsFileStoreBackend.h rename to src/os/filestore/XfsFileStoreBackend.h index 282fc1c9ba1..84d4694368d 100644 --- a/src/os/XfsFileStoreBackend.h +++ b/src/os/filestore/XfsFileStoreBackend.h @@ -1,4 +1,4 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system diff --git a/src/os/ZFSFileStoreBackend.cc b/src/os/filestore/ZFSFileStoreBackend.cc similarity index 100% rename from src/os/ZFSFileStoreBackend.cc rename to src/os/filestore/ZFSFileStoreBackend.cc diff --git a/src/os/ZFSFileStoreBackend.h b/src/os/filestore/ZFSFileStoreBackend.h similarity index 100% rename from src/os/ZFSFileStoreBackend.h rename to src/os/filestore/ZFSFileStoreBackend.h diff --git a/src/os/chain_xattr.cc b/src/os/filestore/chain_xattr.cc similarity index 99% rename from src/os/chain_xattr.cc rename to src/os/filestore/chain_xattr.cc index 5351abf440b..28bb87bed1e 100644 --- a/src/os/chain_xattr.cc +++ b/src/os/filestore/chain_xattr.cc @@ -288,7 +288,7 @@ int chain_setxattr(const char *fn, const char *name, const void *val, size_t siz i++; } while (r != -ENODATA); } - + return ret; } @@ -324,7 +324,7 @@ int chain_fsetxattr(int fd, const char *name, const void *val, size_t size, bool i++; } while (r != -ENODATA); } - + return ret; } diff --git a/src/os/chain_xattr.h b/src/os/filestore/chain_xattr.h similarity index 100% rename from src/os/chain_xattr.h rename to src/os/filestore/chain_xattr.h diff --git a/src/test/ObjectMap/test_object_map.cc b/src/test/ObjectMap/test_object_map.cc index 6af60cf5033..0d504df576a 100644 --- a/src/test/ObjectMap/test_object_map.cc +++ b/src/test/ObjectMap/test_object_map.cc @@ -7,8 +7,8 @@ #include "include/buffer.h" #include "test/ObjectMap/KeyValueDBMemory.h" #include "kv/KeyValueDB.h" -#include "os/DBObjectMap.h" -#include "os/HashIndex.h" +#include "os/filestore/DBObjectMap.h" +#include "os/filestore/HashIndex.h" #include #include "global/global_init.h" #include "common/ceph_argparse.h" diff --git a/src/test/bench/small_io_bench_fs.cc b/src/test/bench/small_io_bench_fs.cc index 4b273e410a8..55b2aaeba7b 100644 --- a/src/test/bench/small_io_bench_fs.cc +++ b/src/test/bench/small_io_bench_fs.cc @@ -20,7 +20,7 @@ #include "detailed_stat_collector.h" #include "distribution.h" #include "global/global_init.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "testfilestore_backend.h" #include "common/perf_counters.h" diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h index 3ea3a01f198..add2a0d680d 100644 --- a/src/test/encoding/types.h +++ b/src/test/encoding/types.h @@ -108,7 +108,7 @@ TYPE(HitSet::Params) #include "os/ObjectStore.h" TYPE(ObjectStore::Transaction) -#include "os/SequencerPosition.h" +#include "os/filestore/SequencerPosition.h" TYPE(SequencerPosition) #include "os/bluestore/bluestore_types.h" @@ -144,7 +144,7 @@ TYPE(MonCap) #include "mon/mon_types.h" TYPE(LevelDBStoreStats) -#include "os/DBObjectMap.h" +#include "os/filestore/DBObjectMap.h" TYPE(DBObjectMap::_Header) TYPE(DBObjectMap::State) diff --git a/src/test/filestore/TestFileStore.cc b/src/test/filestore/TestFileStore.cc index a9b58a1468f..a100a5f3a69 100644 --- a/src/test/filestore/TestFileStore.cc +++ b/src/test/filestore/TestFileStore.cc @@ -16,7 +16,7 @@ #include "common/ceph_argparse.h" #include "global/global_init.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include class TestFileStore { diff --git a/src/test/objectstore/FileStoreDiff.cc b/src/test/objectstore/FileStoreDiff.cc index a49e4af3743..6a08e9c37c8 100644 --- a/src/test/objectstore/FileStoreDiff.cc +++ b/src/test/objectstore/FileStoreDiff.cc @@ -15,7 +15,7 @@ #include #include #include "common/debug.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "common/config.h" #include "FileStoreDiff.h" diff --git a/src/test/objectstore/FileStoreDiff.h b/src/test/objectstore/FileStoreDiff.h index f7aedeee2e6..ba9cfb9837b 100644 --- a/src/test/objectstore/FileStoreDiff.h +++ b/src/test/objectstore/FileStoreDiff.h @@ -18,7 +18,7 @@ #include #include #include "common/debug.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "common/config.h" class FileStoreDiff { diff --git a/src/test/objectstore/FileStoreTracker.h b/src/test/objectstore/FileStoreTracker.h index e350c80fe1f..a324fa25e32 100644 --- a/src/test/objectstore/FileStoreTracker.h +++ b/src/test/objectstore/FileStoreTracker.h @@ -3,7 +3,7 @@ #ifndef FILESTORE_TRACKER_H #define FILESTORE_TRACKER_H #include "test/common/ObjectContents.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "kv/KeyValueDB.h" #include #include diff --git a/src/test/objectstore/chain_xattr.cc b/src/test/objectstore/chain_xattr.cc index 9243150d66f..5080321cfc6 100644 --- a/src/test/objectstore/chain_xattr.cc +++ b/src/test/objectstore/chain_xattr.cc @@ -21,7 +21,7 @@ #include #include -#include "os/chain_xattr.h" +#include "os/filestore/chain_xattr.h" #include "include/Context.h" #include "common/errno.h" #include "common/ceph_argparse.h" diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 7b1a7609d53..dbc2e2cdf67 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -18,7 +18,7 @@ #include #include #include "os/ObjectStore.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "os/KeyValueStore.h" #include "include/Context.h" #include "common/ceph_argparse.h" diff --git a/src/test/objectstore/test_idempotent.cc b/src/test/objectstore/test_idempotent.cc index d52f7dbf03b..8c663a6bf24 100644 --- a/src/test/objectstore/test_idempotent.cc +++ b/src/test/objectstore/test_idempotent.cc @@ -15,7 +15,7 @@ #include #include #include -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "global/global_init.h" #include "common/ceph_argparse.h" #include "common/debug.h" diff --git a/src/test/objectstore/test_idempotent_sequence.cc b/src/test/objectstore/test_idempotent_sequence.cc index 95bf196975e..75ebc3377d3 100644 --- a/src/test/objectstore/test_idempotent_sequence.cc +++ b/src/test/objectstore/test_idempotent_sequence.cc @@ -19,7 +19,7 @@ #include "common/ceph_argparse.h" #include "global/global_init.h" #include "common/debug.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "DeterministicOpSequence.h" #include "FileStoreDiff.h" diff --git a/src/test/os/TestLFNIndex.cc b/src/test/os/TestLFNIndex.cc index 5e44355c1e7..ad4cb75e011 100644 --- a/src/test/os/TestLFNIndex.cc +++ b/src/test/os/TestLFNIndex.cc @@ -21,8 +21,8 @@ #include #include -#include "os/LFNIndex.h" -#include "os/chain_xattr.h" +#include "os/filestore/LFNIndex.h" +#include "os/filestore/chain_xattr.h" #include "common/ceph_argparse.h" #include "global/global_init.h" #include diff --git a/src/test/test_filejournal.cc b/src/test/test_filejournal.cc index bd0ff529338..d9dfb30d58d 100644 --- a/src/test/test_filejournal.cc +++ b/src/test/test_filejournal.cc @@ -8,11 +8,11 @@ #include "global/global_init.h" #include "common/config.h" #include "common/Finisher.h" -#include "os/FileJournal.h" +#include "os/filestore/FileJournal.h" #include "include/Context.h" #include "common/Mutex.h" #include "common/safe_io.h" -#include "os/JournalingObjectStore.h" +#include "os/filestore/JournalingObjectStore.h" Finisher *finisher; Cond sync_cond; diff --git a/src/test/test_trans.cc b/src/test/test_trans.cc index c374ed440a7..b55de59ba83 100644 --- a/src/test/test_trans.cc +++ b/src/test/test_trans.cc @@ -15,7 +15,7 @@ #include #include "common/ceph_argparse.h" #include "common/debug.h" -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "global/global_init.h" #include "include/assert.h" diff --git a/src/test/xattr_bench.cc b/src/test/xattr_bench.cc index e26e32f9ee7..544bb348689 100644 --- a/src/test/xattr_bench.cc +++ b/src/test/xattr_bench.cc @@ -17,7 +17,7 @@ #include #include #include -#include "os/FileStore.h" +#include "os/filestore/FileStore.h" #include "include/Context.h" #include "common/ceph_argparse.h" #include "global/global_init.h" diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 6c79be6eab9..23affbfc7ba 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -25,7 +25,7 @@ #include "global/global_init.h" #include "os/ObjectStore.h" -#include "os/FileJournal.h" +#include "os/filestore/FileJournal.h" #include "osd/PGLog.h" #include "osd/OSD.h" diff --git a/src/tools/ceph_osdomap_tool.cc b/src/tools/ceph_osdomap_tool.cc index 465ffda9195..ffb45288393 100644 --- a/src/tools/ceph_osdomap_tool.cc +++ b/src/tools/ceph_osdomap_tool.cc @@ -19,7 +19,7 @@ #include "common/errno.h" #include "global/global_init.h" -#include "os/DBObjectMap.h" +#include "os/filestore/DBObjectMap.h" #include "kv/KeyValueDB.h" namespace po = boost::program_options; -- 2.47.3