diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-06-10 05:26:13 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 04:49:31 -0400 |
commit | f66fd9f0952187d274c13c136b74548f792c1925 (patch) | |
tree | c021f04f69b116f2673fdfb2354a99871f8f03a4 /fs/ceph/super.h | |
parent | e548e9b93d3e565e42b938a99804114565be1f81 (diff) |
ceph: pre-allocate data structure that tracks caps flushing
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index e7f13f742357..4415e977d72b 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -309,6 +309,7 @@ struct ceph_inode_info { | |||
309 | /* we need to track cap writeback on a per-cap-bit basis, to allow | 309 | /* we need to track cap writeback on a per-cap-bit basis, to allow |
310 | * overlapping, pipelined cap flushes to the mds. we can probably | 310 | * overlapping, pipelined cap flushes to the mds. we can probably |
311 | * reduce the tid to 8 bits if we're concerned about inode size. */ | 311 | * reduce the tid to 8 bits if we're concerned about inode size. */ |
312 | struct ceph_cap_flush *i_prealloc_cap_flush; | ||
312 | struct rb_root i_cap_flush_tree; | 313 | struct rb_root i_cap_flush_tree; |
313 | wait_queue_head_t i_cap_wq; /* threads waiting on a capability */ | 314 | wait_queue_head_t i_cap_wq; /* threads waiting on a capability */ |
314 | unsigned long i_hold_caps_min; /* jiffies */ | 315 | unsigned long i_hold_caps_min; /* jiffies */ |
@@ -578,7 +579,10 @@ static inline int __ceph_caps_dirty(struct ceph_inode_info *ci) | |||
578 | { | 579 | { |
579 | return ci->i_dirty_caps | ci->i_flushing_caps; | 580 | return ci->i_dirty_caps | ci->i_flushing_caps; |
580 | } | 581 | } |
581 | extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask); | 582 | extern struct ceph_cap_flush *ceph_alloc_cap_flush(void); |
583 | extern void ceph_free_cap_flush(struct ceph_cap_flush *cf); | ||
584 | extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask, | ||
585 | struct ceph_cap_flush **pcf); | ||
582 | 586 | ||
583 | extern int __ceph_caps_revoking_other(struct ceph_inode_info *ci, | 587 | extern int __ceph_caps_revoking_other(struct ceph_inode_info *ci, |
584 | struct ceph_cap *ocap, int mask); | 588 | struct ceph_cap *ocap, int mask); |