Skip to content

Commit

Permalink
Merge remote-tracking branch 'gh/hammer'
Browse files Browse the repository at this point in the history
  • Loading branch information
liewegas committed Feb 22, 2015
2 parents aebdc4f + f653047 commit 8221687
Show file tree
Hide file tree
Showing 19 changed files with 330 additions and 150 deletions.
164 changes: 123 additions & 41 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,6 @@ BuildRequires: fuse-devel
%description -n rbd-fuse
FUSE based client to map Ceph rbd images to files

%package devel
Summary: Ceph headers
Group: Development/Libraries
License: LGPL-2.0
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: libradosstriper1 = %{epoch}:%{version}-%{release}
Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: libcephfs1 = %{epoch}:%{version}-%{release}
Requires: libcephfs_jni1 = %{epoch}:%{version}-%{release}
%description devel
This package contains libraries and headers needed to develop programs
that use Ceph.

%package radosgw
Summary: Rados REST gateway
Group: Development/Libraries
Expand Down Expand Up @@ -197,6 +183,16 @@ developed as part of the Ceph distributed storage system. This is a
shared library allowing applications to access the distributed object
store using a simple file-like interface.

%package -n librados2-devel
Summary: RADOS headers
Group: Development/Libraries
License: LGPL-2.0
Requires: librados2 = %{epoch}:%{version}-%{release}
Obsoletes: ceph-devel < %{epoch}:%{version}-%{release}
%description -n librados2-devel
This package contains libraries and headers needed to develop programs
that use RADOS object store.

%package -n libradosstriper1
Summary: RADOS striping interface
Group: System Environment/Libraries
Expand All @@ -207,6 +203,17 @@ Striping interface built on top of the rados library, allowing
to stripe bigger objects onto several standard rados objects using
an interface very similar to the rados one.

%package -n libradosstriper1-devel
Summary: RADOS striping interface headers
Group: Development/Libraries
License: LGPL-2.0
Requires: libradosstriper1 = %{epoch}:%{version}-%{release}
Requires: librados2-devel = %{epoch}:%{version}-%{release}
Obsoletes: ceph-devel < %{epoch}:%{version}-%{release}
%description -n libradosstriper1-devel
This package contains libraries and headers needed to develop programs
that use RADOS striping interface.

%package -n librbd1
Summary: RADOS block device client library
Group: System Environment/Libraries
Expand All @@ -221,6 +228,17 @@ RADOS, a reliable, autonomic distributed object storage cluster
developed as part of the Ceph distributed storage system. This is a
shared library allowing applications to manage these block devices.

%package -n librbd1-devel
Summary: RADOS block device headers
Group: Development/Libraries
License: LGPL-2.0
Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: librados2-devel = %{epoch}:%{version}-%{release}
Obsoletes: ceph-devel < %{epoch}:%{version}-%{release}
%description -n librbd1-devel
This package contains libraries and headers needed to develop programs
that use RADOS block device.

%package -n libcephfs1
Summary: Ceph distributed file system client library
Group: System Environment/Libraries
Expand All @@ -235,6 +253,17 @@ performance, reliability, and scalability. This is a shared library
allowing applications to access a Ceph distributed file system via a
POSIX-like interface.

%package -n libcephfs1-devel
Summary: Ceph distributed file system headers
Group: Development/Libraries
License: LGPL-2.0
Requires: libcephfs1 = %{epoch}:%{version}-%{release}
Requires: librados2-devel = %{epoch}:%{version}-%{release}
Obsoletes: ceph-devel < %{epoch}:%{version}-%{release}
%description -n libcephfs1-devel
This package contains libraries and headers needed to develop programs
that use Cephs distributed file system.

%package -n python-ceph
Summary: Python libraries for the Ceph distributed filesystem
Group: System Environment/Libraries
Expand Down Expand Up @@ -281,6 +310,17 @@ BuildRequires: java-devel
This package contains the Java Native Interface library for CephFS Java
bindings.

