Merge PR #16714 into master

* refs/remotes/upstream/pull/16714/head:
	qa: test export_pin is correct in dumped subtree
	mds: print export_pin for dumped subtree

Reviewed-by: Douglas Fuller <dfuller@redhat.com>
Reviewed-by: huanwen ren <ren.huanwen@zte.com.cn>
This commit is contained in:
Patrick Donnelly 2017-08-02 18:41:12 -07:00
commit 6cad5be68c
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,9 @@ class TestExports(CephFSTestCase):
filtered = sorted([(s['dir']['path'], s['auth_first']) for s in subtrees])
log.info("%s =?= %s", filtered, test)
if filtered == test:
# Confirm export_pin in output is correct:
for s in subtrees:
self.assertTrue(s['export_pin'] == s['auth_first'])
return subtrees
time.sleep(pause)
raise RuntimeError("rank {0} failed to reach desired subtree state", rank)

View File

@ -2262,6 +2262,7 @@ void MDSRank::command_get_subtrees(Formatter *f)
f->dump_bool("is_auth", dir->is_auth());
f->dump_int("auth_first", dir->get_dir_auth().first);
f->dump_int("auth_second", dir->get_dir_auth().second);
f->dump_int("export_pin", dir->inode->get_export_pin());
f->open_object_section("dir");
dir->dump(f);
f->close_section();