Commit Graph

36713 Commits

Author SHA1 Message Date
Adam Crume
d98b75530b librados: Fix function prototypes in librados.h
Fixes: 9716
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-10 14:08:32 -07:00
Samuel Just
d458b4f0f3 PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.rend()
Fixes: #9731
Backport: giant, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-10 13:55:42 -07:00
Adam Crume
022bace0a9 rados: Add tests for CLI strict parsing
Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-10 13:33:39 -07:00
Samuel Just
bd61ee001b Merge pull request #2684 from ceph/wip-9696
PG::choose_acting: in mixed cluster case, acting may include backfill

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-10 10:32:15 -07:00
Adam Crume
26fe1801d4 test: Fix rmpool in test_rados_tool.sh
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-10 10:25:02 -07:00
Sage Weil
3e0e04ef95 Merge pull request #2675 from ceph/wip-coverity-20141003
Fix issues from SCA and Coverity

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-10 09:13:02 -07:00
Gregory Farnum
75fc54bf9e Merge pull request #2693 from ceph/giant-unused-variable
Giant unused variable
2014-10-10 06:59:22 -07:00
Yan, Zheng
459b2d245e mds: Locker: remove unused variable
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 21:57:53 +08:00
Yan, Zheng
6a2303a6b6 client: add helper function that updates lock state
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 21:12:17 +08:00
Yan, Zheng
b17b43a866 fuse: enable fuse_multithreaded by default
GETFILELOCK MDS request may block for a long time, so we need to
use multithread event loop,

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 21:12:17 +08:00
Yan, Zheng
a1b2c8ff95 client: posix file lock support
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 21:12:15 +08:00
Yan, Zheng
e075c27c35 common: link mds/flock.o to libcommon
later commit will use this code to track file locks held by cephfs
client.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 21:08:53 +08:00
Loic Dachary
740db2043c Merge pull request #2685 from hejiantao5/patch-1
Check the pointer before deleting

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 14:56:27 +02:00
Loic Dachary
5c38bcbe53 Merge pull request #2688 from leseb/fix-warning-message-img-format
Fix error message when stripping with format 1

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 14:50:35 +02:00
Wyllys Ingersoll
89ebcaa368 Fixed JSON output for stray OSDs 2014-10-10 08:27:56 -04:00
Sébastien Han
a8d597fca1 Fix error message when stripping with format 1
Since the option '--format' for specifying the rbd image format is
deprecated, we should recommend '--image-format' instead.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-10-10 14:14:22 +02:00
hejiantao5
66afcd946c Check pointer before deleting
Here I think should check the pointer, to avoid potential risk

Signed-off-by: Jiantao He <hejiantao5@gmail.com>
2014-10-10 19:34:06 +08:00
Danny Al-Gaaf
2c7c03c56c ceph_erasure_code_benchmark: fix parameter handling
Make sure k and m paramter are valid to prevent crash. Fix typo.

Fix for the following CID and other possible invalid combinations
of k/m parameter:

CID 1219466 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
 divide_by_zero: In expression rand() % (k + m), modulo by expression
 k + m which may be zero has undefined behavior.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-10 11:08:00 +02:00
John Spray
b2b285938e Merge pull request #2686 from dachary/wip-client-dout
client: add missing dendl and s/dout/ldout/

