}
}
-void CDir::_go_bad()
-{
- if (get_version() == 0)
- set_version(1);
- state_set(STATE_BADFRAG);
- // mark complete, !fetching
- mark_complete();
- state_clear(STATE_FETCHING);
- auth_unpin(this);
-
- // kick waiters
- finish_waiting(WAIT_COMPLETE, -EIO);
-}
-
void CDir::go_bad_dentry(snapid_t last, std::string_view dname)
{
dout(10) << __func__ << " " << dname << dendl;
ceph_abort(); // unreachable, damaged() respawns us
}
- if (complete)
- _go_bad();
- else
- auth_unpin(this);
+ if (complete) {
+ if (get_version() == 0)
+ set_version(1);
+
+ state_set(STATE_BADFRAG);
+ mark_complete();
+ }
+
+ state_clear(STATE_FETCHING);
+ auth_unpin(this);
+ finish_waiting(WAIT_COMPLETE, -EIO);
}
// -----------------------
const std::set<snapid_t> *snaps,
bool *force_dirty);
- /**
- * Mark this fragment as BADFRAG (common part of go_bad and go_bad_dentry)
- */
- void _go_bad();
-
/**
* Go bad due to a damaged dentry (register with damagetable and go BADFRAG)
*/