Skip to content

Commit

Permalink
ceph: prevent dup stale messages to console for restarting mds
Browse files Browse the repository at this point in the history
Prevent duplicate 'mds0 caps stale' message from spamming the console every
few seconds while the MDS restarts.  Set s_renew_requested earlier, so that
we only print the message once, even if we don't send an actual request.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Mar 23, 2010
1 parent efd7576 commit e4cb4cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ static int send_renew_caps(struct ceph_mds_client *mdsc,
if (time_after_eq(jiffies, session->s_cap_ttl) &&
time_after_eq(session->s_cap_ttl, session->s_renew_requested))
pr_info("mds%d caps stale\n", session->s_mds);
session->s_renew_requested = jiffies;

/* do not try to renew caps until a recovering mds has reconnected
* with its clients. */
Expand All @@ -875,7 +876,6 @@ static int send_renew_caps(struct ceph_mds_client *mdsc,

dout("send_renew_caps to mds%d (%s)\n", session->s_mds,
ceph_mds_state_name(state));
session->s_renew_requested = jiffies;
msg = create_session_msg(CEPH_SESSION_REQUEST_RENEWCAPS,
++session->s_renew_seq);
if (IS_ERR(msg))
Expand Down

0 comments on commit e4cb4cb

Please sign in to comment.