Re: [PATCH 2/2] imsm: FIX: Be more patient during loading matadata

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

 



On 4/14/2011 1:08 AM, NeilBrown wrote:
Why does this existing check:

                /* retry the load if we might have raced against mdmon */
                 if (err == 3&&  mdmon_running(devnum))
                         for (retry = 0; retry<  3; retry++) {
                                 usleep(3000);
                                 err = load_and_parse_mpb(dfd, s, NULL, 1);
                                 if (err != 3)
                                         break;
                         }

It's pretty horrible that we need to do this, isn't it?

Yes.

Maybe we need some way to synchronise with mdmon so we *know* if we have
raced or not.
i.e. mdmon keeps a count of the number of times it has updated the metadata.
We send a message to get the count, read, then get the count again.
The request blocks while mdmon is actually writing.
If the counts are different, we read again.
??

Assuming we are only racing against dirty transitions maybe it is enough to poll md/array_state and if it signaled while reading the metadata we likely need to try again (of course with an intervening ping_monitor)?

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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