A system and method for storing data. In one embodiment, a file system
stores data including associated metadata. In response to detecting that
a file system error has occurred, the file system identifies a container
including data in which the error occurred and performs a consistency
check of the data included in the container. If a bidirectional link
exists between the container and another container and if an error is
found in the bidirectional link, the file system performs a consistency
check of data included in the other container and determines if another
bidirectional link exists between the other container and a third
container. If another bidirectional link exists between the other
container and a third container and if an error is found in the other
bidirectional link, the file system performs a consistency check of data
included in the third container.