if (export_pin == MDS_RANK_NONE && !update)
return;
- if (mdcache->export_pin_queue.count(this))
+ if (state_test(CInode::STATE_QUEUEDEXPORTPIN))
return;
bool queue = false;
queue = dir->state_test(CDir::STATE_AUXSUBTREE);
}
if (queue) {
- get(CInode::PIN_EXPORTPINQUEUE);
+ state_set(CInode::STATE_QUEUEDEXPORTPIN);
mdcache->export_pin_queue.insert(this);
break;
}
static const int PIN_DIRTYPARENT = 23;
static const int PIN_DIRWAITER = 24;
static const int PIN_SCRUBQUEUE = 25;
- static const int PIN_EXPORTPINQUEUE = 26;
const char *pin_name(int p) const override {
switch (p) {
case PIN_DIRTYPARENT: return "dirtyparent";
case PIN_DIRWAITER: return "dirwaiter";
case PIN_SCRUBQUEUE: return "scrubqueue";
- case PIN_EXPORTPINQUEUE: return "exportpinqueue";
default: return generic_pin_name(p);
}
}
static const int STATE_REPAIRSTATS = (1<<19);
static const int STATE_MISSINGOBJS = (1<<20);
static const int STATE_EVALSTALECAPS = (1<<21);
+ static const int STATE_QUEUEDEXPORTPIN = (1<<22);
// orphan inode needs notification of releasing reference
static const int STATE_ORPHAN = STATE_NOTIFYREF;
o->item_open_file.remove_myself();
+ if (o->state_test(CInode::STATE_QUEUEDEXPORTPIN))
+ export_pin_queue.erase(o);
+
// remove from inode map
inode_map.erase(o->vino());