Commit Graph

69057 Commits

Author SHA1 Message Date
Sage Weil
1b2b06318c osd: make message check helpers const
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:22:05 -05:00
Sage Weil
6fd447b8b4 osd: add some const to MOSDPGLog handling; document non-constness of log
The PGLog (merge) code stills the pg_log_t entries, but operator<< (called
by the message printer) doesn't look at it.  Document.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:22:05 -05:00
Sage Weil
b01dbd3cb1 os/ObjectStore: make setattrs take const attrset
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:13:04 -05:00
Sage Weil
504edaeac9 msg/Message: add const variant for get_data()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:13:04 -05:00
Sage Weil
45426f7fdc osd: constify a bit
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:13:04 -05:00
Sage Weil
71dc3cfedb common/RefCountedObject: allow refs to const objects
Make nref mutable, and make a const and non-const get() variant.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:13:03 -05:00
Sage Weil
7c991aa438 osd/OpRequest: add get_nonconst_req()
(Soon we'll make get_req() const.)

Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:12:24 -05:00
Sage Weil
72d72da6a2 osd: avoid require_mon_peer stray put()
For the handle_pg_create caller we cannot put the ref; do it in the callers
instead.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:12:23 -05:00
Sage Weil
769ed7baf8 osd/ECBackend: remove no-op set_priority calls
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:12:23 -05:00
Sage Weil
b0faed78e7 messages/MOSDPGPull: make pulls vector private
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 14:12:23 -05:00
Ilya Dryomov
ce9b163d9a Merge pull request #13537 from liewegas/wip-19005
messages/MOSDOp: fix pg_t decoding for version <7 decoding

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2017-02-20 18:36:32 +01:00
Daniel Gryniewicz
acd633c105 Merge pull request #13385 from zhangsw/feature-lifecycle-noncurrent
rgw: add support for noncurrentversion expiration in s3 lifecycle.
2017-02-20 12:29:51 -05:00
Kefu Chai
b3e516fc38 Merge pull request #13518 from tchaikov/wip-fix-pgp-num
test: Thrasher: do not update pools_to_fix_pgp_num if nothing happens

Reviewed-by: Sage Weil <sage@redhat.com>
2017-02-21 00:46:26 +08:00
Yehuda Sadeh
47712977e0 Merge pull request #12223 from cbodley/wip-rgw-meta-sync-yield
rgw: fix for broken yields in RGWMetaSyncShardCR

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-02-20 08:30:11 -08:00
Sage Weil
d6950a413f Merge pull request #13517 from liewegas/wip-kraken-x
qa/suites/upgrade/kraken-x

Reviewed-by: Yuri Weinstein <yweins@redhat.com>
2017-02-20 10:20:26 -06:00
Mingxin Liu
9fe103233e mon/OSDMonitor: fix deviding by zero in OSDUtilizationDumper
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-20 23:38:49 +08:00
Haomai Wang
de90eb6706 Merge pull request #13538 from Adirl/ENOMEM
msg/async/rdma: Print error only on ENOMEM

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-02-20 22:57:21 +08:00
Haomai Wang
281f0775cf Merge pull request #13539 from Adirl/destructor
msg/async/rdma: update destructor message

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-02-20 22:56:32 +08:00
Sage Weil
11797c24dc osd: debug con in ms_handle_connect
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 09:55:47 -05:00
Sarit Zubakov
a8aeda9308 msg/async/rdma: update destructor message
issue:939258

Change-Id: Ib00bb5661a0e80fb258babb63d23458daa8b7025
Signed-off-by: Sarit Zubakov <saritz@mellanox.com>
2017-02-20 16:46:36 +02:00
Sarit Zubakov
d523bedb0e msg/async/rdma: Print error only on ENOMEM
issue: 931114

Change-Id: I1e1710245c2c056bd2b8cccae9d96676a8f49678
Signed-off-by: Sarit Zubakov <saritz@mellanox.com>
2017-02-20 16:43:30 +02:00
Sage Weil
ac9904fd41 messages/MOSDOp: fix pg_t decoding for version <7 decoding
This was broken by f6e219a4df

Fixes: http://tracker.ceph.com/issues/19005
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-20 09:29:11 -05:00
John Spray
41253bbd6c Merge pull request #13065 from ceph/wip-fuse-client-config-edits
doc: minor changes in fuse client config reference

Reviewed-by: John Spray <john.spray@redhat.com>
2017-02-20 13:34:04 +00:00
Jason Dillaman
ea7b10501c librbd: new rbd_aio_readv/rbd_aio_writev API methods
The RBD C API now has scatter/gather IO support via the API. The C++
API uses bufferlists which can also support scatter/gather IO.

Fixes: http://tracker.ceph.com/issues/13025
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-02-20 08:19:24 -05:00
Jason Dillaman
b00b67ac56 librbd: ReadResult helper class for reassembling partial reads
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-02-20 08:19:24 -05:00
Jason Dillaman
de95d862f5 librbd: move IO-related classes to new io namespace
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-02-20 08:19:18 -05:00
Haomai Wang
3c0af07629 Merge pull request #13528 from yuyuyu101/wip-fix-rdma-fd
msg/async/rdma: don't need to delete event when tcp connection isn't …

Reviewed-by: Adir lev <adirl@mellanox.com>
2017-02-20 16:21:39 +08:00
Yan, Zheng
9eea8395a5 mds: properly set default dir_hash for directory inodes
MDCache::handle_cache_rejoin_strong(). may add new inodes (race with
cache expire). Updating these inodes is at the very end of the function.
Before these inodes get updated, MDCache::handle_cache_rejoin_strong()
may add dentries to these inodes. So dir_hash type of these inodes
should be set to the default value.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
5f21e1ff68 mds: drop MDiscover/MMDSOpenIno messages if mds state < REJOIN
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
fee353b3e2 mds: don't call kick_discovers() for recovering mds twice
MDSRankDispatcher::handle_mds_map() calls kick_discovers() when
the recovering mds enters rejoin state. No need to call it again
when the recovering mds entry clientreplay/active state.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
5d91ca3385 mds: avoid race between cache expire and MDentryLink
commit 22535340 tried to fix race between cache expire and
MDentryLink. It avoids trimming null dentry whose lock is
not readable. The fix does not handle the case that MDS
first recevies a MDentryUnlink message, then receives a
MDentryLink message.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
4f15ad0d5a mds: properly update replica inode's ctime
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
7fb8e01125 mds: fix deadlock when wrlock and remote_wrlock the same lock
When handling trans-authority rename, the master mds may ask slave
mds to wrlock a lock, then try to wrlock the same lock locally.
If the master can't wrlock the lock locally, it need to drop the
remote wrlock and wait. Otherwise deadlock happens. The code does
not handle a corner case: Lock::wrlock_start() can sleep even
when SimpleLock::can_wrlock() return true.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
355328210a mds: issue new caps to client even when session is stale
If early reply is not allowed for open request, MDS does not send
reply to client immediately after adding adds new caps. Later when
MDS sends the reply, client session can be in stale stale. If MDS
does not issue the new caps to client along with the reply, the
new caps get lost. This issue can cause MDS to hang at revoking
caps.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
631d638dd6 mds: cleanup CInode::encode_inodestat()
variable no_caps should be true when valid is false.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
f25f054cc8 mds: note subtree bounds when rolling back rename
mds can do a slave rename that moves directory inode (whoes dirfrags
are all non-auth) to new auth. Then rolls back the slave rename. If
There is a ESubtreeMap event between log event of slave rename and
log event of rollback. The ESubtreeMap does not have information
about the inode's non-auth dirfrags.

Later when mds replays the log, the log event of slave rename can
be missing. So mds need to re-create subtree bounds when replaying
the log event of rename rollback

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
246cead0f2 mds: handle race of freezing auth pin
Linkage of rename source dentry may change during freezing auth
pin for the rename source inode. So we may freeze auth pin for
the wrong inode.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
b7b1d99588 mds: properly set ambiguous auth on auth mds of rename source inode
When doing trans-authority rename, the master mds may send two slave
requests to auth mds of rename source inode. The first slave request
set ambiguous auth on rename source inode. The second slave request
is sent after receiving all bystanders' slave request replies.

Current code uses mdr->more()->is_ambiguous_auth bit to indicate if
the first slave reuqest was sent. The is_ambiguous_auth is set when
when calling Server::_rename_prepare_witness(). This causes problem
if Server::_rename_prepare_witness() can't send the slave request
immediately and wants to retry the MDRequest laster. The fix is set
is_ambiguous_auth when receiving reply for the first slave request

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
7fc4bd19bf mds: disambiguate other mds' imports when cluster enters rejoin state
When mds cluster is in rejoin state, we know all mds have finished
their exports. All export abort notifications have been processed
by standby mds. So it's safe to disambiguate other mds' imports.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
2480b8ddf8 mds: wait acknowledgment for export abort notification
To disambiguate other mds's failed import, survivor bystander mds
need to receive either exporter mds' export abort notification or
exporter mds' resolve message. For bystander mds, it's hard to
distinguish "export succeeded" from the case "hasn't received
export abort notification".

To handle this problem, we rely on the fact that surviver mds does
not send resolve message to the recovering mds until it finishes
all its exports. Without the resolve message, the recovering mds
can't go to rejoin state. So when mds cluster is in rejoin state,
we know all mds have finished their exports. If export abort
notifications also require acknowledgments. When mds cluster is
in rejoin state, we know all export abort notifications have been
proceesed by bystander mds. So bystander mds can disambiguate other
mds' imports

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
84a661b9f2 mds: kill export finish waiters
this code is unused

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
ed69a3277d mds: cleanup ambiguous slave update when master mds fails
When auth mds of rename source dentry fails, slave updates in witness
mds become ambiguous. Witnesses need to ask the master if they should
rollback the updates. This type of rollback is special, corresponding
MDRequest struct need to be preserved after rollback. If the master
mds also fails, slave updates in witness mds are no longer special.
Corresponding MDRequest struct need to be cleanup after rollback.

see commit e62e48bb for more information.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
851003bc85 mds: log master commit after all slave commits get journaled
When survivor mds sends resolve message to recovering mds, aslo
records committing slave request in the message. So the recovering
mds knows the slave commit is still being journaled. It journals
master commit after receiving corresponding OP_COMMITTED message.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
7eed426e61 mds: tracking committing and rolling back slave requests
When handling mds failure, we need to distinguish committing and
'rolling back' slave requests from unprepared slave requests.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
9c16f83a59 mds: avoid zero replica_nonce
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
b8ceaeff79 mds: set STATE_AUTH in MDSCacheObject::deocde_import
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
086da0cf60 mds: avoid journal unnessary dirfrags in ESubtreeMap
EMetaBlob::add_dir_contex() skips adding inodes that has already
been journaled in the last ESubtreeMap. The log replay code only
replays the first ESubtreeMap. For the rest ESubtreeMap, it just
verifies subtree map in the cache matches the ESubtreeMap. If
unnessary inodes were included in non-first ESubtreeMap, these
inodes do not get added to the cache, the log replay code can
find these inodes are missing when replaying the rest events in
the log segment.

Previous attempt (commit a9b959dfb7) to fix this issue is not
complete. This patch makes MDCache::create_subtree_map() journal
dirfrags according to simplified subtree map. It should fix this
issue completely.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
20d43372fd mds: drop superfluous MMDSOpenInoReply
Superfluous MMDSOpenInoReply can causes MDCache::handle_open_ino_reply()
to call MDCache::do_open_ino() in improper state.

Fixes: http://tracker.ceph.com/issues/18754
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Yan, Zheng
a1499bc426 mds: stop purging strays when mds is being shutdown
Fixes: http://tracker.ceph.com/issues/18717
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-20 16:12:36 +08:00
Ganesh Mahalingam
3191fefc64 debian: Add missing tp files in deb packaging
DEB packaging builds happen with LTTNG enabled but are missing a few
files.
*  libosd_tp.so*, libos_tp.so* are needed to trace OSD
*  librados_tp.so, librbd_tp.so are needed along with the other files
for trace visibility within lttng tool.

Signed-off-by: Ganesh Mahalingam <ganesh.mahalingam@intel.com>
2017-02-19 23:04:45 -08:00