From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: sage@inktank.com, ceph-devel@vger.kernel.org
Cc: "Yan, Zheng" <zheng.z.yan@intel.com>
Subject: [PATCH V2 1/2] mds: Fix SessionMap::is_any_state()
Date: Mon, 24 Sep 2012 19:27:08 +0800 [thread overview]
Message-ID: <1348486029-1125-1-git-send-email-zheng.z.yan@intel.com> (raw)
From: "Yan, Zheng" <zheng.z.yan@intel.com>
is_any_state() should return false when the by_state list is empty.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
src/mds/SessionMap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h
index fcd0b47..6bca361 100644
--- a/src/mds/SessionMap.h
+++ b/src/mds/SessionMap.h
@@ -248,7 +248,7 @@ public:
bool is_any_state(int state) {
map<int,xlist<Session*>* >::iterator p = by_state.find(state);
- if (p == by_state.end())
+ if (p == by_state.end() || p->second->empty())
return false;
return true;
}
--
1.7.11.4
next reply other threads:[~2012-09-24 11:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 11:27 Yan, Zheng [this message]
2012-09-24 11:27 ` [PATCH V2 2/2] mds: Adjust mydir auth when starting MDS that was stopped cleanly Yan, Zheng
2012-09-24 16:40 ` Sage Weil
2012-09-24 16:40 ` [PATCH V2 1/2] mds: Fix SessionMap::is_any_state() Sage Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348486029-1125-1-git-send-email-zheng.z.yan@intel.com \
--to=zheng.z.yan@intel.com \
--cc=ceph-devel@vger.kernel.org \
--cc=sage@inktank.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.