Commit Graph

32823 Commits

Author SHA1 Message Date
Sage Weil
4f9f7f8789 qa/workunits/fs/misc/layout_vxattrs: ceph.file.layout is not listed
As of 08a3d6bd42.  A similar change was made
in the kernel.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-29 14:23:21 -07:00
Sage Weil
74f3827f50 Merge pull request #1548 from ceph/wip-7880
mds: properly propagate dirty dirstat to auth inode

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-29 09:20:07 -07:00
Yan, Zheng
b71e64dd68 mds: find approximal bounds when adjusting subtree auth
When finishing exporting a subtree, the exporter MDS drops locks and
sends MExportDirFinish message to the importer MDS. The bounds of
subtree can get fragmented by third party before the importer MDS
receives the MExportDirFinish message. So the importer MDS can add
inaccurate bounds to the EImportFinish event.

The fix is find approximal bounds when finishing ambiguous imports.
2014-03-29 21:41:28 +08:00
Loic Dachary
fd28ad55a9 doc: erasure-code development complete
remove the note explaining that it is not yet available.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-29 11:25:59 +01:00
Loic Dachary
399de24e29 erasure-code: do not attempt to compile SSE4 on i386
SSE4 are only not availabe on older CPUs. Although the compiler could
probably generate the code, there is no point in doing so. The SSE4.1,
SSE4.2 and PCLMUL cpu features are only tested if the target CPU is
AMD64 or x86_64.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-29 10:34:29 +01:00
Yan, Zheng
07ccc4e7bd mds: commit new dirfrag before splitting it
Commit 6e013cd6 (properly set COMPLETE flag when merging dirfrags)
tries solving the issue that new dirfrag's COMPLETE flag gets lost
if MDS splits the new dirfrag, then the fragment operation gets
rolled back. It records the original dirfrag's COMPLETE flag when
EFragment PREPARE event is encountered. If the fragment operation
needs to rollback, The COMPLETE flag is journaled in corresponding
EFragment ROLLBACK event. This is problematic when the ROLLBACK
event and the "mkdir" event belong to different log segments. After
the log segment that contains the "mkdir" event is trimmed, the
dirfrag can not be considered as complete.

The fix is commit new dirfrag before splitting it. After dirfrag is
committed to object store, losing COMPLETE flag is not a big deal.

Signed-off-by: Yan, Zheng <zheng.z.yan@ntel.com>
2014-03-29 09:25:46 +08:00
Dan Mick
bd6e35c1b1 rbd.cc: yes, cover formatted output as well. sigh.
Fixes: #7577
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-03-28 17:20:14 -07:00
Sage Weil
8f5e92dd11 Merge pull request #1562 from onlyjob/debian
init: fix OSD startup issue

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-28 18:13:05 -07:00
Sage Weil
780fa91ce7 Revert "ceph-conf: do not log"
This reverts commit acc31e75a3.
2014-03-28 18:11:13 -07:00
Sage Weil
b5a632073b Revert "ceph-conf: no admin_socket"
This reverts commit 72715b235a.

This breaks the ceph cli, which uses ceph-conf --show-config-value ... to
get the admin socket.
2014-03-28 18:11:12 -07:00
Dmitry Smirnov
44afc2332e init: fix OSD startup issue
On machines with MON and OSDs (on boot) OSDs started shortly after MON startup
 but MON needs time to become oprational so OSDs fail to start due to short
 timeout because they don't have enough time to establish communication with
 cluster. This is even more likely to happen when there are other monitors down
 which is not unusual when servers are rebooting after power failure.
 Increasing timeout significantly improves chances for successful OSD start.

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2014-03-29 12:06:37 +11:00
Dan Mick
fd76fec589 rbd.cc: tolerate lack of NUL-termination on block_name_prefix
Fixes: #7577
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-28 17:56:35 -07:00
Sage Weil
fab374b039 Merge pull request #1552 from ceph/wip-7902
osd/PG: fix choose_acting revert to up case

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-28 17:19:23 -07:00
Sage Weil
66c1ef45db Merge pull request #1560 from ceph/wip-7903
Wip 7903

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-28 16:59:02 -07:00
Sage Weil
056151a633 mon/MonClient: use keepalive2 to verify the mon session is live
Verify that the mon is responding by checking the keepalive2 reply
timestamp.  We cannot rely solely on TCP timing out and returning an
error.

