Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188629
b: refs/heads/master
c: 0dc2570
h: refs/heads/master
i:
  188627: 9c552a8
v: v3
  • Loading branch information
Sage Weil committed Nov 20, 2009
1 parent 7bc874f commit bb8fd52
Show file tree
Hide file tree
Showing 2 changed files with 18 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: dc14657c9c946f25b84a98e9ffa41b812a70699e
refs/heads/master: 0dc2570fab222affe7739b88b5ed04c511d433dc
21 changes: 17 additions & 4 deletions trunk/fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,24 @@ static void remove_session_caps(struct ceph_mds_session *session)
static int wake_up_session_cb(struct inode *inode, struct ceph_cap *cap,
void *arg)
{
wake_up(&ceph_inode(inode)->i_cap_wq);
struct ceph_inode_info *ci = ceph_inode(inode);

wake_up(&ci->i_cap_wq);
if (arg) {
spin_lock(&inode->i_lock);
ci->i_wanted_max_size = 0;
ci->i_requested_max_size = 0;
spin_unlock(&inode->i_lock);
}
return 0;
}

static void wake_up_session_caps(struct ceph_mds_session *session)
static void wake_up_session_caps(struct ceph_mds_session *session,
int reconnect)
{
dout("wake_up_session_caps %p mds%d\n", session, session->s_mds);
iterate_session_caps(session, wake_up_session_cb, NULL);
iterate_session_caps(session, wake_up_session_cb,
(void *)(unsigned long)reconnect);
}

/*
Expand Down Expand Up @@ -794,6 +804,8 @@ static int send_renew_caps(struct ceph_mds_client *mdsc,

/*
* Note new cap ttl, and any transition from stale -> not stale (fresh?).
*
* Called under session->s_mutex
*/
static void renewed_caps(struct ceph_mds_client *mdsc,
struct ceph_mds_session *session, int is_renew)
Expand Down Expand Up @@ -822,7 +834,7 @@ static void renewed_caps(struct ceph_mds_client *mdsc,
spin_unlock(&session->s_cap_lock);

if (wake)
wake_up_session_caps(session);
wake_up_session_caps(session, 0);
}

/*
Expand Down Expand Up @@ -2248,6 +2260,7 @@ static void check_new_map(struct ceph_mds_client *mdsc,
pr_info("mds%d reconnect completed\n", s->s_mds);
kick_requests(mdsc, i, 1);
ceph_kick_flushing_caps(mdsc, s);
wake_up_session_caps(s, 1);
}
}
}
Expand Down

0 comments on commit bb8fd52

Please sign in to comment.