Adjust priority of committing dirfrags according to number of
expiring log segments. The more expiring log segments, the higher
priority. Because it mean MDS does not trim log segments quickly
enough.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
when the _revokes list is emptied, it doesn't mean that client has
released the revoking caps. It's possible that client was flusing
dirty metadata.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
There are several perils when splitting a cache pool:
- split invalidstes pg stats, which disables the agent
- a scrub must be manually triggered post-split to rebuild stats
- the pool may fill the OSDs during that period.
- or, the pool may end up beyond the 'full' mark and once scrub does
complete and the agent activate we may block IO for a long time while
we catch up with flush/evict
Make it a bit harder for users to shoot themselves in the foot.
Fixes: #8043
Signed-off-by: Sage Weil <sage@inktank.com>
Previously assumed that ceph-mds executable was in
PWD - now use /proc/self/exe to find the
executable whereever it may be. Leave in old version
as a fallback for non-linux environments.
Also add a 'respawn' command so that it's easy to test
respawn with `ceph mds tell <id> respawn`
Fixes: #7966
WR cap is allowed for the loner client when filelock is in excl->mix
state. MDS should share max size with the loner client in this case.
Otherwise the client may wait for the max size forever.
Fixes: #8092
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
strerror_r is not portable; on Gnu libc it returns char * and sometimes
does not fill in the supplied buffer. Use autoconf to test which
version this platform uses and adapt.
Clean up the random calls to strerror and strerror_r (along with all
their private little one-use buffers) and regularize the code to use
cpp_strerror almost everywhere. Where changed, any negation of the
error code is also removed, since cpp_strerror() will do that.
Note: some tools were using their own calls to strerror/strerror_r, so
will now get a (%d) in their output that wasn't there before; hence
the change to test/cli/monmaptool/print-nonexistent.t
Fixes: #8041
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Current the dup op checks happen in execute_ctx, long after we handle
cache ops or get the obc and (potentially) return ENOENT. That means that
object deletions and cache ops both aren't properly idempotent.
This is easy to fix by moving the check earlier in do_op.
Fixes: #8089
Signed-off-by: Sage Weil <sage@inktank.com>
If early reply is not allowed, MDS does not send reply to client immediately
after Locker::issue_new_caps adds new caps. So MDS can revoke the caps before
sending reply to client.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
MDCache::do_file_recover may call Locker::evel_gather, which may change
filelock to stable state. So we should authpin the inode (for unstable
lock state) first.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
We can get a query on a pg we still have but are no longer primary for. If
that happens, do not reply. The client will resend to the correct OSD
assuming it has the map. Send them the latest incremental so that we know
they know there is something new. We don't know the exact epoch they have,
unfortunately, because MCommand doesn't include it, but a newer inc is
enough to make them request the right incrementals from a mon. Eventually
they will figure it out and Objecter will resend the request to the
correct target.
It is possible we should include epoch in the MCommand message so that we
can do this mapping "correctly" (as in, the same way MOSDOp does). That
makes MCommand less general, though... a PG-specific command message might
be the most precise thing. Another day...
Fixes: #8085
Signed-off-by: Sage Weil <sage@inktank.com>
snap_rollback() is the same as selfmanaged_snap_rollback() but we want an
independent interface for pool snapshots. Should really take snapname
for consistency with other pool snapshot interfaces.
Signed-off-by: David Zafman <david.zafman@inktank.com>