6-4 Sun StorEdge 5310 NAS Troubleshooting Guide December 2004
FIGURE6-2 The Copy-On-Write Mechanism for Checkpoints
6.1.2.2 Active Checkpoint
Each CFS has a mapping function for all of the blocks on LFS. This mapping
function returns a value for each page of LFS. Currently, there can be no more than
16 active checkpoints on a filesystem. This means the checkpoint filesystem can hold
at most 16 mappings for each block. Also not all of the blocks in the LFS are
mapped. Block allocation table and journaling area are not mapped and
checkpointed.
Active checkpoints have a stack-like structure and each checkpoint uses the mapping
of itself. If there is no mapping, it will use the mapping for the next checkpoint
created after it (this selection of proper mapping is handled by the mapping
function). If none of the entries have a mapping, this implies the file system block
has never been modified since the creation of oldest checkpoint - in this case the
block address will be mapped to itself.
When a new checkpoint is created, a new directory entry is added to the list of
checkpoints in checkpoint control page. Also, an available slot in the checkpoint
stack is assigned to this newly-created checkpoint. After doing this, the new
checkpoint becomes the owner of the corresponding entry in mapping entries for all
blocks of the file system. The entire operation is performed in a single transaction
and is instantaneous. As soon as a new checkpoint is created, the checkpoint entry
becomes available and can be used for all read-only file system operations. There is
no partial state visible from other file system users.
a.
ckpti-2 ckpti-1 ck
p
t
i
ck
p
t
i+1
Filesystem
image
Mappin
g
s
for block n
n Filesystem
image
n
m p
m p