Commit Graph

23841 Commits

Author SHA1 Message Date
John Wilkins
522a81e9d3 doc: Added link to <disk> reference. Added minor clarifications.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-02-12 09:53:17 -08:00
David Zafman
bd6d4989c9 ceph-filestore-dump: Improve error message
Fix error message when encountering already in use
OSD store.

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-02-11 22:21:45 -08:00
Greg Farnum
8864c73027 Merge branch 'wip-mds-encode-rebased'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-11 22:02:40 -08:00
Sage Weil
f0b2e32af6 Makefile: name binary ceph-filestore-dump
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-11 20:49:03 -08:00
John Wilkins
29222872c4 doc: Added procedures for using libvirt VMs with Ceph.
fixes: #3432


Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-02-11 19:44:55 -08:00
Josh Durgin
1b7fc30ad3 .gitignore: fix typo and missing vstart.sh output
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-11 18:38:46 -08:00
tamil
2783fce24e work unit for rbd cli tests
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-02-11 18:11:26 -08:00
tamil
7c8d3d053a added new cli tests
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-02-11 17:29:03 -08:00
Sage Weil
3f4d8532ea Merge remote-tracking branch 'gh/next' 2013-02-11 17:12:22 -08:00
Sage Weil
31e911b63d osd: update snap collections for sub_op_modify log records conditionaly
The only remaining caller is sub_op_modify().  If we do have a non-empty
op transaction, we want to do this update, regardless of what we think
last_backfill is (our notion may be not completely in sync with the
primary).  In particular, our last_backfill may be the same object but
a different snapid, but the primary disagrees and is pushing an op
transaction through.

Instead, update the collections if we have a non-empty transaction.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-02-11 13:25:12 -08:00
Sage Weil
715d8717a0 osd: include snaps in pg_log_entry_t::dump()
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-02-11 13:25:01 -08:00
Sage Weil
54b6dd924f osd: unconditionally encode snaps buffer
Previously we would only encode the updated snaps vector for CLONE ops.
This doesn't work for MODIFY ops generated by the snap trimmer, which
may also adjust the clone collections.  It is also possible that other
operations may need to populate this field in the future (e.g.,
LOST_REVERT may, although it currently does not).

Fixes: #4071, and possibly #4051.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-02-11 13:24:48 -08:00
Sage Weil
8b05492ca5 osd: improve debug output on snap collections
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-02-11 13:24:31 -08:00
Yehuda Sadeh
ab89e934e7 Revert "rgw: plain format always appends eol to data"
This commit breaks the swift unit test. The reason is that it
makes it so that returned error status ends with eol, which
is not as expected.

This reverts commit c31aff5f9f.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-02-11 11:30:02 -08:00
Josh Durgin
ab99d8e17a Merge branch 'wip-da-rename-ceph-test' 2013-02-11 11:02:16 -08:00
Joe Buck
133295ed00 libcephfs: fix for #4068
If client->init() fails in mount, then client->shutdown()
should not be called. This patch uses a bool to ensure
that shutdown is only called if init() succeeds.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-11 09:57:36 -08:00
Sage Weil
a39a48c1b1 Merge pull request #47 from dalgaaf/wip-da-sca-cppcheck-clang-2
fix more issues from clang(++) and cppchecker

Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-11 09:43:31 -08:00
Josh Durgin
755b4bb3fe .gitignore: add local ones for ocf and man
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-11 09:08:01 -08:00
Sage Weil
3d5969d680 qa/rbd: +x on map-snapshot-io.sh
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-11 08:48:44 -08:00
Josh Durgin
b26dc4e027 test: fix run-rbd-tests
The python tests were not renamed

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-11 08:04:47 -08:00
Josh Durgin
c52dbd5703 .gitignore: re-add vstart dirs and tags, fix typo
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-11 08:04:01 -08:00
Danny Al-Gaaf
ebe70d7a40 Mutex.cc: fix implicitly-defined namespace 'std'
Fix warning from clang(++):

common/Mutex.cc:14:17: warning: using directive refers to
  implicitly-defined namespace 'std'
using namespace std;
                ^

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 16:47:58 +01:00
Danny Al-Gaaf
c7970bbae1 ceph_authtool.cc: fix implicitly-defined namespace 'std'
Fix warning from clang(++):

