summaryrefslogtreecommitdiffstats
path: root/src/mds/CInode.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds/CInode.cc34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc
index 46aff12673e..faf9f408688 100644
--- a/src/mds/CInode.cc
+++ b/src/mds/CInode.cc
@@ -2987,12 +2987,15 @@ void CInode::clear_ambiguous_auth()
bool CInode::can_auth_pin(int *err_ret) const {
int err;
if (!is_auth()) {
+ dout(20) << __func__ << ": error - no auth" << dendl;
err = ERR_NOT_AUTH;
} else if (is_freezing_inode() || is_frozen_inode() || is_frozen_auth_pin()) {
+ dout(20) << __func__ << ": error - exporting inode" << dendl;
err = ERR_EXPORTING_INODE;
} else {
if (parent)
return parent->can_auth_pin(err_ret);
+ dout(20) << __func__ << ": auth!" << dendl;
err = 0;
}
if (err && err_ret)
@@ -5281,6 +5284,7 @@ void CInode::scrub_maybe_delete_info()
{
if (scrub_infop &&
!scrub_infop->scrub_in_progress &&
+ !scrub_infop->uninline_in_progress &&
!scrub_infop->last_scrub_dirty) {
scrub_infop.reset();
}
@@ -5292,30 +5296,52 @@ void CInode::scrub_initialize(ScrubHeaderRef& header)
scrub_info();
scrub_infop->scrub_in_progress = true;
+ scrub_infop->uninline_in_progress = false;
scrub_infop->queued_frags.clear();
scrub_infop->header = header;
header->inc_num_pending();
// right now we don't handle remote inodes
}
+void CInode::uninline_initialize()
+{
+ dout(20) << __func__ << " with scrub_version " << get_version() << dendl;
+ scrub_infop->uninline_in_progress = true;
+}
+
void CInode::scrub_aborted() {
dout(20) << __func__ << dendl;
ceph_assert(scrub_is_in_progress());
scrub_infop->scrub_in_progress = false;
+ scrub_infop->uninline_in_progress = false;
scrub_infop->header->dec_num_pending();
scrub_maybe_delete_info();
}
+void CInode::common_finished() {
+ if (!scrub_is_in_progress()) {
+ scrub_infop->last_scrub_version = get_version();
+ scrub_infop->last_scrub_stamp = ceph_clock_now();
+ scrub_infop->last_scrub_dirty = true;
+ scrub_infop->header->dec_num_pending();
+ }
+}
+
void CInode::scrub_finished() {
dout(20) << __func__ << dendl;
ceph_assert(scrub_is_in_progress());
- scrub_infop->last_scrub_version = get_version();
- scrub_infop->last_scrub_stamp = ceph_clock_now();
- scrub_infop->last_scrub_dirty = true;
scrub_infop->scrub_in_progress = false;
- scrub_infop->header->dec_num_pending();
+ common_finished();
+}
+
+void CInode::uninline_finished() {
+ dout(20) << __func__ << dendl;
+ ceph_assert(scrub_is_in_progress());
+
+ scrub_infop->uninline_in_progress = false;
+ common_finished();
}
int64_t CInode::get_backtrace_pool() const