Put the readdir results (list of snapshots) in the right place in the
hierarchy; we were putting them in the parent dir (as if they were real
directories).
This bug manifested itself as a snaptest-2.sh failure.
Signed-off-by: Sage Weil <sage@newdream.net>
dn = dir->dentries[dname];
dout(12) << "insert_dentry_inode " << dname << " vino " << in->vino()
- << " in dir " << dir->parent_inode->ino
+ << " in dir " << dir->parent_inode->vino()
<< dendl;
if (dn && dn->inode) {
// the rest?
p = reply->get_extra_bl().begin();
if (!p.end()) {
+ // snapdir?
+ if (request->head.op == CEPH_MDS_OP_LSSNAP)
+ in = open_snapdir(in);
+
// only open dir if we're actually adding stuff to it!
Dir *dir = in->open_dir();
assert(dir);