Reviewed-by: John Spray <john.spray@redhat.com>
2014-10-10 10:05:44 +01:00
Loic Dachary
8021581850 client: add missing dendl and s/dout/ldout/
Introduced in ce4436c9d4

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 10:46:24 +02:00
Loic Dachary
98cb9a0cc9 Merge pull request #2671 from ceph/wip-da-fix-make_check
Makefile.am: make sure everything was build before make check

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 07:57:19 +02:00
Loic Dachary
800b9314ad Merge pull request #2669 from ceph/wip-9692
qa/workunits/fs/misc: fix syntax error

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 07:54:22 +02:00
Yan, Zheng
33d2c735ef Merge pull request #2679 from ceph/giant-locker-null
mds: Locker: fix a NULL deref in _update_cap_fields
2014-10-10 09:37:28 +08:00
Yan, Zheng
d12f704bb1 Merge pull request #2676 from ceph/wip-print-mode
client: print out mode, uid, gid if they are changed
2014-10-10 09:36:59 +08:00
Yan, Zheng
fa539b9c3f qa/workunits/fs/misc: fix syntax error
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 09:30:29 +08:00
Yan, Zheng
78be62f739 Merge pull request #2677 from ceph/wip-mds-coverity
Wip mds coverity
2014-10-10 09:16:58 +08:00
Samuel Just
9b18d99817 PG::choose_acting: in mixed cluster case, acting may include backfill
Fixes: 9696
Backport: firefly, giant
Introduced: 92cfd37039
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-09 16:21:25 -07:00
Yehuda Sadeh
3dd4ccad7f rgw: set length for keystone token validation request
Fixes: #7796
Backport: giany, firefly
Need to set content length to this request, as the server might not
handle a chunked request (even though we don't send anything).

Tested-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-10-09 15:51:55 -07:00
Greg Farnum
3cd8a7fb96 mds: Locker: fix a NULL deref in _update_cap_fields
The MClientCaps* is allowed to be NULL, so we can't deref it unless
the dirty param is non-zero. So don't do the ahead-of-time lookup;
just call it explicitly in the if block.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-10-09 15:12:19 -07:00
Adam Crume
3b9dcff775 rados: Parse command-line arguments strictly
Many integers were parsed with functions that silently ignored junk at
the end of the string.  Extra characters now cause errors.

Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-09 14:04:34 -07:00
Greg Farnum
aa138eb869 mds: MDirUpdate: initialize discover count to 0 if we're not discovering
Otherwise it's left uninitialized and could do who-knows-what!

CID 1244229:  Uninitialized scalar field  (UNINIT_CTOR)
/messages/MDirUpdate.h: 55 in MDirUpdate::MDirUpdate(mds_rank_t, dirfrag_t,
int, std::set<int, std::less<int>, std::allocator<int>> &, filepath &, bool)()

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-10-09 10:43:21 -07:00
Greg Farnum
2a9ed93e26 mds: MDSAuthCaps: init "read" param in default constructor
CID 1244228:  Uninitialized scalar field  (UNINIT_CTOR)
/mds/MDSAuthCaps.h: 29 in MDSCapSpec::MDSCapSpec()()

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-10-09 10:42:58 -07:00
Greg Farnum
ce4436c9d4 client: print out mode, uid, gid if they are changed
These values can be printed by MClientRequest message output, but if
they're flushed out via cap updates we don't even get that. These
are important values that generally don't change often; so print
them out in debug logging.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-10-09 09:47:29 -07:00
Danny Al-Gaaf
7cb2840e00 test_rgw_admin_log.cc: refactor to use calloc()
Refactor code to use calloc() instead of malloc() to make
sure the char* TEST_BUCKET_OBJECT_SIZE memory is set to
zero before call put_bucket_obj().

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-09 17:14:37 +02:00
Danny Al-Gaaf
c43c85fd79 test_rgw_admin_log.cc: fix use-after-free
Fix for:

CID 1054876 (#1 of 1): Use after free (USE_AFTER_FREE)
 pass_freed_arg: Passing freed pointer bucket_obj as an
 argument to put_bucket_obj

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-09 15:55:30 +02:00
Danny Al-Gaaf
c60a17075d test/librados/c_write_operations.cc: free ressources
Release completion as soon as no longer needed.

Fix for:

CID 1219593 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable completion going out of scope
 leaks the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-09 15:31:52 +02:00
Loic Dachary
158381e95d Merge pull request #2511 from dachary/wip-catch-options-errors
test,tools: catch option parsing exceptions

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>
2014-10-09 09:41:38 +02:00
Jianpeng Ma
86ebaf6a79 os/FileStore: Because do_fiemap will do fsync, so don't do fsync()
before calling do_fiemap.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-10-09 15:16:33 +08:00
Loic Dachary
b39cb68095 Merge pull request #2629 from dachary/wip-heap-profiler
perfglue: minors heap profiler updates and documentation

Reviewed-by: Jianpeng Ma <majianpeng@gmail.com>
2014-10-09 08:17:12 +02:00
Danny Al-Gaaf
042c5362bb rados_list_parallel.cc: cleanup before return from run()
Fix for another case of:

CID 717112 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable io_ctx going out of scope leaks
 the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Danny Al-Gaaf
3bba7ce800 test/librbd/fsx.c: fix potential unterminated string handling
In case of strncpy() make sure string is '\0' terminated. Before
usage of strcat() check if the destination has enough free space
to concat the char and to terminate the string to prevent illegal
memory access.

Fix for:

CID 1219459 (2 of 2): Buffer not null terminated (BUFFER_SIZE_WARNING)
 buffer_size_warning: Calling strncpy with a maximum size argument of
 1024 bytes on destination array goodfile of size 1024 bytes might
 leave the destination string unterminated.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Danny Al-Gaaf
b414b1dc87 ErasureCodeIsa.cc: reduce scope of variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Danny Al-Gaaf
557ca80ff2 SyntheticClient.cc: reduce scope of variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Danny Al-Gaaf
43c0d37b5c mds/flock.cc: reduce scope of some variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Danny Al-Gaaf
d75856bec7 osd/ReplicatedBackend.cc: prefer ++operator for non-primitive iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Danny Al-Gaaf
72e708c24a osd/OSDMap.cc: prefer ++operator for non-primitive iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Danny Al-Gaaf
46692332db mount.ceph.c: ensure '\0' terminated string
Reserve last char in array for '\0' to ensure termination
of the string.

Fix for:

CID 1128383 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
 buffer_size_warning: Calling strncpy with a maximum size argument
 of 1000 bytes on destination array secret of size 1000 bytes might
 leave the destination string unterminated.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 22:56:22 +02:00
Sage Weil
0bbd879841 Merge pull request #2586 from ceph/wip-mon-status
mon: make health portion of ceph -s readable (multiple lines)

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-10-08 12:39:01 -07:00
Loic Dachary
a389ffa4e3 Merge pull request #2673 from dachary/wip-ceph-erasure-code-corpus
build: add ceph-erasure-code-corpus to gitmodule_mirrors

Reviewed-by: Sandon Van Ness <sandon@inktank.com>
2014-10-08 21:26:11 +02:00
Loic Dachary
865a0dc684 build: add ceph-erasure-code-corpus to gitmodule_mirrors
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-08 21:22:02 +02:00