Fixes: #7888
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-28 16:09:26 -07:00
Sage Weil
d747d79fd5 msgr: add KEEPALIVE2 feature
This is similar to KEEPALIVE, except a timestamp is also exchanged.  It is
sent with the KEEPALIVE, and then returned with the ACK.  The last
received stamp is stored in the Connection so that it can be queried for
liveness.  Since all of the users of keepalive are already regularly
triggering a keepalive, they can check the liveness at the same time.

See #7888.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-28 16:09:26 -07:00
Sage Weil
3a66e291f4 Merge pull request #1558 from ceph/wip-7837
ReplicatedPG: include pending_attrs when reseting attrs in WRITEFULL

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-28 16:01:20 -07:00
Samuel Just
1aa1d9380b ReplicatedPG: hit_set_setup, agent_setup, skip if !active
We call these in on_activate and on_pool_change.  In the former, we are
necessarily active.  In the latter, we only want to do anything if we are
active (otherwise, it will be taken care of when we eventually do become
active).

Fixes: #7904
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-28 15:57:43 -07:00
Josh Durgin
1af95e7b02 Merge pull request #1557 from ceph/wip-7867
client: fix assert(!unclean) due to readahead vs close race

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-03-28 15:08:07 -07:00
Sage Weil
f1c7b4ef0c client: pin Inode during readahead
Make sure the Inode does not go away while a readahead is in progress.  In
particular:

 - read_async
   - start a readahead
   - get actual read from cache, return
 - close/release
   - call ObjectCacher::release_set() and get unclean > 0, assert

Fixes: #7867
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-28 14:55:13 -07:00
Sage Weil
032d4ec53e osdc/ObjectCacher: call read completion even when no target buffer
If we do no assemble a target bl, we still want to return a valid return
code with the number of bytes read-ahead so that the C_RetryRead completion
will see this as a finish and call the caller's provided Context.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-28 14:55:09 -07:00
Sage Weil
c166215d81 Merge pull request #1553 from ceph/wip-7874
ReplicatedPG: disable clone subsets for cache pools

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-28 14:07:50 -07:00
Sage Weil
3c18fad4de Merge pull request #1554 from ceph/wip-7828
ReplicatedPG:: s/_delete_head/_delete_oid, adjust head_exists iff is_hea...

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-28 14:06:24 -07:00
Sage Weil
decbe2c0a8 Merge pull request #1555 from ceph/wip-7835
ReplicatedPG::make_writeable: fill in ssc on clone

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-28 14:05:41 -07:00
Yehuda Sadeh
68dc0c6b87 rgw: move max_chunk_size initialization
RGWRados::initialize() is not called when doing
RGWRados::get_raw_storage_provider(). This was the culprit for issue

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-03-28 14:05:00 -07:00
Samuel Just
a6be1d6713 PG: always clear agent_state in clear_primary_state
We aren't actually active between activate() and all_activated_committed().
We'd have to suspend agent_work during that period which seems like too much
complexity for too little work saved.

Fixes: #7904
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-28 13:27:03 -07:00
Yehuda Sadeh
dfd3cb5140 rgw: only look at prefetched data if we actually prefetched
Fixes: #7903
Since we didn't prefetch data then we couldn't rely on the data to
actually exist there. In that case just move on and read the object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-03-28 13:25:47 -07:00
Sage Weil
d78e678855 osd/PG: fix choose_acting revert to up case
If we decide to revert back to up, we need to

1- return false, so that we go into the NeedActingChange state, and
2- actually ask for that change.

It's too fugly to try to jump down to the existing queue_want_pg_temp
call 100+ lines down in this function, so just do it here.  We already
know that we are requesting to clear the pg_temp.

