From: NeilBrown <nfbrown@novell.com>
To: Artur Paszkiewicz <artur.paszkiewicz@intel.com>,
linux-raid@vger.kernel.org
Subject: Re: [PATCH 1/2] imsm: use timeout when waiting for reshape progress
Date: Thu, 07 Jan 2016 11:11:31 +1100 [thread overview]
Message-ID: <87h9iq9rkc.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <1452010576-10733-1-git-send-email-artur.paszkiewicz@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]
On Wed, Jan 06 2016, Artur Paszkiewicz wrote:
> Waiting for reshape progress is done by using select() on sync_completed
> to block until an exception condition is signalled on the
> filedescriptor. This happens when the attribute's value is updated by
> the kernel, but if the array is stopped when mdadm is blocked on
> select() this will never happen, because this attribute is then removed
> and apparently the kernel doesn't do sysfs_notify() when removing a
> sysfs attribute. So set a 3 second timeout for the sysfs_wait() call.
I wonder if we should fix that in the kernel somehow...
I've applied this patch and the following one - thanks.
NeilBrown
>
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> ---
> super-intel.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 98fe835..68cc8d6 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -10297,7 +10297,8 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
>
> do {
> char action[20];
> - sysfs_wait(fd, NULL);
> + int timeout = 3000;
> + sysfs_wait(fd, &timeout);
> if (sysfs_get_str(sra, NULL, "sync_action",
> action, 20) > 0 &&
> strncmp(action, "reshape", 7) != 0) {
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
prev parent reply other threads:[~2016-01-07 0:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 16:16 [PATCH 1/2] imsm: use timeout when waiting for reshape progress Artur Paszkiewicz
2016-01-05 16:16 ` [PATCH 2/2] imsm: don't update migration record when reshape is interrupted Artur Paszkiewicz
2016-01-07 0:11 ` NeilBrown [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=87h9iq9rkc.fsf@notabene.neil.brown.name \
--to=nfbrown@novell.com \
--cc=artur.paszkiewicz@intel.com \
--cc=linux-raid@vger.kernel.org \
/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).