]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix null snapflush inode lookup
authorSage Weil <sage@newdream.net>
Wed, 18 Aug 2010 17:18:21 +0000 (10:18 -0700)
committerSage Weil <sage@newdream.net>
Wed, 18 Aug 2010 17:27:51 +0000 (10:27 -0700)
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>
src/mds/Locker.cc

index 9ff496e4ed8fa0f457d4aeb641fff1c50756e610..0c683f09659c986a2821fd08d92c5f73790c689b 100644 (file)
@@ -1872,8 +1872,8 @@ void Locker::handle_client_caps(MClientCaps *m)
            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()) {