From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Cc: linux-raid@vger.kernel.org, aleksey.obitotskiy@intel.com,
pawel.baldysiak@intel.com, artur.paszkiewicz@intel.com
Subject: Re: [PATCH] Monitor: release /proc/mdstat fd when no arrays present
Date: Thu, 21 Jul 2016 11:37:41 -0400 [thread overview]
Message-ID: <wrfjh9bjknne.fsf@redhat.com> (raw)
In-Reply-To: <1467702771-1375-1-git-send-email-tomasz.majchrzak@intel.com> (Tomasz Majchrzak's message of "Tue, 5 Jul 2016 09:12:51 +0200")
Tomasz Majchrzak <tomasz.majchrzak@intel.com> writes:
> If md kernel module is reloaded, /proc/mdstat cannot be accessed ("cat:
> /proc/mdstat: No such file or directory"). The reason is mdadm monitor
> still holds a file descriptor to previous /proc/mdstat instance. It
> leads to really confusing outcome of the following operations - mdadm
> seems to run without errors, however some udev rules don't get executed
> and new array doesn't work.
>
> Add a check if lseek was successful as it fails if md kernel module has
> been unloaded - close a file descriptor then. The problem is mdadm
> monitor doesn't always do it before next operation takes place. To
> prevent it monitor always releases /proc/mdstat descriptor when there
> are no arrays to be monitored, just in case driver unload happens in a
> moment.
>
> Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
> Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> ---
> Monitor.c | 2 ++
> mdstat.c | 6 +++++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
Looks good, applied!
Thanks,
Jes
prev parent reply other threads:[~2016-07-21 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 7:12 [PATCH] Monitor: release /proc/mdstat fd when no arrays present Tomasz Majchrzak
2016-07-21 15:37 ` Jes Sorensen [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=wrfjh9bjknne.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=aleksey.obitotskiy@intel.com \
--cc=artur.paszkiewicz@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=pawel.baldysiak@intel.com \
--cc=tomasz.majchrzak@intel.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