Commit Graph

1133 Commits

Author SHA1 Message Date
Sage Weil
1699bf7b71 common/hobject: eliminate wonky compartors
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-11 10:45:16 -05:00
Sage Weil
8da82431f6 osd: add MOSDBackoff message type
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-10 17:59:50 -05:00
Sage Weil
e7186fb29e common/TrackedOp: cache op description
Only calculate it once.  Invalidate from OSD after a full decode (when it
changes).

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-27 10:30:44 -05:00
Sage Weil
842a336969 messages/MLock: drop unnecessary #include
Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-27 10:30:43 -05:00
John Spray
30cfc81bdc Merge pull request from ukernel/wip-multimds-misc
mds: misc multimds fixes

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-01-09 13:05:51 +00:00
Xianxia Xiao
12160b8a23 src/messages/MMDSSlaveRequest.h : fix typos
Signed-off-by: Xianxia Xiao <xianxia.xiao@kylin-cloud.com>
2016-12-30 02:47:44 +00:00
Sage Weil
22adda23ec Merge pull request from yuyuyu101/wip-fix-async-subop
messages/MOSDSubOp: Make encode_payload can be reentrant

Reviewed-by: Sage Weil <sage@redhat.com>
2016-12-27 09:26:00 -06:00
Sage Weil
2377a1d3cb Merge pull request from hjwsm1989/wip-18266
messages/MOSDPGTrim: add the missed HEAD_VERSION AND COMPAT_VERSION

Reviewed-by: Sage Weil <sage@redhat.com>
2016-12-23 23:17:42 -06:00
Haomai Wang
22e0d6cf85 messages/MOSDSubOp: Make encode_payload can be reentrant
Otherwise, AsyncConnection will use uninitialized feature to encode
message. The caller side will set a old version header but encode with newest
feature since passing feature is ok. It will let receiver side got a old
header version but newest payload decode result.

Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-12-24 11:33:34 +08:00
Adam C. Emerson
750ad8340c common: Unskew clock
In preparation to deglobalizing CephContext, remove the CephContext*
parameter to ceph_clock_now() and ceph::real_clock::now() that carries
a configurable offset.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2016-12-22 13:55:37 -05:00
huangjun
fd68cf1b80 messages/MOSDPGTrim: add the missed HEAD_VERSION and COMPAT_VERSION
Fixes: http://tracker.ceph.com/issues/18266
  Signed-off-by: huangjun <hjwsm1989@gmail.com>
2016-12-16 16:38:17 +08:00
Yan, Zheng
57c001335e mds: don't kill request that has started slave operations
Rollback slave operations is tricky. Make MDcache::request_kill
ignores request that has started slave operations.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-12-08 08:12:59 +08:00
Sage Weil
61fca96c29 assert(0) -> ceph_abort()
Signed-off-by: Sage Weil <sage@redhat.com>
2016-11-21 23:37:31 -05:00
Samuel Just
735af7c6fa osd/: 's/trim_rollback_to/roll_forward_to/g'
trim_rollback_to was a not terrible name before in that all
it ever did is (possibly) trim the stashed version of the
object.  However, now, it's going to encompass, in general,
the roll_forward part of a tpc (which will still be to
delete the stashed object in cases where that is
appropriate).

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:18 -08:00
Sage Weil
f54e6bd78c osd: move pg logs into osd mempool
Signed-off-by: Sage Weil <sage@redhat.com>
2016-11-11 14:59:54 -05:00
John Spray
6b2dc4ac73 Merge pull request from ceph/wip-jlayton-fsync
Fix long stalls when calling ceph_fsync()

Reviewed-by: John Spray <john.spray@redhat.com>
2016-11-11 15:29:15 +01:00
John Spray
c88c395938 Merge pull request from jcsp/wip-mclientcaps
client: remove unneeded layout on MClientCaps

Reviewed-by: Jeff Layton <jlayton@redhat.com>
2016-11-11 12:10:49 +01:00
Jeff Layton
8588768075 client/mds: add flags field to MClientCaps
...and encode/decode it appropriately.

The idea of this field is to be advisory, to allow the MDS to handle
things differently if it so chooses. We deliberately do _not_ offer
any firm policy here.

