Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188583
b: refs/heads/master
c: 07bd10f
h: refs/heads/master
i:
  188581: 9fdfab9
  188579: 4b33818
  188575: e952cf4
v: v3
  • Loading branch information
Sage Weil committed Oct 16, 2009
1 parent d3a3e3b commit a5e7ac7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afcdaea3f2a78ce4873bd7e98a6d603bda23d167
refs/heads/master: 07bd10fb9853a41a7f0bb271721cca97d15eccae
5 changes: 5 additions & 0 deletions trunk/fs/ceph/ceph_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ struct ceph_mon_subscribe_item {
__u8 onetime;
} __attribute__ ((packed));

struct ceph_mon_subscribe_ack {
__le32 duration; /* seconds */
struct ceph_fsid fsid;
} __attribute__ ((packed));

/*
* mds states
* > 0 -> in
Expand Down
11 changes: 7 additions & 4 deletions trunk/fs/ceph/mon_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,12 @@ static void handle_subscribe_ack(struct ceph_mon_client *monc,
struct ceph_msg *msg)
{
unsigned seconds;
void *p = msg->front.iov_base;
void *end = p + msg->front.iov_len;
struct ceph_mon_subscribe_ack *h = msg->front.iov_base;

if (msg->front.iov_len < sizeof(*h))
goto bad;
seconds = le32_to_cpu(h->duration);

ceph_decode_32_safe(&p, end, seconds, bad);
mutex_lock(&monc->mutex);
if (monc->hunting) {
pr_info("mon%d %s session established\n",
Expand Down Expand Up @@ -541,7 +543,8 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
err = ceph_msgpool_init(&monc->msgpool_mount_ack, 4096, 1, false);
if (err < 0)
goto out;
err = ceph_msgpool_init(&monc->msgpool_subscribe_ack, 8, 1, false);
err = ceph_msgpool_init(&monc->msgpool_subscribe_ack,
sizeof(struct ceph_mon_subscribe_ack), 1, false);
if (err < 0)
goto out;
err = ceph_msgpool_init(&monc->msgpool_statfs_reply,
Expand Down

0 comments on commit a5e7ac7

Please sign in to comment.