1
0
mirror of https://github.com/ceph/ceph synced 2024-12-30 15:33:31 +00:00
Commit Graph

43507 Commits

Author SHA1 Message Date
Kefu Chai
a400b48bfd Merge pull request from branch-predictor/bp-reduce-mallocs
Thread.cc: remove malloc/free pair

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-08-04 15:04:29 +08:00
Kefu Chai
eeb660d0a9 Merge pull request from ceph/wip-da-SCA-20150601
Various SCA and Coverity fixes

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-08-04 15:03:11 +08:00
Kefu Chai
1638525015 Merge pull request from xinxinsh/wip-sparse-copy
use SEEK_HOLE/SEEK_DATA for sparse copy

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-08-04 13:58:21 +08:00
Kefu Chai
8f0028a9bd Merge pull request from ceph/wip-12429
osd/OSDMap: handle incrementals that modify+del pool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-08-04 13:52:15 +08:00
shawn
111ecf859b radosgw-admin: use cout not cerr to print help message.
everytime I print radosgw-admin help message, it's too long, and I wanna add | more,
but the help message prints to cerr, so I can only add 2>&1 again, so I think it's
so inconvenient.

Signed-off-by: shawn chen <cxwshawn@gmail.com>
2015-08-04 11:14:42 +08:00
Sage Weil
89c99db0d5 Merge pull request from kylinstorage/test_cache_pool_script_fix
fix: qa/workunits/rados/test_cache_pool.sh

Reviewed-by: Sage Weil <sage@redhat.com>
2015-08-03 21:49:38 -04:00
Sage Weil
75d80aa5ce Merge pull request from ceph/wip-12537
rgw: url encode exposed bucket

Reviewed-by: Sage Weil <sage@redhat.com>
2015-08-03 21:47:41 -04:00
Sage Weil
3cbec3521e Merge pull request from ceph/wip-12222
mon: reject over-large values of max_mds

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2015-08-03 15:15:51 -04:00
Sage Weil
06d1546464 Merge pull request from tchaikov/wip-12451
tools/rados: update the help message

Reviewed-by: Sage Weil <sage@redhat.com>
2015-08-03 15:14:37 -04:00
Sage Weil
145364bbd9 logrotate: fix log rotation with systemd
systemctl does not have a nice way to enumerate (active) units so we can
reload them.  On centos7, the is-active wildcard syntax does not appear to
be supported.  On fedora 22, it prints the state only but not which unit
the state belongs to.

Simply killall -1 instead.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-03 14:41:43 -04:00
Josh Durgin
fb4e332124 Merge pull request from vumrao/wip-vumrao-12458-doc
doc: change --keyfile description in man page of rbd help

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-08-03 11:05:55 -07:00
Vikhyat Umrao
85cb86d05f doc: change "--keyfile" description in man page of rbd help
"--keyring" has higher priority than "--keyfile".
"--keyfile" option is overridden by "--keyring"
if latter is also specified.

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2015-08-03 22:57:04 +05:30
Kefu Chai
12c4e7dac9 Merge pull request from ceph/wip-cephfs-cmake
CMake fixes for CephFS

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-08-04 01:18:47 +08:00
Sage Weil
b93b6726c0 Merge pull request from kylinstorage/wip-do_autogen.sh
Allow do_autogen.sh pass configure parameters

Reviewed-by: Sage Weil <sage@redhat.com>
2015-08-03 12:09:33 -04:00
Sage Weil
1ca6bf60e9 common/hobject_t: correctly decode pre-infernalis hobject_t min
In commit ff99af38df we changed
the value of hobject_t() (the min value) but did not handle
compatibility properly.  Compensate by correctly decoding older
OSDs' notion of hobject_t min and mapping it to ours.

The hammer stable branch will have to compensate similarly so that
it can map our min value to its old min.

Fixes: 
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-03 11:53:09 -04:00
John Spray
bc0d9427d6 CMake: add crushtool
Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:36 +01:00
John Spray
fe970bc14d CMake: fix librados build
Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:36 +01:00
John Spray
2355c45459 CMake: fix rbd build
Don't link with 'global' from rbd (to match
autotools update fa78739).  Fixes "g_ceph_context
defined twice" error.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:35 +01:00
John Spray
22e8a2915d CMake: libblkid not only needed with rbd
It's linked in libcommon.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:35 +01:00
John Spray
57cd851df6 CMake: smalliobenchrbd should dep on rbd
Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:35 +01:00
John Spray
1f541b2e8e CMake: set WITH_CEPHFS by default
Option was referenced in CMakeLists but
not actually set.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:35 +01:00
John Spray
a4a81c33c9 CMake: fix cephfs cls build
Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:35 +01:00
John Spray
cc35d9b4b5 CMake: fix cephfs test targets
These had bad lib names.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:35 +01:00
John Spray
2761b296c1 CMake: add cephfs tools
cephfs-table-tool, cephfs-data-scan, cephfs-journal-tool

Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-03 16:39:35 +01:00
Casey Bodley
5416b1fb22 c++11: fixes for std::pair type conversions
mds_rank_t is no longer a BOOST_STRONG_TYPEDEF, because that was
preventing the conversion between pairs of int and pairs of mds_rank_t

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2015-08-03 11:16:13 -04:00
Casey Bodley
3f52583484 c++11: stream output operators for stream types
stream output operators for the stream types are not part of the standard,
so this statement no longer works:

std::stringstream stream;
std::cout << stream;

