Skip to content

Commit

Permalink
Merge PR ceph#16714 into master
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Reviewed-by: huanwen ren <[email protected]>
  • Loading branch information
batrick committed Aug 3, 2017
2 parents 05cec0a + 8db2c43 commit 6cad5be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qa/tasks/cephfs/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def _wait_subtrees(self, status, rank, test):
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)
Expand Down
1 change: 1 addition & 0 deletions src/mds/MDSRank.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6cad5be

Please sign in to comment.