Re: [PATCH v6 04/11] md/r5cache: caching mode of r5cache

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

 



> 
>> 
>>>>> @@ -1547,6 +1611,7 @@ ops_run_biodrain(struct stripe_head *sh, struct dma_async_tx_descriptor *tx)
>>>>> 
>>>>> again:
>>>>> 			dev = &sh->dev[i];
>>>>> +			clear_bit(R5_InJournal, &dev->flags);
>>>> 
>>>> why clear the bit here? isn't this bit cleared when the stripe is initialized?
>>> 
>>> This is necessary when we rewrite a page that is already in journal. This means there is new data coming to 
>>> this stripe and dev, so we should not consider the page is secured in journal. 
>> 
>> This sounds suggest we should clear the bit after writeout is done.
> 
> That may also work. Let me confirm. 
> 

I think we still need clear R5_InJournal in ops_run_biodrain(). r5l_write_stripe() and r5l_log_stripe() uses 
R5_InJournal as a flag of "no need to write journal again". If we do not clear R5_InJournal in 
ops_run_biodrain(), newer data will not be written to journal. 

Thanks,
Song

--
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