> 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