A method for data journaling includes writing data into at least one block in
a
journal storage area, and marking each written block as dirty. If the number of
blocks in the journal storage area marked as dirty is greater than the number of
blocks in a corresponding data storage area that have been used and whose corresponding
blocks in the journal storage area are not marked as dirty, then those used blocks
are copied to the corresponding blocks in the journal storage area, and a message
is transmitted instructing a meta-data server to swap the data storage area and
the journal storage area. If this condition is not so, the blocks in the journal
storage area marked as dirty are copied to corresponding blocks in the data storage
area, and a message is transmitted instructing the meta-data server to commit the
data stored in the journal storage area.