Re: [PATCH v6 03/11] md/r5cache: State machine for raid5-cache write back mode

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

 



> This bothers me.  Why would a stripe *ever* be in "caching mode" (or
> "caching phase") when the array is in write-through?  It doesn't seem to
> make sense.

I was thinking about replacing STRIPE_R5C_WRITE_OUT with something
like STRIPE_R5C_CACHING. So that:

caching-phase is STRIPE_R5C_CACHING == 1
write-out phase is STRIPE_R5C_CACHING == 0 

In this case, stripes in write-through mode will always have 
STRIPE_R5C_CACHING == 0. 

This requires some changes to current state machine, but it might work out. 

How do you like this? 


> There are two actions that can be taken when where are ->towrite blocks
> on a stripe.  We can enter WRITE_OUT, or they can be cached in the
> journal.  Also we can enter WRITE_OUT when a stripe needs to be removed
> From memory or from the journal.
> This makes "writeout" and "cache" seem more like "actions" than states,
> modes, or phases.  Naming is hard.

Yes, it is more like action. We used to name it as "modes" as different *mode*
handles writes with different *action*. So at end of the day, it doesn't really 
matter?

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