Commit Graph

36306 Commits

Author SHA1 Message Date
Danny Al-Gaaf
13b8c92a29 os/GenericObjectMap.cc: pass big parameter by reference
CID 1188142 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter header of type
 GenericObjectMap::_Header (size 176 bytes) by value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:32:06 +02:00
Danny Al-Gaaf
45e0b33de2 common/buffer.cc: catch exception by reference
CID 1135926 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Catching an exception object of size 264 bytes by value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:32:03 +02:00
Danny Al-Gaaf
7e829509fe test/kv_store_bench.cc: fix coverity REVERSE_INULL
CID 1021214 (#1 of 1): Dereference before null check (REVERSE_INULL)
 check_after_deref: Null-checking cb_args suggests that it may be
 null, but it has already been dereferenced on all paths leading to
 the check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:32:00 +02:00
Danny Al-Gaaf
48389d0714 test/libradosstriper/striping.cc: remove dead initialization
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:31:57 +02:00
Danny Al-Gaaf
ff6148324a mds/Beacon.*: fix UNINIT_CTOR cases
CID 1238905 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member want_state is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member last_send is not initialized
  in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:31:53 +02:00
Danny Al-Gaaf
ea02dc37dc ErasureCodeLrc.h: fix UNINIT_CTOR
Fix Coverity issue, preinit with 0:

uninit_member: Non-static class member chunk_count is not initialized
 in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:27:14 +02:00
Danny Al-Gaaf
2bb35bba99 ErasureCodeLrc.h: fix data_chunk_count UNINIT_CTOR
CID 1238903 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member data_chunk_count is not
 initialized in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:27:11 +02:00
Danny Al-Gaaf
2c2b413ee0 LogEntry.h: init LogEntry::seq with 0
CID 1238904 (#1 of 1): Uninitialized scalar variable (UNINIT)
 uninit_use_in_call: Using uninitialized value e.seq when calling
 log_to_syslog.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:27:08 +02:00
Danny Al-Gaaf
af039ce8e0 test/librados/aio.cc: close resource leak
Release my_completion4.

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-09-19 18:26:29 +02:00
John Spray
6cbf95b61e Merge pull request #2533 from dachary/wip-9538-format-plain
mon: osd find / metadata --format plain fallback

Reviewed-by: John Spray <john.spray@redhat.com>
2014-09-19 16:59:01 +01:00
Loic Dachary
5cb994d776 Merge pull request #2536 from dachary/wip-doc-reweight
documentation: explain ceph osd reweight vs crush weight

Reviewed-by: Laurent Guerby <laurent@guerby.net>
2014-09-19 17:30:02 +02:00
Loic Dachary
639c9818fe documentation: explain ceph osd reweight vs crush weight
Using the wording from Gregory Farnum at
http://lists.ceph.com/pipermail/ceph-users-ceph.com/2014-June/040961.html

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 17:19:41 +02:00
Loic Dachary
f51e368f98 erasure-code: fix assert overflow
If the file size does not fit in 32 bits the (unsigned) cast will
overflow. Cast to uint64_t which is the type of the value returned by
get_total_chunk_size.

http://tracker.ceph.com/issues/9537 Fixes: #9537

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 16:16:44 +02:00
Loic Dachary
13780d7551 mon: osd find / metadata --format plain fallback
ceph --format plain osd find 1 (and metadata) are not implemented and
must fallback to the default (json-pretty).

http://tracker.ceph.com/issues/9538 Fixes: #9538

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 15:31:33 +02:00
Loic Dachary
0fb0967e95 documentation: tiering typo
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 15:05:27 +02:00
Loic Dachary
c8885aecea Merge pull request #2505 from dachary/wip-8914-unlink-fdcache
os: FileStore::lfn_unlink always clears FDCache

Reviewed-by: Sage Weil <sage@redhat.com>
2014-09-19 13:43:09 +02:00
Loic Dachary
7ac60d8caf tests: check osd health in cephtool/test.sh
Add a trivial osd health test at the beginning of each group of
tests. When facing an intermittent failure, it is difficult to diagnose
if the cluster appears to be missing an OSD but there is no indication
as to when the OSDs were last up.

The tests are now only run after all OSDs are up.

These checks can be disabled with --no-sanity-check to allow running
some tests that have less requirements than running all the tests.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 13:23:44 +02:00
Loic Dachary
4d75c4c36d tests: qa/workunits/cephtool/test.sh ! and -e
From the bash man page:

   set -e exit immediately ... The shell does not exit ... if the
   command's return value is being inverted with !

Add an explicit exit 1 where appropriate.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 13:09:18 +02:00
Loic Dachary
be97b7d5b8 documentation: fix bugous osd stop/start example
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 10:29:20 +02:00
Greg Farnum
3f23709c47 Objecter: disable fast dispatch of CEPH_MSG_OSD_OPREPLY messages
If they fast_dispatch they can deadlock right now. We'll need to change
the semantics around mark_down() or around the Objecter's locking to
fix it.

Sort-of-
Fixes: #9462

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-09-18 21:13:28 -07:00
Greg Farnum
681a75488c Pipe: stop delayed delivery fast_dispatch in stop_and_wait()
If we don't, we can keep fast_dispatching messages after a Pipe has been
mark_down()ed. That breaks things right now.

Fixes: #9295

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-09-18 21:13:28 -07:00
Sage Weil
fb5a244915 osd/Watch: handle con without sessions
Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-09-18 21:13:28 -07:00
Sage Weil
93dccdb3ff osd/ReplicatedPG: handle sessionless op con in do_osd_op_effects
Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-09-18 21:13:27 -07:00
Sage Weil
5d37850cf7 osd: drop dead shutdown message handler
There is no code anywhere in the code base that generates a MSG_SHUTDOWN.
Kill this.  The get_priv() logic here looks pretty dodgey anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-09-18 21:13:27 -07:00
Adam Crume
bb45621cb1 common: Add cctid meta variable
Fixes: #6228
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-09-18 16:57:27 -07:00
Gregory Farnum
9442336f92 Merge pull request #2514 from ceph/wip-acl-test
qa/workunits/fs/misc: Add a workunit for ACL

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-09-18 15:01:15 -07:00
Sage Weil
c421b55e8e mon: re-bootstrap if we get probed by a mon that is way ahead
During bootstrap we verify that our paxos commits overlap with the other
mons we will form a quorum with.  If they do not, we do a sync.

However, it is possible we pass those checks, then fail to join a quorum
before the quorum moves ahead in time such that we no longer overlap.
Currently nothing kicks up back into a probing state to discover we need
to sync... we will just keep trying to call or join an election instead.

Fix this by jumping back to bootstrap if we get a probe that is ahead of
us.  Only do this from non probe or sync states as these will be common;
it is only the active and electing states that matter (and probably just
electing!).

Fixes: #9301
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
2014-09-18 14:23:36 -07:00
Sage Weil
d81cd7f866 mon/Paxos: fix off-by-one in last_ vs first_committed check
peon last_committed + 1 == leader first_committed is okay.  Note that the
other check (where I clean up whitespace) gets this correct.

Fixes: #9301 (partly)
Signed-off-by: Sage Weil <sage@redhat.com>
2014-09-18 14:11:24 -07:00
Adam Crume
9132ca4795 rbd-fuse: Fix memory leak in enumerate_images
Fixes: #5768
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-09-18 14:03:26 -07:00
Adam Crume
9a1ab95176 rbd: Fix rbd diff for non-existent objects
Fixes: #6926
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-09-18 13:03:49 -07:00
Sage Weil
0519225beb Merge pull request #2521 from athanatos/wip-9453
osd_types: fix pg_log_t tail dump

Reviewed-by: Sage Weil <sage@redhat.com>
2014-09-18 12:55:49 -07:00
Sage Weil
b4eb0e8f8b Merge pull request #2519 from athanatos/wip-9482
PG::find_best_info: let history.last_epoch_started provide a lower bound

Reviewed-by: Sage Weil <sage@redhat.com>
2014-09-18 12:55:09 -07:00
Sage Weil
9b8bbc046f Merge pull request #2520 from athanatos/wip-9497
PG::choose_acting: let the pg go down if acting is smaller than min_size

Reviewed-by: Sage Weil <sage@redhat.com>
2014-09-18 11:42:06 -07:00
Sage Weil
e7a099b243 Merge pull request #2518 from athanatos/wip-9481
PGLog::claim_log_and_clear_rollback_info: fix rollback_info_trimmed_to

Reviewed-by: Sage Weil <sage@redhat.com>
2014-09-18 11:02:04 -07:00
Sage Weil
336d905e2c Merge pull request #2522 from athanatos/wip-8315
ReplicatedPG: cancel cb on blacklisted watcher

Reviewed-by: Sage Weil <sage@redhat.com>
2014-09-18 11:00:45 -07:00
John Spray
d6913ae4fc mds: fix not journaling client metadata
Previously the code was there for storing in
the SessionMap table, but not for the ESession
logevent.

Fixes: #9518

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 1395275e0f)
2014-09-18 10:52:20 -07:00
Samuel Just
5c8143e3d5 Merge pull request #2457 from ceph/wip-7767-b
msg: prefetch data when doing recv()

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktnak.com>
2014-09-18 09:28:05 -07:00
Samuel Just
a8e6de307f Merge pull request #2440 from somnathr/wip-optracker-optimization
Wip optracker optimization

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-09-18 09:26:40 -07:00
Samuel Just
95768963f2 Merge pull request #2445 from wonzhq/req-pending
Cache tiering: do not allow flush/evict when there are requests pending

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-09-18 09:25:18 -07:00
John Spray
ab545ad0f9 Merge pull request #2515 from ceph/wip-9518
mds: fix not journaling client metadata

Reviewed-by: Yan, Zheng <ukernel@gmail.com>
2014-09-18 13:53:45 +01:00
John Spray
1395275e0f mds: fix not journaling client metadata
Previously the code was there for storing in
the SessionMap table, but not for the ESession
logevent.

Fixes: #9518

Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-18 10:29:06 +01:00
Yan, Zheng
346c06c164 client: preserve ordering of readdir result in cache
Preserve ordering of readdir result in a list, so that the result of cached
readdir is consistant with uncached readdir.

As a side effect, this commit also removes the code that removes stale dentries.
This is OK because stale dentries does not have valid lease, they will be
filter out by the shared gen check in Client::_readdir_cache_cb()

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-09-18 15:56:04 +08:00
Yan, Zheng
600af25493 client: introduce a new flag indicating if dentries in directory are sorted
When creating a file, Client::insert_dentry_inode() set the dentry's offset
based on directory's max offset. The offset does not reflect the real
postion of the dentry in directory. Later readdir reply from real postion
of the dentry in directory. Later readdir reply from MDS may change the
dentry's position/offset. This inconsistency can cause missing/duplicate
entries in readdir result if readdir is partly satisfied by dcache_readdir().

The fix is introduce a new flag indicating if dentries in directory are
sorted. We use _readdir_cache_cb() to handle readdir only when the flag is
set, clear the flag after creating/deleting/renaming file.

Fixes: #9178
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-09-18 15:55:58 +08:00
Yan, Zheng
59c89760c7 qa/workunits/fs/misc: Add a workunit for ACL
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-09-18 14:20:59 +08:00
Yan, Zheng
051cc7d525 Merge pull request #2503 from ceph/wip-xattr-fix
Wip xattr fix
2014-09-18 10:55:43 +08:00
Yan, Zheng
2bd7ceeff5 client: trim unused inodes before reconnecting to recovering MDS
So the recovering MDS does not need to fetch these ununsed inodes during
cache rejoin. This may reduce MDS recovery time.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-09-18 09:53:18 +08:00
Josh Durgin
829981792a Merge remote-tracking branch 'origin/giant' 2014-09-17 12:23:17 -07:00
John Spray
cef34f4299 Merge pull request #2498 from ceph/wip-objecter-cancel
osdc/Objecter: cancel timeout before clearing op->session

Reviewed-by: John Spray <john.spray@redhat.com>
2014-09-17 19:07:22 +01:00
Gregory Farnum
f27ccd805e Merge pull request #2513 from ceph/wip-decode-dump
msg: dump messages we can' decode at a low devel level

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-09-17 10:15:03 -07:00
Sage Weil
4089684259 msg: hexdump bad messages at debug level 1 (not 30)
These are rare, and when they do happen, we want to see them in the
logs.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-09-17 09:53:36 -07:00