mirror of
https://github.com/ceph/ceph
synced 2025-01-05 10:42:05 +00:00
Ceph is a distributed object, block, and file storage platform
ec7731f737
PG::log, PG::ondisklog, PG::missing are moved from PG to a new PGLog class and are made protected data members. It is a preliminary step before writing unit tests to cover the methods that have side effects on these data members and define a clean PGLog API. It improves encapsulation and does not change any of the logic already in place. Possible issues : * an additional reference (PG->PGLog->IndexedLog instead of PG->IndexedLog for instance) is introduced : is it optimized ? * rewriting log.log into pg_log.get_log().log affects the readability but should be optimized and have no impact on performances The guidelines followed for this patch are: * const access to the data members are preserved, no attempt is made to define accessors * all non const methods are in PGLog, no access to non const methods of PGLog::log, PGLog::logondisk and PGLog::missing are provided * when methods are moved from PG to PGLog the change to their implementation is restricted to the minimum. * the PG::OndiskLog and PG::IndexedLog sub classes are moved to PGLog sub classes unmodified and remain public A const version of the pg_log_t::find_entry method was added. A const accessor is provided for PGLog::get_log, PGLog::get_missing, PGLog::get_ondisklog but no non-const accessor. Arguments are added to most of the methods moved from PG to PGLog so that they can get access to PG data members such as info or log_oid. The PGLog method are sorted according to the data member they modify. //////////////////// missing //////////////////// * The pg_missing_t::{got,have,need,add,rm} methods are wrapped as PGLog::missing_{got,have,need,add,rm} //////////////////// log //////////////////// * PGLog::get_tail, PGLog::get_head getters are created * PGLog::set_tail, PGLog::set_head, PGLog::set_last_requested setters are created * PGLog::index, PGLog::unindex, PGLog::add wrappers, PGLog::reset_recovery_pointers are created * PGLog::clear_info_log replaces PG::clear_info_log * PGLog::trim replaces PG::trim //////////////////// log & missing //////////////////// * PGLog::claim_log is created with code extracted from PG::RecoveryState::Stray::react. * PGLog::split_into is created with code extracted from PG::split_into. * PGLog::recover_got is created with code extracted from ReplicatedPG::recover_got. * PGLog::activate_not_complete is created with code extracted from PG::active * PGLog:proc_replica_log is created with code extracted from PG::proc_replica_log * PGLog:write_log is created with code extracted from PG::write_log * PGLog::merge_old_entry replaces PG::merge_old_entry The remove_snap argument is used to collect hobject_t * PGLog::rewind_divergent_log replaces PG::rewind_divergent_log The remove_snap argument is used to collect hobject_t A new PG::rewind_divergent_log method is added to call remove_snap_mapped_object on each of the remove_snap elements * PGLog::merge_log replaces PG::merge_log The remove_snap argument is used to collect hobject_t A new PG::merge_log method is added to call remove_snap_mapped_object on each of the remove_snap elements * PGLog:write_log is created with code extracted from PG::write_log. A non-static version is created for convenience but is a simple wrapper. * PGLog:read_log replaces PG::read_log. A non-static version is created for convenience but is a simple wrapper. * PGLog:read_log_old replaces PG::read_log_old. http://tracker.ceph.com/issues/5046 refs #5046 Signed-off-by: Loic Dachary <loic@dachary.org> |
||
---|---|---|
admin | ||
ceph-object-corpus@0655429f62 | ||
debian | ||
doc | ||
fusetrace | ||
keys | ||
m4 | ||
man | ||
qa | ||
src | ||
udev | ||
wireshark | ||
.gitignore | ||
.gitmodules | ||
AUTHORS | ||
autogen.sh | ||
ceph.spec.in | ||
ChangeLog | ||
CodingStyle | ||
configure.ac | ||
COPYING | ||
COPYING-LGPL2.1 | ||
do_autogen.sh | ||
Doxyfile | ||
INSTALL | ||
Makefile.am | ||
NEWS | ||
PendingReleaseNotes | ||
README | ||
RELEASE_CHECKLIST | ||
SubmittingPatches |
============================================ Ceph - a scalable distributed storage system ============================================ Please see http://ceph.com/ for current info. Contributing Code ================= Most of Ceph is licensed under the LGPL version 2.1. Some miscellaneous code is under BSD-style license or is public domain. The documentation is licensed under Creative Commons Attribution-ShareAlike (CC BY-SA). There are a handful of headers included here that are licensed under the GPL. Please see the file COPYING for a full inventory of licenses by file. Code contributions must include a valid "Signed-off-by" acknowledging the license for the modified or contributed file. Please see the file SubmittingPatches for details on what that means and on how to generate and submit patches. We do not require assignment of copyright to contribute code; code is contributed under the terms of the applicable license. Building Ceph ============= To prepare the source tree after it has been git cloned, $ git submodule update --init To build the server daemons, and FUSE client, execute the following: $ ./autogen.sh $ ./configure $ make (Note that the FUSE client will only be built if libfuse is present.) Dependencies ------------ The configure script will complain about any missing dependencies as it goes. You can also refer to debian/control or ceph.spec.in for the package build dependencies on those platforms. In many cases, dependencies can be avoided with --with-foo or --without-bar switches. For example, $ ./configure --with-nss # use libnss instead of libcrypto++ $ ./configure --without-radosgw # do not build radosgw and avoid libfcgi-dev $ ./configure --without-tcmalloc # avoid google-perftools dependency Building packages ----------------- You can build packages for Debian or Debian-derived (e.g., Ubuntu) systems with $ sudo apt-get dpkg-dev $ dpkg-checkbuilddeps # make sure we have all dependencies $ dpkg-buildpackage For RPM-based systems (Redhat, Suse, etc.), $ rpmbuild Building the Documentation ========================== Prerequisites ------------- To build the documentation, you must install the following: - python-dev - python-pip - python-virtualenv - doxygen - ditaa - libxml2-dev - libxslt-dev - dot - graphviz For example: sudo apt-get install python-dev python-pip python-virtualenv doxygen ditaa libxml2-dev libxslt-dev dot graphviz Building the Documentation -------------------------- To build the documentation, ensure that you are in the top-level `/ceph directory, and execute the build script. For example: $ admin/build-doc Build Prerequisites ------------------- To build the source code, you must install the following: - automake - autoconf - gcc - g++ - libboost-dev - libedit-dev - libssl-dev - libtool - libfcgi - libfcgi-dev - libfuse-dev - linux-kernel-headers - libcrypto++-dev - libaio-dev - libgoogle-perftools-dev - libkeyutils-dev - uuid-dev - libatomic-ops-dev - libboost-program-options-dev - libboost-thread-dev - libexpat1-dev - libleveldb-dev - libsnappy-dev For example: $ apt-get install automake autoconf gcc g++ libboost-dev libedit-dev libssl-dev libtool libfcgi libfcgi-dev libfuse-dev linux-kernel-headers libcrypto++-dev libaio-dev libgoogle-perftools-dev libkeyutils-dev uuid-dev libatomic-ops-dev libboost-program-options-dev libboost-thread-dev libexpat1-dev libleveldb-dev libsnappy-dev