Re: mdadm r/w operations without TEMP_FAILURE_RETRY()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Oct 2011 10:16:41 +0100 "Orlowski, Lukasz"
<lukasz.orlowski@xxxxxxxxx> 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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux