aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-11-24 01:43:46 -0500
committerYan, Zheng <zheng.z.yan@intel.com>2014-01-21 03:30:28 -0500
commit4ee6a914edbbd2543884f0ad7d58ea471136be32 (patch)
tree459a9db93b394a25317c8ab29338668a0973d57c /include
parent186e4f7a4b1883f3f46aa15366c0bcebc28fdda7 (diff)
ceph: remove exported caps when handling cap import message
Version 3 cap import message includes the ID of the exported caps. It allow us to remove the exported caps if we still haven't received the corresponding cap export message. We remove the exported caps because they are stale, keeping them can compromise consistence. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ceph/ceph_fs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index 26bb587deb78..0a37b989b52f 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -459,7 +459,8 @@ struct ceph_mds_reply_cap {
459 __u8 flags; /* CEPH_CAP_FLAG_* */ 459 __u8 flags; /* CEPH_CAP_FLAG_* */
460} __attribute__ ((packed)); 460} __attribute__ ((packed));
461 461
462#define CEPH_CAP_FLAG_AUTH 1 /* cap is issued by auth mds */ 462#define CEPH_CAP_FLAG_AUTH (1 << 0) /* cap is issued by auth mds */
463#define CEPH_CAP_FLAG_RELEASE (1 << 1) /* release the cap */
463 464
464/* inode record, for bundling with mds reply */ 465/* inode record, for bundling with mds reply */
465struct ceph_mds_reply_inode { 466struct ceph_mds_reply_inode {
@@ -660,6 +661,14 @@ struct ceph_mds_caps {
660 __le32 time_warp_seq; 661 __le32 time_warp_seq;
661} __attribute__ ((packed)); 662} __attribute__ ((packed));
662 663
664struct ceph_mds_cap_peer {
665 __le64 cap_id;
666 __le32 seq;
667 __le32 mseq;
668 __le32 mds;
669 __u8 flags;
670} __attribute__ ((packed));
671
663/* cap release msg head */ 672/* cap release msg head */
664struct ceph_mds_cap_release { 673struct ceph_mds_cap_release {
665 __le32 num; /* number of cap_items that follow */ 674 __le32 num; /* number of cap_items that follow */