From: Wols Lists <antlists@youngman.org.uk>
To: "heming.zhao@suse.com" <heming.zhao@suse.com>,
linux-raid@vger.kernel.org
Cc: neilb@suse.com, jes@trained-monkey.org
Subject: Re: [PATCH v2] mdadm/Detail: show correct state for cluster-md array
Date: Sun, 26 Jul 2020 15:21:13 +0100 [thread overview]
Message-ID: <5F1D9159.1020200@youngman.org.uk> (raw)
In-Reply-To: <7aeb1f5a-df3c-183e-93cd-61631a40e9b5@suse.com>
On 26/07/20 10:22, heming.zhao@suse.com wrote:
> Hello Wols,
>
> I just started to learn mdadm code. Maybe there are some historical reasons to keep leaked issue.
> I guess your said daemon mode is: "mdadm --monitor --daemonise ...".
> After very quickly browsing the code in Monitor.c, these mode check /proc/mdstat, send ioctl GET_ARRAY_INFO, and
> read some /sys/block/mdX/md/xx files. There is no way to call ExamineBitmap().
> In currently mdadm code, the only way to call ExamineBitmap() is by cmd "mdadm -X /dev/sdX". So as my last mail said, when the mdadm program finish, all leaked memory will be released.
> And last week, before I send v2 patch, I try to use valgrind to check memory related issue, there are many places to leak. e.g.
You're learning the mdadm code? Personally, I find it hard to learn
stuff if there's no purpose behind what I'm studying. Treat it as a
learning exercise and fix all the leaks ;-)
As they say, if a job's worth doing it's worth doing well, and you can
learn what stuff is doing while you're working your way through it.
I need to learn my way around mdadm, and I've got a task in mind that'll
teach me a load of it, so all being well I'll soon be following in your
footsteps ...
Cheers,
Wol
prev parent reply other threads:[~2020-07-26 14:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 7:11 [PATCH v2] mdadm/Detail: show correct state for cluster-md array Zhao Heming
2020-07-22 7:20 ` heming.zhao
2020-07-26 8:14 ` Wols Lists
2020-07-26 9:22 ` heming.zhao
2020-07-26 14:21 ` Wols Lists [this message]
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=5F1D9159.1020200@youngman.org.uk \
--to=antlists@youngman.org.uk \
--cc=heming.zhao@suse.com \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.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).