Don't use pick_inode_snap is totally wrong (it depends on the current set
of snaps, etc.).. look up the inode directly via the ino and last snapid,
which we have. Fixes a failure at the assert.
Reported-by: Thomas Mueller <thomas@chaschperli.ch>
Signed-off-by: Sage Weil <sage@newdream.net>
break;
if (p->second.count(client)) {
dout(10) << " doing async NULL snapflush on " << p->first << " from client" << p->second << dendl;
- CInode *sin = mdcache->pick_inode_snap(head_in, p->first - 1);
- assert(sin != head_in);
+ CInode *sin = mdcache->get_inode(head_in->ino(), p->first - 1);
+ assert(sin);
_do_snap_update(sin, 0, sin->first - 1, m, NULL);
head_in->client_need_snapflush[in->last].erase(client);
if (head_in->client_need_snapflush[in->last].empty()) {