ceph_authtool.cc:15:17: warning: using directive refers to
 implicitly-defined namespace 'std'
using namespace std;
                ^
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 16:42:27 +01:00
Danny Al-Gaaf
d6b205f185 librados/librados.cc: fix implicitly-defined namespace 'std'
Fix warning from clang(++):

librados/librados.cc:15:17: warning: using directive refers to
 implicitly-defined namespace 'std'
using namespace std;
                ^
Include what we need and use the related classes.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:03 +01:00
Danny Al-Gaaf
69552ff083 test_mon_workloadgen.cc: fix -Wgnu
Fix warning from clang(++):

 test/mon/test_mon_workloadgen.cc:311:23: warning: in-class
 initializer for static data member of type 'const double' is
 a GNU extension [-Wgnu]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:03 +01:00
Danny Al-Gaaf
1f0fd50490 src/osd/PG.h: use empty() instead of size()
Fix warning for usage of objects.size(). Use empty() since it
should be prefered as it has, following the standard, a constant
time complexity regardless of the containter type. The same is not
guaranteed for size().

warning from cppchecker was:
[osd/PG.h:599]: (performance) Possible inefficient checking for
  'objects' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
76798eabea src/osd/OSD.h: use empty() instead of size()
Fix warning for usage of *.size(). Use empty() since it should be
prefered as it has, following the standard, a constant time
complexity regardless of the containter type. The same is not
guaranteed for size().

warning from cppchecker was:
[osd/OSD.h:265]: (performance) Possible inefficient checking for
   'last_scrub_pg' emptiness.
[osd/OSD.h:274]: (performance) Possible inefficient checking for
   'last_scrub_pg' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
99f217503a src/msg/Messenger.h: pass function parameter by reference
Fix "(performance) Function parameter 'm' should be passed by reference."
from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
72ff806136 src/mon/PGMonitor.cc: remove unused variable
Remove unused variable to fix:

mon/PGMonitor.cc:170:11: warning: unused variable 'now'
  [-Wunused-variable]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
aad71dfd6b src/log/Entry.h: pass function parameter by reference
Fix "(performance) Function parameter 's' should be passed by reference."
from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
698670726a common/WorkQueue.h: use empty() instead of size()
Fix warning for usage of out->size() in _void_dequeue(). Use empty()
since it should be prefered as it has, following the standard, a
constant time complexity regardless of the containter type. The
same is not guaranteed for size().

warning from cppchecker was:
[common/WorkQueue.h:97]: (performance) Possible inefficient
  checking for 'queue' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
3b77687c42 common/AsyncReserver.h: use empty() instead of size()
Fix warning for usage of queue.size() in do_queues(). Use empty()
since it should be prefered as it has, following the standard, a
constant time complexity regardless of the containter type. The
same is not guaranteed for size().

warning from cppchecker was:
[common/AsyncReserver.h:40]: (performance) Possible inefficient
  checking for 'queue' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
d427d9828e src/msg/msg_types.h: pass function parameter by reference
Fix "Function parameter 'm' should be passed by reference." from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:02 +01:00
Danny Al-Gaaf
79c95a651c common/config.h: declaration of config_option as struct
Change declaration of config_option from 'class' to 'struct' since
it's defined as struct and used this way (access members). The declaration
as class doesn't change the behaviour.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-11 11:38:01 +01:00
Sage Weil
778c45cd26 Merge pull request #44 from dachary/wip-4070
buffer::ptr self assignment bug + patch

Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-10 18:08:55 -08:00
Sage Weil
2919574531 Merge remote-tracking branch 'danny/wip-da-sca-memleaks'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-10 18:04:02 -08:00
Danny Al-Gaaf
f213669fc4 .gitignore: cleanup and sort entries
Cleanup old entries and sort the existing entries. Remove no longer
existing entries/files. Move some entries from top level .gitignore
files down to the correct subdir .gitignore file.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 20:52:21 +01:00
Danny Al-Gaaf
125cb7190d ceph-test.install: updated filelist
Add some files which are part of the ceph-test package on RPM based
distributions already: ceph_test_mon_workloadgen, ceph_rgw_jsonparser,
ceph_test_objectcacher_stress.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 19:00:40 +01:00
Danny Al-Gaaf
6cecdd86f7 spec/debian: don't install rest-bench twice
Don't install rest-bench in ceph.spec.in section for ceph-test and
ceph-test.install twice. This file is already part of the rest-bench
package.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 18:56:47 +01:00
Danny Al-Gaaf
7b89ee666b ceph-test: give binaries from ceph-test package useful names
The files from the ceph-test subpackage are installed to /usr/bin,
give them more useful names to make sure that the user know they
belong to ceph. add a 'ceph_' prefix and change some test* binaries
to ceph_test_*.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 18:33:56 +01:00
Loic Dachary
749218f155 buffer::ptr self assignment bug + patch
After

