Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208840
b: refs/heads/master
c: 2bc5025
h: refs/heads/master
v: v3
  • Loading branch information
Greg Farnum authored and Sage Weil committed Aug 2, 2010
1 parent fd4eb66 commit da71094
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 154f42c2c3c3b66a7a63dad5648e8a9860a32af9
refs/heads/master: 2bc50259fa0aa1868f8b2ba1d374406cb3c57f72
10 changes: 10 additions & 0 deletions trunk/fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,16 @@ static struct ceph_cap *__get_cap_for_mds(struct ceph_inode_info *ci, int mds)
return NULL;
}

struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci, int mds)
{
struct ceph_cap *cap;

spin_lock(&ci->vfs_inode.i_lock);
cap = __get_cap_for_mds(ci, mds);
spin_unlock(&ci->vfs_inode.i_lock);
return cap;
}

/*
* Return id of any MDS with a cap, preferably FILE_WR|BUFFER|EXCL, else -1.
*/
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ceph/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,8 @@ extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc);
extern int ceph_fsync(struct file *file, int datasync);
extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc,
struct ceph_mds_session *session);
extern struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci,
int mds);
extern int ceph_get_cap_mds(struct inode *inode);
extern void ceph_get_cap_refs(struct ceph_inode_info *ci, int caps);
extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had);
Expand Down

0 comments on commit da71094

Please sign in to comment.