scrub_dentry() is passed a string path, and it validates it before replying. We
hook up an admin socket command "scrub_path" to call it and dump the output.
Signed-off-by: Greg Farnum <greg@inktank.com>
Add a function that will validate the on-disk state of the CInode. We currently
check that the on-disk backtrace matches (or is older) and compare rstats on
dirfrags against the parent dir's inode (for directories only).
TODO: validate that the on-disk Inode object matches what the parent
directory holds.
It's using a sort-of new programming model, trying to stuff stack data into
a Continuation object and write everything sequentially instead of having
a function and Context per IO.
Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: John Spray <john.spray@redhat.com>
Unlike the regular Continuation, this one works in terms of an MDRequest
and has wrappers to provide Context callbacks that are either
internal MDS or IO appropriate.
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
This way we can create duplicate CInodes without actually linking them
into the cache. It'll be helpful for comparing different versions of
disk states and in-memory state, etc.
Signed-off-by: Greg Farnum <greg@inktank.com>
Use this passthru in the Server path locking functions so that we can get
locks or auth pins without an associated MClientRequest.
Signed-off-by: Greg Farnum <greg@inktank.com>
operator== is checking equality of the version as well, but I want
something I can use to check that the internal sums match. This is useful
for eg comparing the sums of a set of dirfrags to the tally stored in
the inode.
Signed-off-by: Greg Farnum <greg@inktank.com>
This compares one inode_t against another, seeing which version is newer
and checking that differences in the data members make sense given that.
Signed-off-by: Greg Farnum <greg@inktank.com>
The compare() function checks one backtrace against another and indicates
if they're equivalent (or divergent!) and the relative freshness.
Signed-off-by: Greg Farnum <greg@inktank.com>
These let us wrap generic function tooling up inside of the appropriate
type-checking, and verify we haven't done anything too stupid.
Signed-off-by: Greg Farnum <greg@inktank.com>
...rather than inferring something from expire_pos
that could leave trash behind in the range between
the original trimmed_pos and expire_pos.
Be backward compatible with old journal dumps
so that if someone is updating for other reasons
like getting better tools, they can still import
their journal.
Signed-off-by: John Spray <john.spray@redhat.com>
Previously it only worked on fresh filesystems which
hadn't been trimmed yet, and resulted in an invalid
trimmed_pos when expire_pos wasn't on an object
boundary.
Fixes: #10025
Signed-off-by: John Spray <john.spray@redhat.com>
Since we started wrapping the write error
handler in a finisher, multiple calls to
handle_write_error would hit the assert()
on the second call before the actual
handler had been called (at the other end
of the finisher) from the first call.
The symptom was that the MDS was intermittently
failing to respawn on blacklist, seen in #10011.
Signed-off-by: John Spray <john.spray@redhat.com>
If librbd is not able to open a child's parent image, it will
incorrectly close the parent image twice, resulting in a crash.
Fixes: #10030
Backport: firefly, giant
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Update bench.sh/plot tool to cover ISA backend.
ISA will output a fake echinique 'cauchy_good' so the plot tool
don't need to be changed.
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
Current librbd unit tests create and destroy pools for each
test. By migrating to a test fixture, the same pool(s) are
now used for all tests within a test case. This speeds up
the runtime of the librbd tests.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Fixes: #9973
Backport: firefly, giant
Previously we were iterating through the parts, creating hash of the
parts etags (as S3 does for multipart uploads). However, swift just
calculates the etag for the empty manifest object.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Fixes: #9479
Backport: firefly, giant
We didn't send the etag back correctly. Original code assumed the etag
resided in the attrs, but attrs only contained request attrs.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Fixes: #9478
Backport: firefly, giant
Content type for S3 object copy response should be set to
application/xml.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
If largest_data_off % CEPH_PAGE_SIZE != 0, the get_data_aligment return
a erro value. This make the FileJouranl::align_bl to memcopy much data.
Tested-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Using thie filed, we know the payload of
rebuild/rebuild_page_aligned/c_str and tune performance accroding.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
This broke when the channel refactor happened--we weren't configuring
the LogClient settings at all. Fix it by using the generic helpers to
make this reasonably painless.
Signed-off-by: Sage Weil <sage@redhat.com>