When MDS receives the getattr request, corresponding inode's filelock
can be in unstable state which waits for client's Fr cap.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Pass properly 'retain' to Client::send_cap() because it is used to
adjust cap->issued.
Also make Client::encode_inode_release() not release used/dirty caps.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Fixes: #7978
We tried to move to the next placement rule, but we were already at the
last one, so we ended up looping forever.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Create a custom profile with ruleset-failure-domain=osd. (The default
ruleset-failure-domain=host won't do because this script assumes and
works only if all osds are on the same host.) While at it, set k and m
explicitly to avoid troubles in the future.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Unmap rbd images when stopping the whole cluster. Not doing so results
in images that cannot be unmapped until the same cluster is brought
back up. Issue a warning if we failed to unmap all images.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Command tracing here doesn't bring any value and simply pollutes the
terminal, as the script always runs to completion.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Set ruleset-failure-domain=osd so that
./ceph osd pool create ecpool 12 12 erasure
./rados --pool ecpool put SOMETHING /etc/group
works by default. When using a vstart cluster the default failure
domain (host) won't work because all OSDs are in "localhost".
Signed-off-by: Loic Dachary <loic@dachary.org>
If we shut down, clear out all of the lockdep state. This ensures that if
we start up again on another cct, we will not be confused by old type ids
and dependency state.
Possibly contributed to #7965.
Signed-off-by: Sage Weil <sage@inktank.com>
If we have already registered a cct for lockdep, do not accept another one.
We already check that the cct matches when we shut down. This we will run
for the life span of a single cct and no longer.
Fixes: #7965
Signed-off-by: Sage Weil <sage@inktank.com>
When we make an existing pool a tier, we start copying the snap metadata
from the base tier. That includes removed_snaps. In order for the OSD
to recognize that this value is changing for the first time, we need to
set snap_epoch, or else the OSD doesn't update it's in-memory PGPool
with removed snaps and we eventually hit an assertion failure because
PGPool::cached_remove_snaps is incorrect (e.g., empty).
Fix this by bumping snap_epoch when we add the new tier.
Fixes: #7915
Signed-off-by: Sage Weil <sage@inktank.com>
* Require "$remote_fs" since it guarantees /usr availability
(rbd executable is in /usr/bin/rbd)
* Speed-up init.d rbd mapping on machines acting as MON/OSD
by starting rbdmap after /init.d/ceph (when possible) and
shutting down rbd before ceph.
* Map rbd devices before starting X (helpful when /home is mounted from rbd).
Files in a dirfrag are usually processed in the order of readdir
results. Files at the beginning of are more likely to be used in
the future than files at the last.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
For across authority rename, the MDS first freezes the source inode's
authpin. It happens while the source dentry isn't locked. So when the
inode's authpin become frozen, the source dentry may have changed and
be linked to a different inode.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This forbids exporting subtrees and fragmenting dirfrags when there
is MDS in clientreplay state. During replaying client requests, the
MDS may need to authpin some remote objects. Exporting subtrees and
fragmenting dirfrags slow down replaying client requests.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This avoid inserting ESubtreeMap among EImportFinish events that
finish disambiguate imports. Because the ESubtreeMap reflects the
subtree state when all EImportFinish events are replayed.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
When a non-auth dirfrag is pinned by uncommitted slave update,
there still can be non-auth child dirfrags that are trimmable.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Clients can make use of these directories, and ceph-common is required by
ceph, so nothing should break here.
Change the purge postrm script to be for ceph-common (it does nothing else).
Signed-off-by: Sage Weil <sage@inktank.com>
We fell into the case in _rollback_to where we just set ctx->modify = true
and don't explicitly mark the ctx and unrollbackable. Later, we screw up
in proc_replica_log as a result because we think we can rollback this
update to the head when in reality we cannot.
Fixes: #7907
Signed-off-by: Sage Weil <sage@inktank.com>