Commit Graph

32590 Commits

Author SHA1 Message Date
Ilya Dryomov
9d31c1be1f osd: add flush_journal admin socket command
Add flush_journal admin socket command to be able to flush journal to
the permanent store for online osds.  (For offline osds we already have
ceph-osd --flush-journal.)

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-03-19 10:59:26 +02:00
Yan, Zheng
b444e88650 mds: fix typo in MDCache::handle_cache_rejoin_strong
It should invent dirfrags according to the dirfragtree

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 16:25:26 +08:00
Loic Dachary
ddbb2f7b0a erasure-code: add gf-complete / jerasure submodules
Instead of copying the files in the ceph repository, which is less
convenient.

When building the headers are ignored, even though they do
not exist. When creating the tarbal with make dist, it fails because
they cannot be found. I misread src/gf_int.h to be include/gf_int.h and
wrongfully thought the submodules were to blame. This is why they were
removed shortly after being added.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-19 08:02:12 +01:00
Loic Dachary
5c34a0f01a erasure-code: remove copy of gf-complete / jerasure
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-19 07:38:41 +01:00
Yan, Zheng
0d167d2cd0 mds: fix NULL pointer dereference in Server::handle_client_rename
Inode's parent dentry can be NULL, which causes segment fault in
Locker::acquire_locks

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 14:30:54 +08:00
Yan, Zheng
272b53b22c mds: avoid infinite loop in MDLog::submit_entry()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 14:26:03 +08:00
Yan, Zheng
002c7e7544 Merge pull request #1496 from ceph/wip-7708
mds/Locker: fix null deref on cap import
2014-03-19 12:25:05 +08:00
Sage Weil
328941383f Merge pull request #1499 from ceph/wip-no-version
Add NO_VERSION to avoid rebuilding ceph_ver.h and relinking

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-18 21:03:01 -07:00
Sage Weil
5dd270e862 Merge pull request #1498 from ceph/wip-limit-libkeyutils
Makefiles: remove libkeyutils from every binary except two

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-18 21:01:13 -07:00
Yan, Zheng
3cadbfbb11 mds: fix potential invalid pointer dereference
pin importing inode until subtree importing finishes

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:57 +08:00
Yan, Zheng
91c88c1ea1 mds: rdlock dirfragtree lock when renaming directory
This make sure inode importer and inode exporter have consistent
view of dirfrags.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
a86716660c mds: don't mark scatter locks dirty when dirfrag is dirty
The journal reply code has check that decides which scatter locks
should be marked as dirty. So don't unconditionally mark scatter
locks dirty when dirfrag is dirty

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
5150fe63d8 mds: trim other MDS' mdsdir during recovery
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
150c6ce454 mds: remove wrong assertion
when handling resolve message, it's possible that bound dirfrags
are missing.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
de461a9266 fragtree_t: fix get_leaves_under()
If fragtree is (*^1) and the caller wants leaves under frag 00*.
get_leaves_under() should return empty list.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
cbd1c44759 mds: improve success rate of subtree exporting
When exporting a subtree, the migrator acquires the required locks,
then freezes the subtree and releases the locks. After subtree is
frozen, it try acquiring the same locks again.

This patch make scatter locks keep in their old states if inode has
exporting dirfrag. It improves the chance that migrator acquires all
required locks when subtree is frozen.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
3c39d6f5e5 mds: cleanup CInode::decode_import()
We have bumped protocol version several times, no need to maintain
compatibility for ancient message.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
4973560ebc mds: export file locks together with inode
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
dc54b7b3d0 mds: re-issue caps after importing caps (rename)
After importing inode, the issued caps can be less than the caps
client wants. So re-issue caps after importing inode.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
b225ca97e8 mds: fix open remote dirfrag deadlock
During subtree migration, the importer may need to open subtree
bound dirfrags. Opening subtree bound dirfrags happens after the
exporter freeze the exporting subtee. So the discover message for
opening subtree bound dirfrags should not wait for any freezing
tree/directory, otherwise deadlock can happen.

