As I mentioned, you can keep state in the disk as an echo of the diskPair. If you don't mind a small delay after constructing the pair, then you can just rely on the copy in the disk structure and never refer to the version in the diskPair.
The other transitions that you describe can easily be implemented on that same basis. On Tue, Mar 30, 2010 at 12:22 AM, zd.wbh <zd....@163.com> wrote: > It is in the situation 2, it's important to keep a disk in only one > diskPair.Your suggested flow would fit. But it's best to keep the state with > the disk rather than diskPair. When one disk goes bad, pick a HOTSPARE state > disk, change the state to DUMPING, begin to copy data from the other disk of > the pair, when data ready, update state to ONLINE to serve clients. >