buffer::ptr a(1);
a = a;

a call to a.get_raw() will return a null pointer and there will be
no pointer referencing the original buffer::raw object although its
reference count is 1.

buffer::ptr& buffer::ptr::operator= (const ptr& p) is modified to use
a local buffer::raw pointer to fix the memory leak. a = a
is a noop instead of loosing the original raw buffer.

A set of unit tests is added src/test/bufferlist.cc to demonstrate
that the proposed change works as expected. It is checked with
valgrind that reports no memory leak. The same test can be run against
the original code to show that it leaks.

http://tracker.ceph.com/issues/4070 refs #4070

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-02-10 15:32:35 +01:00
Danny Al-Gaaf
89df090e04 rgw/rgw_rest.cc: fix 4K memory leak
Fix 4K memory leak in case RGWClientIO::read() fails in
read_all_chunked_input().

Error from cppcheck was:
Checking src/rgw/rgw_rest.cc...
[src/rgw/rgw_rest.cc:688]: (error) Memory leak: data

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 10:05:06 +01:00
Danny Al-Gaaf
f0ba80756d SyntheticClient.cc: fix some memory leaks in the error handling
Fix some memory leaks in case of error handling due to failed
client->open() calls.

Error from cppcheck was:
[src/client/SyntheticClient.cc:1980]: (error) Memory leak: buf
[src/client/SyntheticClient.cc:2040]: (error) Memory leak: buf
[src/client/SyntheticClient.cc:2090]: (error) Memory leak: buf
2013-02-10 10:05:06 +01:00
Danny Al-Gaaf
e6591db6dc wireshark: fix some memory leaks
Fix some memory leaks in packet-ceph.c. Error from cppcheck was:

[wireshark/ceph/packet-ceph.c:215]: (error) Memory leak: plop
[wireshark/ceph/packet-ceph.c:237]: (error) Memory leak: plop
[wireshark/ceph/packet-ceph.c:543]: (error) Memory leak: fsid_dec

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 10:05:06 +01:00
Danny Al-Gaaf
d48cc789ea rgw/rgw_xml.cc: fix realloc memory leak in error case
Fix error from cppcheck:

[src/rgw/rgw_xml.cc:212]: (error) Common realloc mistake: 'buf'
  nulled but not freed upon failure

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 10:05:06 +01:00
Danny Al-Gaaf
c92a0f5525 os/FileStore.cc: fix realloc memory leak in error case
Fix error from cppcheck:

[src/os/FileStore.cc:512]: (error) Common realloc mistake: 'fiemap'
  nulled but not freed upon failure

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 10:05:05 +01:00
Danny Al-Gaaf
f26f1470e7 common/fiemap.cc: fix realloc memory leak
Fix error from cppcheck:

[src/common/fiemap.cc:73]: (error) Common realloc mistake: 'fiemap'
  nulled but not freed upon failure

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 10:05:05 +01:00
Sage Weil
4d054e2e29 qa: fix iogen script
Wait 10 minutes and then stop.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 75c40fac60)
2013-02-09 21:00:16 -08:00
Sage Weil
41537d4d9d osd: do not spam system log on successful read_log
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 1948a02bc8)
2013-02-09 20:40:10 -08:00
Sage Weil
abc80ffc5b java: make CephMountTest use user.* xattr names
Changes to the xattr code in Ceph require
a few tweaks to existing test cases.
Specifically, there is now a ceph.file.layout
xattr by default and user defined xattrs
are prepended with "user."

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
2013-02-09 18:58:21 -08:00