In MDCache::handle_discover(), there are two cases can cause
discover messages wait for freezing tree/directory. One case is
fetching bare-bone dirfrags. Another case is, when merging dirfrags,
some of the dirfrags are frozen, some are freezing.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
dc52581df5 mds: properly initialize MDCache::fragment_info_t
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
ed30b83a9a mds: avoid issuing zero caps to client
make sure CEPH_CAP_PIN exists in stale caps.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
e909eaf203 mds: drop auth pins before waiting for dir unfreeze
Otherwise deadlock can happen

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
bc3325b37b mds: fix stack overflow caused by nested dispatch
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:56 +08:00
Yan, Zheng
63a597be31 mds: rollback slave request after slave prepare is journalled
Resolve ack message can abort slave requests that are being journalled.
The slave rollback does not handle this case properly. The fix is mark
slave request aborted in this case. The slave rollback code is executed
after slave prepare is safely journalled.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:35:08 +08:00
Yan, Zheng
a1ff4896e8 mds: treat flushing as dirty when rejoining scattered locks
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-19 11:29:13 +08:00
Dan Mick
1268dbb36e Change tid_t to ceph_tid_t to avoid conflicts with a popular type
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-03-18 19:06:55 -07:00
Dan Mick
b227426838 Add NO_VERSION to avoid rebuilding ceph_ver.h and relinking
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-03-18 19:05:19 -07:00
Dan Mick
cfb04b2a22 Makefiles: remove libkeyutils from every binary except two
Only rbd and mount_ceph need secret.c, and only secret.c needs libkeyutils;
remove it from LIBCOMMON_DEPS so it's not a dependency for everything,
remove secret.c from libcommon.a, and add it to mount.ceph/rbd's sources;
add LIBKEYID_LIB to mount.ceph/rbd's LDADD.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-03-18 19:04:41 -07:00
Loic Dachary
381850b161 Merge pull request #1497 from dachary/wip-jerasure
remove gf-complete / jerasure sub modules

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-19 00:56:36 +01:00
Loic Dachary
e9eb641fc7 remove gf-complete / jerasure sub modules
and add the source files in the tree.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-19 00:28:17 +01:00
Sage Weil
8b77995f00 Merge pull request #1494 from dachary/wip-gitmodule-mirrors
build: add gf-complete/jerasure to gitmodule_mirrors
2014-03-18 15:59:26 -07:00
Samuel Just
fdcf3eb45a ReplicatedPG::do_op: delay if snapdir is unreadable
Since all we really need on a snapdir is the context, we really only
need it to be !missing.  However, it might become !missing before it
becomes !unreadable.  That allows ops to end up in the
waiting_for_degraded queue before one in waiting_for_unreadable is
woken, which allows the ops to be reordered.  Rather than reintroduce an
extra waiting_for_missing queue, simply require !unreadable for snapdir
(which implies !misssing).

Fixes: #7777
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-18 15:47:46 -07:00
João Eduardo Luís
362d370dd8 Merge pull request #1125 from ceph/wip-mon-docs
wip-mon-docs: Better explain required number of monitors & how to troubleshoot a monitor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
2014-03-18 22:26:34 +00:00
Sage Weil
7f7a9988ff mds/Locker: fix null deref on cap import
The session Connection* may be NULL.

Fixes: #7708
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-18 14:54:26 -07:00
Loic Dachary
4221e0dd25 build: add gf-complete/jerasure to gitmodule_mirrors
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-18 22:04:13 +01:00
Sage Weil
25d04fba6f osd: dump priority queue state on dequeue at level 30
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-18 13:44:26 -07:00
Sage Weil
ff11965c92 osd: fix OpWQ dump locking
The pqueue is protected by the wq lock, not by qlock; for example, see
OpWQ::_enqueue.  qlock protects the pg_for_processing map only.

Fixes: #7735
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-18 13:22:34 -07:00
Sage Weil
4a3464cecd common/PrioritizedQueue: include first item's cost in dump
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-18 13:22:34 -07:00
Sage Weil
de576d5b0b common/PrioritizedQueue: constify a few things
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-18 13:16:05 -07:00
Sage Weil
8bd89442ae common/PrioritizedQueue: fix remove_by_class() corner case
If i is the first entry, then setting cur = begin() sets us up to point at
something that we are about to delete.  Move the check to the end to avoid
this.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-18 13:16:05 -07:00
Sage Weil
f1e3bc9a9b doc/dev/cache-pool: describe the tiering agent
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-18 13:09:29 -07:00
Samuel Just
d7284268f9 PG::start_peering_interval: always send_notify if !primary
Otherwise, we might get into a situation where the primary
forgets about a stray pg.  This is simpler and does not
increase the number of notifies by much.

Fixes: #7733
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-18 12:35:03 -07:00
Samuel Just
b4420ffbf8 PG::find_best_info: fix log_tail component
The previous logic should have kept the current best info if it found a
replica which best could log-recover, but p couldn't.  However, the
continue in that loop advanced the inner loop instead of the outer loop
allowing the primary case to take over in cases where best had a longer
tail.  Instead, we will prefer the longer tail regardless of the other
infos to simplify the logic.

Fixes: #7755
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-18 12:09:09 -07:00
Alfredo Deza
06bfdfc9dd Merge pull request #1491 from dachary/wip-submodules
erasure-code: jerasure and gf-complete moved to ceph namespace

Reviewed-by:  Alfredo Deza <alfredo.deza@inktank.com>
2014-03-18 14:07:09 -04:00
Loic Dachary
1ddae7e2cc erasure-code: jerasure and gf-complete moved to ceph namespace
for maintenance purposes

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-18 19:00:21 +01:00
Sage Weil
f8632699b1 Merge pull request #1490 from ceph/wip-6806
mon: Properly handle errors from 'cmd_getval()' when needed

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-18 10:49:28 -07:00
Joao Eduardo Luis
01a0f2d3b7 mon: OSDMonitor: don't rely on client-side validation for command arguments
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-18 16:35:59 +00:00
Joao Eduardo Luis
074c880830 mon: Monitor: handle invalid 'quorum' command argument
Don't rely on client side validation of possible command arguments.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-18 16:35:59 +00:00
Joao Eduardo Luis
652056edc0 mon: Properly handle errors from 'cmd_getval()' when needed
Not handling the error return from cmd_getval() may leave uninitialzied
values, which can cause issues, specially with non-string values.

Fixes: 6806

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-18 16:35:59 +00:00