diff options
author | Jeff Layton <jlayton@redhat.com> | 2017-04-13 18:07:04 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-05-04 10:19:21 +0300 |
commit | 92475f05bdb6daefce3f55f46551153e7ed05f45 (patch) | |
tree | dee77a889f3dee44d2441bb50430f24c98a6d8ea /fs/ceph/mds_client.h | |
parent | 58eb7932ae4d671d2a2377a1779eda96a2789b11 (diff) | |
download | linux-92475f05bdb6daefce3f55f46551153e7ed05f45.tar.xz |
ceph: handle epoch barriers in cap messages
Have the client store and update the osdc epoch_barrier when a cap
message comes in with one.
When sending cap messages, send the epoch barrier as well. This allows
clients to inform servers that their released caps may not be used until
a particular OSD map epoch.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: "Yan, Zhengā€¯ <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r-- | fs/ceph/mds_client.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 3e67dd2169fa..db57ae98ed34 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -106,10 +106,13 @@ struct ceph_mds_reply_info_parsed { /* * cap releases are batched and sent to the MDS en masse. + * + * Account for per-message overhead of mds_cap_release header + * and __le32 for osd epoch barrier trailing field. */ -#define CEPH_CAPS_PER_RELEASE ((PAGE_SIZE - \ +#define CEPH_CAPS_PER_RELEASE ((PAGE_SIZE - sizeof(u32) - \ sizeof(struct ceph_mds_cap_release)) / \ - sizeof(struct ceph_mds_cap_item)) + sizeof(struct ceph_mds_cap_item)) /* |