%package -n libcephfs_jni1-devel
Summary: Development files for CephFS Java Native Interface library.
Group: System Environment/Libraries
License: LGPL-2.0
Requires: java
Requires: libcephfs_jni1 = %{epoch}:%{version}-%{release}
Obsoletes: ceph-devel < %{epoch}:%{version}-%{release}
%description -n libcephfs_jni1-devel
This package contains the development files for CephFS Java Native Interface
library.

%package -n cephfs-java
Summary: Java libraries for the Ceph File System.
Group: System Environment/Libraries
Expand Down Expand Up @@ -315,6 +355,24 @@ former ceph-libs package, which is now split up into these three subpackages.
Packages still depending on ceph-libs should be fixed to depend on librados2,
librbd1 or libcephfs1 instead.

%package devel-compat
Summary: Compatibility package for Ceph headers
Group: Development/Libraries
License: LGPL-2.0
Obsoletes: ceph-devel
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: librados2-devel = %{epoch}:%{version}-%{release}
Requires: libradosstriper1-devel = %{epoch}:%{version}-%{release}
Requires: librbd1-devel = %{epoch}:%{version}-%{release}
Requires: libcephfs1-devel = %{epoch}:%{version}-%{release}
Requires: libcephfs_jni1-devel = %{epoch}:%{version}-%{release}
Provides: ceph-devel
%description devel-compat
This is a compatibility package to accommodate ceph-devel split into
librados2-devel, librbd1-devel and libcephfs1-devel. Packages still depending
on ceph-devel should be fixed to depend on librados2-devel, librbd1-devel,
libcephfs1-devel or libradosstriper1-devel instead.

%if 0%{?opensuse} || 0%{?suse_version}
%debug_package
%endif
Expand Down Expand Up @@ -592,33 +650,6 @@ fi
%{_bindir}/rbd-fuse
%{_mandir}/man8/rbd-fuse.8*

#################################################################################
%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/cephfs
%{_includedir}/cephfs/libcephfs.h
%dir %{_includedir}/rados
%{_includedir}/rados/librados.h
%{_includedir}/rados/librados.hpp
%{_includedir}/rados/buffer.h
%{_includedir}/rados/page.h
%{_includedir}/rados/crc32c.h
%{_includedir}/rados/rados_types.h
%{_includedir}/rados/rados_types.hpp
%{_includedir}/rados/memory.h
%dir %{_includedir}/radosstriper
%{_includedir}/radosstriper/libradosstriper.h
%{_includedir}/radosstriper/libradosstriper.hpp
%dir %{_includedir}/rbd
%{_includedir}/rbd/librbd.h
%{_includedir}/rbd/librbd.hpp
%{_includedir}/rbd/features.h
%{_libdir}/libcephfs.so
%{_libdir}/librbd.so
%{_libdir}/librados.so
%{_libdir}/libradosstriper.so
%{_libdir}/libcephfs_jni.so

#################################################################################
%files radosgw
%defattr(-,root,root,-)
Expand Down Expand Up @@ -676,6 +707,20 @@ fi
%postun -n librados2
/sbin/ldconfig

#################################################################################
%files -n librados2-devel
%defattr(-,root,root,-)
%dir %{_includedir}/rados
%{_includedir}/rados/librados.h
%{_includedir}/rados/librados.hpp
%{_includedir}/rados/buffer.h
%{_includedir}/rados/page.h
%{_includedir}/rados/crc32c.h
%{_includedir}/rados/rados_types.h
%{_includedir}/rados/rados_types.hpp
%{_includedir}/rados/memory.h
%{_libdir}/librados.so

#################################################################################
%files -n libradosstriper1
%defattr(-,root,root,-)
Expand All @@ -687,6 +732,14 @@ fi
%postun -n libradosstriper1
/sbin/ldconfig

#################################################################################
%files -n libradosstriper1-devel
%defattr(-,root,root,-)
%dir %{_includedir}/radosstriper
%{_includedir}/radosstriper/libradosstriper.h
%{_includedir}/radosstriper/libradosstriper.hpp
%{_libdir}/libradosstriper.so

