From: NeilBrown <neilb@suse.de>
To: "Orlowski, Lukasz" <lukasz.orlowski@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: mdadm r/w operations without TEMP_FAILURE_RETRY()
Date: Tue, 18 Oct 2011 20:30:16 +1100 [thread overview]
Message-ID: <20111018203016.4536708f@notabene.brown> (raw)
In-Reply-To: <2AC2FDB9F3686F48962B2B65E2040CCC3D155FA0@irsmsx503.ger.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
On Tue, 18 Oct 2011 10:16:41 +0100 "Orlowski, Lukasz"
<lukasz.orlowski@intel.com> wrote:
> Hi,
>
> I was going through mdadm code and got to realize that r/w operations are invoked without TEMP_FAILURE_RETRY() macro, which protects from unexpected operation termination, case SIGINT is thrown. According to my knowledge its POSIX best-practice to call the r/w operations within that macro, lest some sporadic unexpected behaviors occur.
>
> Any particular reason for not using it?
I've never heard of TEMP_FAILURE_RETRY.
And having looked in to it I would certainly try to avoid using it.
If the SA_RESTART flag is set with sigaction() then it should be totally
unnecessary.
mdadm doesn't use signals much - only in mdmon.
It probably would make sense to set SA_RESTART when setting up those signals.
But SIGINT is not a problem because mdadm doesn't catch it. If SIGINT was
set, mdadm would simply exit. Whatever operation was happening at the time
wouldn't see a TEMP_FAILURE that is worth RETRYing. Rather the whole process
would die.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next parent reply other threads:[~2011-10-18 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2AC2FDB9F3686F48962B2B65E2040CCC3D155FA0@irsmsx503.ger.corp.intel.com>
2011-10-18 9:30 ` NeilBrown [this message]
2011-10-25 17:29 ` mdadm r/w operations without TEMP_FAILURE_RETRY() Michal Soltys
2011-10-25 21:28 ` NeilBrown
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=20111018203016.4536708f@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=lukasz.orlowski@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;
as well as URLs for NNTP newsgroup(s).