We start with a flag that tells the MDS when an application may end up
blocking on the result of this cap request.

A new "sync" arg is added to send_cap, and we set the new flag in the
cap request based on its value. For now, the callers all set the sync
boolean to false everywhere to preserve the existing behavior.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-11-09 09:36:06 -05:00
John Spray
fddff2b96c mds, client: make MClientCaps::layout private
...so that it's more obvious where it's being
set,get'ed from.

Signed-off-by: John Spray <john.spray@redhat.com>
2016-11-04 16:47:42 +00:00
Joao Eduardo Luis
34b4ad730b messages: MMonElection: support mon-specific features
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2016-10-29 04:10:22 +01:00
Kefu Chai
70d2d40233 Merge pull request from liewegas/wip-addrvec
msg: add entity_addr_t types; add new entity_addrvec_t type

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-26 01:38:01 +08:00
Kefu Chai
0919de25cb Merge pull request from jcsp/wip-mgr-assert
messages: fix out of range assertion

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-25 16:02:33 +08:00
Sage Weil
a433455e59 messages/MForward: reencode forwarded message if target has differing features
This ensures we reencode the payload with the
appropriate set of features if the client, us, or the
target do not have identical features.  Otherwise we
may forward an encoding with more features than the
target can handle.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-24 11:10:17 -05:00
John Spray
ace4abbee5 messages: fix out of range assertion
When clang uses an 8 bit type for the enum, it
complains (out of range) if comparing <256,
and complains (tautological) if comparing <=256.

Avoid this by explicitly making the enum an
uint8_t, and just asserting that that it has
that size at the point that we assume so for
the encoding (in case someone modified the
type definition without checking how it was used).

Signed-off-by: John Spray <john.spray@redhat.com>
2016-10-21 11:38:19 +01:00
Sage Weil
f0cf281900 message/MMonProbe: reencode monmap for non-addr2 clients
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-18 16:40:12 -04:00
Sage Weil
1893315baa message/MMonMap: reencode MonMap for old (non-addr2) clients
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-18 16:40:12 -04:00
Sage Weil
5e51cea658 messages/MMDSMap: reencode MDSMap for old (non-addr2) clients
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-18 16:40:12 -04:00
Sage Weil
e6b78a2070 messages/MOSDMap: reencode if missing MSG_ADDR2 feature
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-18 16:40:11 -04:00
John Spray
150d383272 Merge pull request from jcsp/wip-17466
mds: handle bad standby_for_fscids in fsmap

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-10-10 13:21:07 +02:00
John Spray
f1fb667dfd messages: fix MMDSBeacon constructor
This was leaving garbage in some fields during decode
when decoding messages with an older version.

Fixes: http://tracker.ceph.com/issues/17466
Signed-off-by: John Spray <john.spray@redhat.com>
2016-10-04 11:57:05 +02:00
Gregory Farnum
110238608a Merge pull request from ceph/wip-getuid
Client: pass "UserPerm" struct everywhere for security checks

Reviewed-by: Jeff Layton <jlayton@redhat.com>
2016-10-03 22:30:55 -07:00
John Spray
7845f8d757 mgr: flesh out standby/HA
Signed-off-by: John Spray <john.spray@redhat.com>
2016-09-29 17:26:58 +01:00
John Spray
e3b2225f0b messages: add ceph-mgr messages
Signed-off-by: John Spray <john.spray@redhat.com>
2016-09-29 17:26:53 +01:00
Sage Weil
d4f5e88f36 messages/MForward: fix encoding features
We were encoding the message with the sending client's
features, which makes no sense: we need to encode with
the recipient's features so that it can decode the
message.

The simplest way to fix this is to rip out the bizarre
msg_bl handling code and simply keep a decoded Message
reference, and encode it when we send.

We encode the encapsulated message with the intersection
of the target mon's features and the sending client's
features.  This probably doesn't matter, but it's
conceivable that there is some feature-dependent
behavior in the message encode/decode that is important.