#################################################################################
%files -n librbd1
%defattr(-,root,root,-)
Expand All @@ -705,6 +758,15 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%postun -n librbd1
/sbin/ldconfig

#################################################################################
%files -n librbd1-devel
%defattr(-,root,root,-)
%dir %{_includedir}/rbd
%{_includedir}/rbd/librbd.h
%{_includedir}/rbd/librbd.hpp
%{_includedir}/rbd/features.h
%{_libdir}/librbd.so

#################################################################################
%files -n libcephfs1
%defattr(-,root,root,-)
Expand All @@ -716,6 +778,13 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%postun -n libcephfs1
/sbin/ldconfig

#################################################################################
%files -n libcephfs1-devel
%defattr(-,root,root,-)
%dir %{_includedir}/cephfs
%{_includedir}/cephfs/libcephfs.h
%{_libdir}/libcephfs.so

#################################################################################
%files -n python-ceph
%defattr(-,root,root,-)
Expand Down Expand Up @@ -765,17 +834,30 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%{_bindir}/rbd-replay-prep
%endif

#################################################################################
%files -n libcephfs_jni1
%defattr(-,root,root,-)
%{_libdir}/libcephfs_jni.so.*

#################################################################################
%files -n libcephfs_jni1-devel
%defattr(-,root,root,-)
%{_libdir}/libcephfs_jni.so

#################################################################################
%files -n cephfs-java
%defattr(-,root,root,-)
%{_javadir}/libcephfs.jar
%{_javadir}/libcephfs-test.jar

#################################################################################
%files libs-compat
# We need an empty %%files list for ceph-libs-compat, to tell rpmbuild to actually
# build this meta package.

#################################################################################
%files devel-compat
# We need an empty %%files list for ceph-devel-compat, to tell rpmbuild to
# actually build this meta package.

%changelog
4 changes: 2 additions & 2 deletions doc/rados/api/librados-intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ distributions, execute the following::
To install ``librados`` development support files for C/C++ on RHEL/CentOS
distributions, execute the following::

sudo yum install ceph-devel
sudo yum install librados2-devel

Once you install ``librados`` for developers, you can find the required
headers for C/C++ under ``/usr/include/rados``. ::
Expand All @@ -63,7 +63,7 @@ Getting librados for Python

The ``rados.py`` modules provides ``librados`` support to Python
applications. The ``librados-dev`` package for Debian/Ubuntu
and the ``ceph-devel`` package for RHEL/CentOS will install the
and the ``librados2-devel`` package for RHEL/CentOS will install the
``python-ceph`` package for you. You may install ``python-ceph``
directly too.

