Re: [PATCH v5 7/8] md/r5cache: r5c recovery

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

 



On Sat, Oct 22 2016, Song Liu wrote:

>>> +	/* stripes only have parity are already flushed to RAID */
>>> +	if (data_count == 0)
>>> +		goto out;
>> 
>> Can you explain why that is?  When were they flushed to the RAID, and
>> how was the parity determined?
>
> It happens like this: say two stripes on journal: 100 and 200. The data (D)
> and parity (P) pages are store in journal as:
>
>       --->  D100   D200   P100  P200 ---->  newer data
>
> Before we flush D100, journal_start points as D100. Then we flush D100, 
> and new journal_start points as D200. Now the system fails, so next 
> recovery starts from D200. Recovery code will find stripe 100 only has
> parity. This means, stripe 100 is already flushed to raid. so we can ignore it. 

OK, I see.  Thanks.

So the data for the stripe had previously been flushed before the crash
that is currently being recovered from.  It might help to make the time
of the flush more explicit in the comment:

   /* stripes that only have parity must have been flushed
    * before the crash that we are now recovering from, so
    * there is nothing more to recovery.
    */

Something like that.

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