mirror of
https://github.com/ceph/ceph
synced 2025-02-25 03:52:04 +00:00
mds: add 'mds debug auth pins' option
This counts dirfrag auth_pins and ensure the inode's nested_auth_pins count is correct. Helped catch the bug fixed in the previous commit. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
d994e8b4b8
commit
0a80865f5c
@ -309,6 +309,7 @@ struct config_option config_optionsp[] = {
|
||||
OPTION(mds_verify_scatter, OPT_BOOL, false),
|
||||
OPTION(mds_debug_scatterstat, OPT_BOOL, false),
|
||||
OPTION(mds_debug_frag, OPT_BOOL, false),
|
||||
OPTION(mds_debug_auth_pins, OPT_BOOL, false),
|
||||
OPTION(mds_kill_mdstable_at, OPT_INT, 0),
|
||||
OPTION(mds_kill_export_at, OPT_INT, 0),
|
||||
OPTION(mds_kill_import_at, OPT_INT, 0),
|
||||
|
@ -370,6 +370,7 @@ public:
|
||||
bool mds_verify_scatter;
|
||||
bool mds_debug_scatterstat;
|
||||
bool mds_debug_frag;
|
||||
bool mds_debug_auth_pins;
|
||||
int mds_kill_mdstable_at;
|
||||
int mds_kill_export_at;
|
||||
int mds_kill_import_at;
|
||||
|
@ -2023,6 +2023,19 @@ void CInode::adjust_nested_auth_pins(int a)
|
||||
<< dendl;
|
||||
assert(nested_auth_pins >= 0);
|
||||
|
||||
if (g_conf.mds_debug_auth_pins) {
|
||||
// audit
|
||||
int s = 0;
|
||||
for (map<frag_t,CDir*>::iterator p = dirfrags.begin();
|
||||
p != dirfrags.end();
|
||||
++p) {
|
||||
CDir *dir = p->second;
|
||||
if (dir->get_cum_auth_pins())
|
||||
s++;
|
||||
}
|
||||
assert(s == nested_auth_pins);
|
||||
}
|
||||
|
||||
if (parent)
|
||||
parent->adjust_nested_auth_pins(a, 0);
|
||||
}
|
||||
|
@ -278,6 +278,7 @@ EOF
|
||||
$DAEMONOPTS
|
||||
$CMDSDEBUG
|
||||
mds debug frag = true
|
||||
mds debug auth pins = true
|
||||
[osd]
|
||||
$DAEMONOPTS
|
||||
osd class tmp = out
|
||||
|
Loading…
Reference in New Issue
Block a user