Expand Down
37 changes: 12 additions & 25 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ set(libos_srcs
os/GenericFileStoreBackend.cc
os/BtrfsFileStoreBackend.cc
os/ZFSFileStoreBackend.cc
os/XfsFileStoreBackend.cc
os/KeyValueStore.cc
os/KeyValueDB.cc
os/MemStore.cc
Expand Down Expand Up @@ -736,31 +737,6 @@ if(${WITH_RADOSGW})

include_directories("${CMAKE_SOURCE_DIR}/src/civetweb/include")

set(radosgw_srcs
rgw/rgw_civetweb.cc
rgw/rgw_resolve.cc
rgw/rgw_rest.cc
rgw/rgw_rest_swift.cc
rgw/rgw_rest_s3.cc
rgw/rgw_rest_usage.cc
rgw/rgw_rest_user.cc
rgw/rgw_rest_bucket.cc
rgw/rgw_http_client.cc
rgw/rgw_swift.cc
rgw/rgw_swift_auth.cc
rgw/rgw_main.cc
rgw/rgw_keystone.cc
rgw/rgw_loadgen.cc
rgw/rgw_rest_client.cc
rgw/rgw_metadata.cc
rgw/rgw_rest_config.cc
rgw/rgw_rest_conn.cc
rgw/rgw_rest_log.cc
rgw/rgw_rest_metadata.cc
rgw/rgw_rest_opstate.cc
rgw/rgw_rest_replica_log.cc
${kvs_srcs})

set(radosgw_srcs
rgw/rgw_resolve.cc
rgw/rgw_rest.cc
Expand All @@ -784,11 +760,22 @@ if(${WITH_RADOSGW})
civetweb/src/civetweb.c
rgw/rgw_main.cc)

set(radosgw_admin_srcs
rgw/rgw_admin.cc)

add_executable(radosgw ${radosgw_srcs} $<TARGET_OBJECTS:heap_profiler_objs>)
target_link_libraries(radosgw rgw_a librados
cls_rgw_client cls_lock_client cls_refcount_client
cls_log_client cls_statelog_client cls_version_client
cls_replica_log_client cls_user_client
curl expat global fcgi resolv ${TCMALLOC_LIBS})
install(TARGETS radosgw DESTINATION bin)

add_executable(radosgw-admin ${radosgw_admin_srcs} $<TARGET_OBJECTS:heap_profiler_objs>)
target_link_libraries(radosgw-admin rgw_a librados
cls_rgw_client cls_lock_client cls_refcount_client
cls_log_client cls_statelog_client cls_version_client
cls_replica_log_client cls_user_client
curl expat global fcgi resolv ${TCMALLOC_LIBS})
install(TARGETS radosgw-admin DESTINATION bin)
endif(${WITH_RADOSGW})
11 changes: 4 additions & 7 deletions src/common/bit_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,7 @@ void BitVector<_b>::encode_data(bufferlist& bl, uint64_t byte_offset,

bufferlist bit;
bit.substr_of(m_data, byte_offset, len);
m_data_crcs[byte_offset / CEPH_PAGE_SIZE] =
ceph_crc32c(0, reinterpret_cast<unsigned char*>(bit.c_str()),
bit.length());
m_data_crcs[byte_offset / CEPH_PAGE_SIZE] = bit.crc32c(0);

bl.claim_append(bit);
byte_offset += CEPH_PAGE_SIZE;
Expand Down Expand Up @@ -388,11 +386,10 @@ typename BitVector<_b>::Reference& BitVector<_b>::Reference::operator=(uint8_t v
uint64_t shift;
this->m_bit_vector.compute_index(this->m_offset, &index, &shift);

// TODO: find out why bufferlist doesn't support char& operator[]()
uint8_t mask = MASK << shift;
char* packed_data = this->m_bit_vector.m_data.c_str();
uint8_t packed_value = (packed_data[index] & ~mask) | ((v << shift) & mask);
packed_data[index] = packed_value;
char packed_value = (this->m_bit_vector.m_data[index] & ~mask) |
((v << shift) & mask);
this->m_bit_vector.m_data.copy_in(index, 1, &packed_value);
return *this;
}

Expand Down
5 changes: 5 additions & 0 deletions src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,10 @@ OPTION(osd_erasure_code_plugins, OPT_STR,
" isa"
#endif
) // list of erasure code plugins

// Allows the "peered" state for recovery and backfill below min_size
OPTION(osd_allow_recovery_below_min_size, OPT_BOOL, true)

OPTION(osd_pool_default_flags, OPT_INT, 0) // default flags for new pools
OPTION(osd_pool_default_flag_hashpspool, OPT_BOOL, true) // use new pg hashing to prevent pool/pg overlap
OPTION(osd_pool_default_flag_nodelete, OPT_BOOL, false) // pool can't be deleted
Expand Down Expand Up @@ -646,6 +650,7 @@ OPTION(osd_failsafe_full_ratio, OPT_FLOAT, .97) // what % full makes an OSD "ful
OPTION(osd_failsafe_nearfull_ratio, OPT_FLOAT, .90) // what % full makes an OSD near full (failsafe)

OPTION(osd_pg_object_context_cache_count, OPT_INT, 64)
OPTION(osd_enable_degraded_writes, OPT_BOOL, true)

// determines whether PGLog::check() compares written out log to stored log
OPTION(osd_debug_pg_log_writeout, OPT_BOOL, false)
Expand Down
Loading

0 comments on commit 8221687

Please sign in to comment.