From: Xiubo Li <xiubli@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: idryomov@gmail.com, ukernel@gmail.com, pdonnell@redhat.com,
ceph-devel@vger.kernel.org
Subject: Re: [PATCH] ceph: fix incorrectly counting the export targets
Date: Mon, 30 Aug 2021 20:48:07 +0800 [thread overview]
Message-ID: <3e1d0567-e334-e190-7a9a-28ea744b7ee9@redhat.com> (raw)
In-Reply-To: <4b2691ea8c503fcd0e1b25a61155bca8fe0cc2fd.camel@kernel.org>
On 8/30/21 8:45 PM, Jeff Layton wrote:
> On Mon, 2021-08-30 at 20:33 +0800, xiubli@redhat.com wrote:
>> From: Xiubo Li <xiubli@redhat.com>
>>
>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>> ---
>> fs/ceph/mds_client.c | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
>> index 7ddc36c14b92..aa0ab069db40 100644
>> --- a/fs/ceph/mds_client.c
>> +++ b/fs/ceph/mds_client.c
>> @@ -4434,7 +4434,7 @@ static void check_new_map(struct ceph_mds_client *mdsc,
>> struct ceph_mdsmap *newmap,
>> struct ceph_mdsmap *oldmap)
>> {
>> - int i, err;
>> + int i, j, err;
>> int oldstate, newstate;
>> struct ceph_mds_session *s;
>> unsigned long targets[DIV_ROUND_UP(CEPH_MAX_MDS, sizeof(unsigned long))] = {0};
>> @@ -4443,8 +4443,10 @@ static void check_new_map(struct ceph_mds_client *mdsc,
>> newmap->m_epoch, oldmap->m_epoch);
>>
>> if (newmap->m_info) {
>> - for (i = 0; i < newmap->m_info->num_export_targets; i++)
>> - set_bit(newmap->m_info->export_targets[i], targets);
>> + for (i = 0; i < newmap->m_num_active_mds; i++) {
>> + for (j = 0; j < newmap->m_info[i].num_export_targets; j++)
>> + set_bit(newmap->m_info[i].export_targets[j], targets);
>> + }
>> }
>>
>> for (i = 0; i < oldmap->possible_max_rank && i < mdsc->max_sessions; i++) {
> Looks sane. I'll plan to fold this into "ceph: reconnect to the export
> targets on new mdsmaps".
Wait, I have sent the V2 to fix:
- s/m_num_active_mds/possible_max_rank/
Thanks.
>
> Thanks,
next prev parent reply other threads:[~2021-08-30 12:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 12:33 [PATCH] ceph: fix incorrectly counting the export targets xiubli
2021-08-30 12:45 ` Jeff Layton
2021-08-30 12:48 ` Xiubo Li [this message]
2021-08-30 12:53 ` Xiubo Li
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=3e1d0567-e334-e190-7a9a-28ea744b7ee9@redhat.com \
--to=xiubli@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=pdonnell@redhat.com \
--cc=ukernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).