instead, use the streambuf's stream operator:

std::cout << stream.rdbuf();

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2015-08-03 11:16:13 -04:00
Casey Bodley
5b15ea2b2d c++11: replace auto_ptr with unique_ptr
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2015-08-03 11:16:13 -04:00
Casey Bodley
2d18941f9d c++11: remove references to the std::tr1 namespace
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2015-08-03 11:16:13 -04:00
Casey Bodley
51a218c866 autoconf: build as c++11
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2015-08-03 11:16:13 -04:00
Casey Bodley
b2e484d942 cmake: build as c++11
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2015-08-03 11:16:13 -04:00
Sage Weil
ec8433df38 Makefile: include systemd udev rules in tarball
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-03 10:57:14 -04:00
Kefu Chai
fdf0e030c3 Merge pull request from ceph/wip-fix-filestore-getattr
tests: fix the ObjectStore/StoreTest.SimpleCloneTest in "ceph_test_objectstore"

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-08-03 22:37:35 +08:00
Yan, Zheng
02590c1d65 Merge pull request from ceph/wip-config-root-ino
Make UID of new root inos configurable
2015-08-03 21:28:47 +08:00
Yunchuan Wen
e4c6922cca add help to do_autogen.sh
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Reviewed-by: Li Wang <liwang@ubuntukylin.com>
2015-08-03 13:16:00 +00:00
Yunchuan Wen
e28b3d111d Allow do_autogen.sh to pass configure parameters
Currently do_autogen.sh does not allow to pass parameters
of configure to disable/enable components during building, which is not
flexible, this patch add the ability to it.

Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Reviewed-by: Li Wang <liwang@ubuntukylin.com>
2015-08-03 13:03:47 +00:00
Yan, Zheng
217837b89f client: use smart pointer to track temporary inode reference
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 16:12:18 +08:00
Yan, Zheng
8c45ae1239 client: use smart pointer to track 'cwd' and 'root_parents'
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 16:12:18 +08:00
Yan, Zheng
89648e7ed5 client: convert Inode::snapdir_parent to smart pointer
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 16:12:18 +08:00
Yan, Zheng
e7920c93f2 client: convert CapSnap::in to smart pointer
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 16:12:18 +08:00
Yan, Zheng
dac11e6b4b client: convert Fh::inode to smart pointer
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 16:12:16 +08:00
Yan, Zheng
fd02f0f245 client: use smart pointers in MetaRequest
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 16:02:41 +08:00
Yan, Zheng
07f5809773 client: convert Dentry::inode to smart pointer
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 15:42:34 +08:00
Yan, Zheng
ad9c22a4ca client: hold reference for returned inode
CLient::make_request() returns pointer of target inode, but it does not
increase reference count of the returned inode. The inode may get freed
when CLient::make_request() releases MetaRequest.

he fix is hold a reference for the returned inode. Since there are many
of places use CLient::make_request() directly or indirectly, it's easy
to leak reference. This patch uses intrusive_ptr to track the reference.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-03 15:42:33 +08:00
Sage Weil
4d10dc134b systemd: fix ceph-radosgw@ service
There's no prestart.  Fix the instance name.  Cleanup.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
Sage Weil
8a67561220 ceph.spec: install the new systemd-based udev rules from ddiss
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
Owen Synge
3d6100eb64 ceph.spec.in:Fixup renamed ceph-rgw.conf
This is a simple renaming bug.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:34 -04:00
Owen Synge
e3e9548bba ceph.spec.in:fixup bad merge of systemd logic 2015-08-01 09:58:34 -04:00
Sage Weil
69cdfcb15f remove ceph-disk-{activate,prepare} wrappers
These ancient aliases shouldn't be used.  We should have removed them
immediately way back when, honestly.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
Sage Weil
e034c2af43 ceph.spec: ship ceph-disk-* units
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
David Disseldorp
85a894697e systemd: activate disks via systemd service instead of udev
The udev(7) man page states:
  RUN
  ...
  This can only be used for very short-running foreground tasks. Running
  an event process for a long period of time may block all further
  events for this or a dependent device.

  Starting daemons or other long-running processes is not appropriate
  for udev; the forked processes, detached or not, will be
  unconditionally killed after the event handling has finished.

ceph-disk activate is far from a short-running task:
- check whether path is a block dev, for dirs call through to
  activate_dir()
- call blkid to obtain the filesystem type for the block dev
- pull mount options from hard-coded ceph.conf file
- mount the OSD dev at a temporary path
- check the ceph magic for mounted filesystem
- read cluster uuid and locate corresponding /etc/ceph/{cluster}.conf
  path
- read or generate (if missing) the OSD uuid
- create a file indicating init system usage (systemd)
- mount the device at a second (final) location
- umount (lazy) the temporary mount path
- enable the systemd ceph-osd@{osd_id} service
- start the systemd ceph-osd@{osd_id} service

This logic is therefore best left in a systemd service for execution. As
it is less limited in terms of execution time, and also allows for
improved event handling in future (fsck, dmcrypt mapping etc.).

This change sees 95-ceph-osd.rules.systemd trigger ceph-disk activate or
ceph-disk activate-journal via new ceph-disk-activate-journal@.service,
ceph-disk-activate@.service and ceph-disk-dmcrypt-activate@.service
systemd service files.

ceph-disk-dmcrypt-activate@.service makes use of the newly added
--dmcrypt parameter for ceph-disk activate.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-08-01 09:58:34 -04:00