Skip to content

Commit

Permalink
ceph: fix open file counting on snapped inodes when mds returns no caps
Browse files Browse the repository at this point in the history
It's possible the MDS will not issue caps on a snapped inode, in which case
an open request may not __ceph_get_fmode(), botching the open file
counting.  (This is actually a server bug, but the client shouldn't BUG out
in this case.)

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed May 11, 2010
1 parent 0ceed5d commit 04d000e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,10 @@ static int fill_inode(struct inode *inode,
__ceph_get_fmode(ci, cap_fmode);
spin_unlock(&inode->i_lock);
}
} else if (cap_fmode >= 0) {
pr_warning("mds issued no caps on %llx.%llx\n",
ceph_vinop(inode));
__ceph_get_fmode(ci, cap_fmode);
}

/* update delegation info? */
Expand Down

0 comments on commit 04d000e

Please sign in to comment.