diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2010-06-17 19:16:12 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-08-01 23:11:40 -0400 |
commit | 37151668bad3fd058368752bee476f2ba3645596 (patch) | |
tree | 6eeae77dfa1c758ff03659b5677f474a72fbe7c0 /fs/ceph/super.h | |
parent | 0deb01c9998f8112c5e478e3fe3a930131abbc0a (diff) |
ceph: do caps accounting per mds_client
Caps related accounting is now being done per mds client instead
of just being global. This prepares ground work for a later revision
of the caps preallocated reservation list.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 10a4a406e887..44d10cb0aeca 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -560,11 +560,13 @@ static inline int __ceph_caps_wanted(struct ceph_inode_info *ci) | |||
560 | /* what the mds thinks we want */ | 560 | /* what the mds thinks we want */ |
561 | extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci); | 561 | extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci); |
562 | 562 | ||
563 | extern void ceph_caps_init(void); | 563 | extern void ceph_caps_init(struct ceph_mds_client *mdsc); |
564 | extern void ceph_caps_finalize(void); | 564 | extern void ceph_caps_finalize(struct ceph_mds_client *mdsc); |
565 | extern void ceph_adjust_min_caps(int delta); | 565 | extern void ceph_adjust_min_caps(struct ceph_mds_client *mdsc, int delta); |
566 | extern int ceph_reserve_caps(struct ceph_cap_reservation *ctx, int need); | 566 | extern int ceph_reserve_caps(struct ceph_mds_client *mdsc, |
567 | extern int ceph_unreserve_caps(struct ceph_cap_reservation *ctx); | 567 | struct ceph_cap_reservation *ctx, int need); |
568 | extern int ceph_unreserve_caps(struct ceph_mds_client *mdsc, | ||
569 | struct ceph_cap_reservation *ctx); | ||
568 | extern void ceph_reservation_status(struct ceph_client *client, | 570 | extern void ceph_reservation_status(struct ceph_client *client, |
569 | int *total, int *avail, int *used, | 571 | int *total, int *avail, int *used, |
570 | int *reserved, int *min); | 572 | int *reserved, int *min); |
@@ -806,7 +808,8 @@ static inline void ceph_remove_cap(struct ceph_cap *cap) | |||
806 | __ceph_remove_cap(cap); | 808 | __ceph_remove_cap(cap); |
807 | spin_unlock(&inode->i_lock); | 809 | spin_unlock(&inode->i_lock); |
808 | } | 810 | } |
809 | extern void ceph_put_cap(struct ceph_cap *cap); | 811 | extern void ceph_put_cap(struct ceph_mds_client *mdsc, |
812 | struct ceph_cap *cap); | ||
810 | 813 | ||
811 | extern void ceph_queue_caps_release(struct inode *inode); | 814 | extern void ceph_queue_caps_release(struct inode *inode); |
812 | extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc); | 815 | extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc); |