Follow up on Yan Zheng's "mds: warn clients which
aren't revoking cap" to include a health metric
for this condition as well as the clog messages.
Signed-off-by: John Spray <john.spray@redhat.com>
To be used later for generating health metrics
for clients which are failing to promptly service
CEPH_SESSION_RECALL_STATE messages.
Signed-off-by: John Spray <john.spray@redhat.com>
Previously client would fail to release caps for files
in the root directory in response to CEPH_SESSION_RECALL_STATE
messages.
Signed-off-by: John Spray <john.spray@redhat.com>
Used for simulating a buggy client that trips
the error detection in #9282 (warn clients
which aren't revoking caps)
Signed-off-by: John Spray <john.spray@redhat.com>
trim_dentry can potentially free an inode, so get/put
it around the block where we use the inode's dn_set.
Signed-off-by: John Spray <john.spray@redhat.com>
Two fixes:
* Client would unlink everything it could, instead of just
meeting its goal, because caps.size() doesn't change until
dentries are cleaned up later. Take account of the trimmed
count in the while() condition to fix that.
* Don't count the root ino as trimmed, as although it has no
dentries (of course), we will never give up the cap.
With this change, the client will now precisely achieve the number
of caps requested in CEPH_SESSION_RECALL_STATE messages.
Signed-off-by: John Spray <john.spray@redhat.com>
In a75af4c2, procedure was added to invalidate root's dentries
if the trimming failed to free enough caps. This would sometimes
crash because root->dir wasn't necessarily open.
Fix by only doing it if root dir is open, though I suspect this
may not be the end of it...
Signed-off-by: John Spray <john.spray@redhat.com>
... to avoid leaving log events that reference log
segments by offsets which no longer exist.
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 386f2d7c82)
Reviewed-by: Greg Farnum <greg@inktank.com>
Test that the segv injection works.
Test that a segv while logging something doesn't hang when the signal
handlers are installed. Note that this fails/hangs without the previous
fix.
Signed-off-by: Sage Weil <sage@redhat.com>
Make the last prt of bufferlist which is page-aligned don't change anything
after rebuild_page_aligned.
Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
This only happen for the last ptr. Because rebuild() don't change the len
of ptr, so if last ptr isn't page-size aligned but is page aligned, the
rebuild() don't change anything.
Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
Using a stringstream that is only displayed on error when calling the
erasure code factory, instead of cerr. The user expects the output to be
clean when there is no error.
http://tracker.ceph.com/issues/9429Fixes: #9429
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
If we have nolaggy waiters but are laggy we want to sleep. Otherwise,
we will just spin and spam the log ...
Signed-off-by: Sage Weil <sage@redhat.com>