diff options
author | Sage Weil <sage@newdream.net> | 2009-10-14 17:27:38 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-10-15 21:14:35 -0400 |
commit | afcdaea3f2a78ce4873bd7e98a6d603bda23d167 (patch) | |
tree | 08defc298e2c27816d70bd41c8c3ecc80a82ba79 /fs/ceph/super.h | |
parent | cdc35f96277314bbfeefd0505410cabd69aebd8d (diff) |
ceph: flush dirty caps via the cap_dirty list
Previously we were flushing dirty caps by passing an extra flag
when traversing the delayed caps list. Besides being a bit ugly,
that can also miss caps that are dirty but didn't result in a
cap requeue: notably, mark_caps_dirty().
Separate the flushing into a separate helper, and traverse the
cap_dirty list.
This also brings i_dirty_item in line with i_dirty_caps: we are
on the list IFF caps != 0. We carry an inode ref IFF
dirty_caps|flushing_caps != 0.
Lose the unused return value from __ceph_mark_caps_dirty().
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index cfd39ef4023e..0bbf58ab607e 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -524,7 +524,7 @@ static inline int __ceph_caps_dirty(struct ceph_inode_info *ci) | |||
524 | { | 524 | { |
525 | return ci->i_dirty_caps | ci->i_flushing_caps; | 525 | return ci->i_dirty_caps | ci->i_flushing_caps; |
526 | } | 526 | } |
527 | extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask); | 527 | extern void __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask); |
528 | 528 | ||
529 | extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask); | 529 | extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask); |
530 | extern int __ceph_caps_used(struct ceph_inode_info *ci); | 530 | extern int __ceph_caps_used(struct ceph_inode_info *ci); |
@@ -814,8 +814,8 @@ extern void __ceph_flush_snaps(struct ceph_inode_info *ci, | |||
814 | struct ceph_mds_session **psession); | 814 | struct ceph_mds_session **psession); |
815 | extern void ceph_check_caps(struct ceph_inode_info *ci, int flags, | 815 | extern void ceph_check_caps(struct ceph_inode_info *ci, int flags, |
816 | struct ceph_mds_session *session); | 816 | struct ceph_mds_session *session); |
817 | extern void ceph_check_delayed_caps(struct ceph_mds_client *mdsc, | 817 | extern void ceph_check_delayed_caps(struct ceph_mds_client *mdsc); |
818 | int flushdirty); | 818 | extern void ceph_flush_dirty_caps(struct ceph_mds_client *mdsc); |
819 | 819 | ||
820 | extern int ceph_encode_inode_release(void **p, struct inode *inode, | 820 | extern int ceph_encode_inode_release(void **p, struct inode *inode, |
821 | int mds, int drop, int unless, int force); | 821 | int mds, int drop, int unless, int force); |