Fixes: http://tracker.ceph.com/issues/17365
Signed-off-by: Sage Weil <sage@redhat.com>
2016-09-28 11:44:28 -04:00
Greg Farnum
7d2a8b7152 Merge remote-tracking branch 'origin/master' into wip-getuid
Conflicts:
	src/client/Client.cc
	src/client/Client.h
	src/client/Makefile.am
	src/client/fuse_ll.cc

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2016-09-23 18:12:33 -07:00
Greg Farnum
d291e664ae MClientRequest: include the full gid list of the caller
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2016-09-21 16:33:56 -07:00
Piotr Dałek
fca6817d7e messages/MOSDFailure.h: distinguish between timeout and immediate failure
Change "is_failed" field to "flags" and use it to distinguish between timeout
and immediate, known OSD failure. Then use that in OSD and MON, and make sure
"min_reporters" don't affect known failures by actually going around failure
heuristic code.

Signed-off-by: Piotr Dałek <git@predictor.org.pl>
2016-09-13 19:57:05 +02:00
Sage Weil
fba798dcad remove autotools
Signed-off-by: Sage Weil <sage@redhat.com>
2016-09-07 11:50:14 -04:00
jtlayton
0358fc095c Merge pull request from ceph/wip-jlayton-statx
First pile of statx patches
2016-09-06 07:04:51 -04:00
Jeff Layton
7c59b9e96a SQUASH: mds/client: add routines to copy to/from ceph_mds_request_head_legacy
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-09-02 08:36:59 -04:00
Jeff Layton
44b102f9e2 SQUASH: mds/client: don't get clever with ceph_mds_request_head_legacy encode/decode
As requested by Greg...

Declare a legacy object on the stack, and do an extra copy to/from it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-09-01 14:36:15 -04:00
Sage Weil
9c92d958d7 messages/MOSDMap: mark as enlighten OSDMap encoder
Back in 70094407c1 we require that anyone
encoding an OSDMap pass in a special feature bit indicating that they are
'enlightened' and understand the rules around encoding OSDMaps (basically,
only mons get to do it).  We forgot to update MOSDMap, which may have to
reencode an OSDMap without some features to talk to a really old client.
We haven't noticed until now because the old set of features we had to do
this for are really old.

We are about to introduce new features (for addr2 encoding) that change
that, and this fix is needed to prevent an assert when doing a reencode.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-08-29 15:15:06 -04:00
Jeff Layton
2bdc8727f6 MDS: allow the MDS to accept requests to set the btime
Unfortunately, the only option here is to rev the MClientRequest
version as the ceph_mds_request_head is not currently versioned. Add a
new ceph_mds_request_head, which contains a new ceph_mds_request_args
structure.

The new ceph_mds_request_head is now versioned via a __le16
at the beginning of it, and then the args structure is expanded to hold
the btime. When we get a legacy ceph_mds_request_head, we just set the
new fields to zero. When encoding a reply to a legacy client, we simply
don't encode the version in the head, or the btime in the setattr union
member.

Reluctantly-Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-08-29 10:33:46 -04:00
Jeff Layton
3148b67bd7 cephfs: rename ceph_mds_request_head and _args with a _legacy postfix
We're going to need to introduce new versions of these structures in
order to expand the setattr union member. Rename the existing ones so
that it's clear that they are for legacy clients and servers.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-08-29 10:33:46 -04:00
Jeff Layton
d3ff304a7a mds/client: keep change_attr in Inode, CapSnap and MClientCaps
...and pass it around appropriately.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-08-29 07:16:40 -04:00
Jeff Layton
b07a707ad0 mds: pass change_attr in InodeStat MClientReply, if feature is present
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-08-29 07:16:39 -04:00
Jeff Layton
d0889aa5fa mds/client: add btime to CapSnap and MClientCaps
Currently we don't have a mechanism to set the btime, but we will need
that eventually. If we want to allow the client to cache that change, we
need to be able to pass it back and forth between client and server.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-08-29 07:16:39 -04:00
Sage Weil
e97e74a493 client: keep btime in Inode and InodeStat
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-08-29 07:16:38 -04:00
Sage Weil
4349879a69 mds: pass btime in InodeStat MClientReply, if feature is present
Signed-off-by: Sage Weil <sage@redhat.com>
2016-08-29 07:16:38 -04:00
Kefu Chai
4e8e68aa48 Merge pull request from ukernel/wip-osx-fuse
build ceph-fuse on OSX

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-07-27 20:19:04 +08:00