mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
mds: properly initialize MDCache::fragment_info_t
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This commit is contained in:
parent
ed30b83a9a
commit
dc52581df5
@ -11379,7 +11379,7 @@ void MDCache::find_stale_fragment_freeze()
|
||||
dirfrag_t df = p->first;
|
||||
fragment_info_t& info = p->second;
|
||||
++p;
|
||||
if (info.dirs_frozen)
|
||||
if (info.has_frozen)
|
||||
continue;
|
||||
CDir *dir;
|
||||
int total_auth_pins = 0;
|
||||
@ -11479,7 +11479,7 @@ void MDCache::fragment_frozen(dirfrag_t basedirfrag, int r)
|
||||
dout(10) << "fragment_frozen " << basedirfrag.frag << " by " << info.bits
|
||||
<< " on " << info.dirs.front()->get_inode() << dendl;
|
||||
|
||||
info.dirs_frozen = true;
|
||||
info.has_frozen = true;
|
||||
|
||||
MDRequest *mdr = request_start_internal(CEPH_MDS_OP_FRAGMENTDIR);
|
||||
mdr->more()->fragment_base = basedirfrag;
|
||||
|
@ -961,11 +961,11 @@ private:
|
||||
list<CDir*> resultfrags;
|
||||
MDRequest *mdr;
|
||||
// for deadlock detection
|
||||
bool dirs_frozen;
|
||||
bool has_frozen;
|
||||
utime_t last_cum_auth_pins_change;
|
||||
int last_cum_auth_pins;
|
||||
int num_remote_waiters; // number of remote authpin waiters
|
||||
fragment_info_t() : last_cum_auth_pins(0), num_remote_waiters(0) {}
|
||||
fragment_info_t() : has_frozen(false), last_cum_auth_pins(0), num_remote_waiters(0) {}
|
||||
};
|
||||
map<dirfrag_t,fragment_info_t> fragments;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user