Fixes: #7902
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-28 13:10:06 -07:00
Yan, Zheng
0bb911c6a8 mds: don't trim non-auth root inode/dirfrag
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:14 +08:00
Yan, Zheng
90b4e53c19 mds: include authority of the overwrited inode in rename witnesses
Rename operation needs to adjust the overwrited inode's link count.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:14 +08:00
Yan, Zheng
367987faff mds: don't increase nlink when rollback stray reintegration
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:14 +08:00
Yan, Zheng
79aa26ffba mds: allow sending MMDSFindIno to MDS who is in clientreplay state
Because MDCache::kick_find_ino_peers() is called when a MDS enters
clientreplay state.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:14 +08:00
Yan, Zheng
34ef91a279 mds: fix negative dirstat assertion
When splitting dirfrag, delta dirstat is always added to the first new
dirfrag. Before the delta dirstat is propagated to inode, unlinking file
from the rest dirfrags can cause nagtive inode dirstat.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:14 +08:00
Yan, Zheng
ce93616169 mds: fix stack overflow caused by nested dispatch
Commit bc3325b37 fixes a stack overflow bug happens when replaying
client requests. Similar stack overflow can happens when processing
finished contexts.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:14 +08:00
Yan, Zheng
71fa779e08 mds: don't clear scatter dirty when cache rejoin ack is received
The auth mds has received dirty scatterlock state. But it hasn't
journaled the dirty state yet. The log segment that marked the
scatterlock dirty need to be preserved. Therefore, we can't clear
the dirty flag of scatterlock.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:14 +08:00
Yan, Zheng
fbf4fbc37a mds: explicitly set nonce for imported dirfrag
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
d14ec95e8a mds: skip non-opened session when flushing client sessions
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
fb19100f44 mds: fix null pointer dereference in MDCache::rejoin_send_rejoins()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
ed49d5ef90 mds: journal EFragment::OP_COMMIT before drop locks
Dropping locks can dispatch other requests. These request can submit
log entry.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
1bd575e223 mds: fix CInode::get_approx_dirfrag
return NULL if there is no opened dirfrag

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
a1f5c645bb mds: don't trim ambiguous import dirfrags
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
598c5f18b2 mds: trim empty non-auth dirfrags
Fragmenting a non-auth dirfrag results several smaller dirfrags. Some
of the resulting dirfrags can be empty, which are not used to connected
to auth subtree.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
3c6c712414 mds: trim non-auth inode with remote parents
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
e811b07e19 mds: properly journal fragment rollback
If dirfrags are subtree roots, mark the dirfragtreelock as scattered
dirty, otherwise journal the dirfragtree change.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
6a548a97f8 mds: fix CDir::WAIT_ANY_MASK
make sure CDir::WAIT_ANY_MASK include MDSCacheObject::WAIT_UNFREEZE

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
e535f7f2b9 mds: avoid journaling non-auth opened inode
Exporting inode has AUTH bit set while EExport event is being
journaled.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
ffcbcdd61f mds: handle race between cache rejoin and fragmenting
MDCache::handle_cache_expire() ignores mismatched dirfrags. this is
OK during normal operation because MDS doesn't trim replica inode
whose dirfrags are likely being fragmented (see commit 22535340).

During recovery, the recovering MDS can reveive survivor MDS' cache
expire message before it sends cache rejoin acks. In this case,
there still can be mismatched dirfrags, but nothing prevents the
survivor MDS to trim inode of these mismatched dirfrags. So there
can be unconnected dirfrags when the recovering MDS sends cache
rejoin acks.

The fix is, when mismatched dirfrag is encountered during recovery,
check if inode of the dirfrag is still replicated to the sender MDS.
If the inode is not replicated, remove the sender MDS from replica
maps of all child dirfrags.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Yan, Zheng
6963a8f9cb mds: handle interaction between slave rollback and fragmenting
For slave rename and rmdir events, the MDS needs to preserve non-auth
dirfrag where the renamed inode originally lives in until slave commit
event is encountered. Current method to handle this is use MDCache::
uncommitted_slave_rename_olddir to track any non-auth dirfrag that
need to be preserved. This method does not works well if any preserved
dirfrag gets fragmented by log event (such as ESubtreeMap) between the
slave prepare event and the slave commit event.

The fix is tracking inode of dirfrag instead of tracking dirfrag that
need to preserved directly.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-29 02:08:13 +08:00
Sage Weil
0dcb54f71e Merge pull request #1549 from dachary/wip-doc
doc: fix typos in tiering dev doc
2014-03-28 08:23:46 -07:00
Loic Dachary
72eaa5e885 doc: fix typos in tiering dev doc
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-28 14:02:25 +01:00