Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
linkage.remote_d_type = dt;
}
+ ~CDentry() override {
+ ceph_assert(batch_ops.empty());
+ }
+
std::string_view pin_name(int p) const override {
switch (p) {
case PIN_INODEPIN: return "inodepin";
ceph_assert(num_caps_wanted == 0);
ceph_assert(num_subtree_roots == 0);
ceph_assert(num_exporting_dirs == 0);
+ ceph_assert(batch_ops.empty());
}
std::map<int, std::unique_ptr<BatchOp>> batch_ops;
CDentry* dn = mdr->dn[0].back();
auto em = dn->batch_ops.emplace(std::piecewise_construct, std::forward_as_tuple(mask), std::forward_as_tuple());
if (em.second) {
- em.first->second = std::make_unique<Batch_Getattr_Lookup>(this, mdr, mdcache);
+ em.first->second = std::make_unique<Batch_Getattr_Lookup>(this, mdr, mdcache);
+ mdr->pin(dn);
} else {
dout(20) << __func__ << ": LOOKUP op, wait for previous same getattr ops to respond. " << *mdr << dendl;
em.first->second->add_request(mdr);