]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
libceph: initialize last_linger_id with a large integer
authorIlya Dryomov <idryomov@gmail.com>
Tue, 8 Nov 2016 14:15:24 +0000 (15:15 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 10 Nov 2016 19:13:08 +0000 (20:13 +0100)
osdc->last_linger_id is a counter for lreq->linger_id, which is used
for watch cookies.  Starting with a large integer should ease the task
of telling apart kernel and userspace clients.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
include/linux/ceph/osd_client.h
net/ceph/osd_client.c

index 96337b15a60d59cd12e342b101d70efc1cd380d1..a8e66344bacc225642acc872c614b3017c314218 100644 (file)
@@ -258,6 +258,8 @@ struct ceph_watch_item {
        struct ceph_entity_addr addr;
 };
 
+#define CEPH_LINGER_ID_START   0xffff000000000000ULL
+
 struct ceph_osd_client {
        struct ceph_client     *client;
 
index d9bf7a1d0a583730a9f4c7376102d1ce5694f66f..e6ae15bc41b74dfc96e9d967139367b4ad3be952 100644 (file)
@@ -4094,6 +4094,7 @@ int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client)
        osd_init(&osdc->homeless_osd);
        osdc->homeless_osd.o_osdc = osdc;
        osdc->homeless_osd.o_osd = CEPH_HOMELESS_OSD;
+       osdc->last_linger_id = CEPH_LINGER_ID_START;
        osdc->linger_requests = RB_ROOT;
        osdc->map_checks = RB_ROOT;
        osdc->linger_map_checks = RB_ROOT;