diff options
Diffstat (limited to 'fs/ceph/super.h')
| -rw-r--r-- | fs/ceph/super.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 2482d696f0de..b87638e84c4b 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
| @@ -216,8 +216,7 @@ struct ceph_cap_snap { | |||
| 216 | uid_t uid; | 216 | uid_t uid; |
| 217 | gid_t gid; | 217 | gid_t gid; |
| 218 | 218 | ||
| 219 | void *xattr_blob; | 219 | struct ceph_buffer *xattr_blob; |
| 220 | int xattr_len; | ||
| 221 | u64 xattr_version; | 220 | u64 xattr_version; |
| 222 | 221 | ||
| 223 | u64 size; | 222 | u64 size; |
| @@ -229,8 +228,11 @@ struct ceph_cap_snap { | |||
| 229 | 228 | ||
| 230 | static inline void ceph_put_cap_snap(struct ceph_cap_snap *capsnap) | 229 | static inline void ceph_put_cap_snap(struct ceph_cap_snap *capsnap) |
| 231 | { | 230 | { |
| 232 | if (atomic_dec_and_test(&capsnap->nref)) | 231 | if (atomic_dec_and_test(&capsnap->nref)) { |
| 232 | if (capsnap->xattr_blob) | ||
| 233 | ceph_buffer_put(capsnap->xattr_blob); | ||
| 233 | kfree(capsnap); | 234 | kfree(capsnap); |
| 235 | } | ||
| 234 | } | 236 | } |
| 235 | 237 | ||
| 236 | /* | 238 | /* |
| @@ -342,7 +344,8 @@ struct ceph_inode_info { | |||
| 342 | unsigned i_cap_exporting_issued; | 344 | unsigned i_cap_exporting_issued; |
| 343 | struct ceph_cap_reservation i_cap_migration_resv; | 345 | struct ceph_cap_reservation i_cap_migration_resv; |
| 344 | struct list_head i_cap_snaps; /* snapped state pending flush to mds */ | 346 | struct list_head i_cap_snaps; /* snapped state pending flush to mds */ |
| 345 | struct ceph_snap_context *i_head_snapc; /* set if wr_buffer_head > 0 */ | 347 | struct ceph_snap_context *i_head_snapc; /* set if wr_buffer_head > 0 or |
| 348 | dirty|flushing caps */ | ||
| 346 | unsigned i_snap_caps; /* cap bits for snapped files */ | 349 | unsigned i_snap_caps; /* cap bits for snapped files */ |
| 347 | 350 | ||
| 348 | int i_nr_by_mode[CEPH_FILE_MODE_NUM]; /* open file counts */ | 351 | int i_nr_by_mode[CEPH_FILE_MODE_NUM]; /* open file counts */ |
| @@ -687,6 +690,8 @@ struct ceph_snap_realm { | |||
| 687 | 690 | ||
| 688 | struct list_head empty_item; /* if i have ref==0 */ | 691 | struct list_head empty_item; /* if i have ref==0 */ |
| 689 | 692 | ||
| 693 | struct list_head dirty_item; /* if realm needs new context */ | ||
| 694 | |||
| 690 | /* the current set of snaps for this realm */ | 695 | /* the current set of snaps for this realm */ |
| 691 | struct ceph_snap_context *cached_context; | 696 | struct ceph_snap_context *cached_context; |
| 692 | 697 | ||
| @@ -823,7 +828,8 @@ extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had); | |||
| 823 | extern void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr, | 828 | extern void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr, |
| 824 | struct ceph_snap_context *snapc); | 829 | struct ceph_snap_context *snapc); |
| 825 | extern void __ceph_flush_snaps(struct ceph_inode_info *ci, | 830 | extern void __ceph_flush_snaps(struct ceph_inode_info *ci, |
| 826 | struct ceph_mds_session **psession); | 831 | struct ceph_mds_session **psession, |
| 832 | int again); | ||
| 827 | extern void ceph_check_caps(struct ceph_inode_info *ci, int flags, | 833 | extern void ceph_check_caps(struct ceph_inode_info *ci, int flags, |
| 828 | struct ceph_mds_session *session); | 834 | struct ceph_mds_session *session); |
| 829 | extern void ceph_check_delayed_caps(struct ceph_mds_client *mdsc); | 835 | extern void ceph_check_delayed_caps(struct ceph_mds_client *mdsc); |
