Project

General

Profile

Feature #47571

mds: in->get_parent_dir() maybe NULL

Added by mingshuai wang about 1 month ago. Updated 5 days ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

bool MDCache::open_undef_inodes_dirfrags() {
.....

for (set<CInode*>::iterator p = rejoin_undef_inodes.begin();
p != rejoin_undef_inodes.end();
++p) {
CInode *in = *p;
ceph_assert(!in->is_base());
// parent是inode对应的dentry,parent->dir是dentry的父目录
fetch_queue.insert(in->get_parent_dir());
}

......

for (set<CDir*>::iterator p = fetch_queue.begin();
p != fetch_queue.end();
++p) {
CDir *dir = *p; // maybe NULL Ptr for unexpected situation, it's better fail at begining
PR: https://github.com/ceph/ceph/pull/37294

History

#1 Updated by Patrick Donnelly about 1 month ago

  • Subject changed from MDS: in->get_parent_dir() maybe NULL to mds: in->get_parent_dir() maybe NULL
  • Status changed from New to Fix Under Review
  • Assignee set to mingshuai wang
  • Target version set to v16.0.0
  • Source set to Community (dev)

#2 Updated by Patrick Donnelly 5 days ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF