Imagine A and B to be the steps of a journaling operation.
data = ordered mode
A) Write data to FS on disk
B) Write metadata to journal
For data = writeback mode
the above steps - A) and B) could switch order.
So you could have the following:
A) write meta data to journal first and then
B) write data to FS on disk
OR
A) write data to FS on disk first and then
B) write metadata to journal.
(since the order is not guranteed in data=writeback mode)
Now imagine a reboot/crash/kernel lockup occurring in between steps A and B
A)
CRASH
B) cannot take place because of the crash.
Now look at data = ordered mode. Since data is always first written to disk before writing the metadata, you always have the most current data on disk. Hence data = ordered gurantees that you will never have stale data on disk.
Whereas for data=writeback mode, when the metadata is written first and you crash before writing the data to fs, this is what happens:
You have stale data, but updated metadata. So what can now happen is, you still read old data and this could be
a security threat (since the user does not expect this behavior) .
However, such a threat does not exist in data=ordered mode. Hence the default mount time option should rightly be data=ordered instead of data = writeback. Change the compile time option accordingly to reflect this change.
Binary package hint: linux-source-2.6.15
Imagine A and B to be the steps of a journaling operation.
data = ordered mode
A) Write data to FS on disk
B) Write metadata to journal
For data = writeback mode
the above steps - A) and B) could switch order.
So you could have the following:
A) write meta data to journal first and then
B) write data to FS on disk
OR
A) write data to FS on disk first and then
B) write metadata to journal.
(since the order is not guranteed in data=writeback mode)
Now imagine a reboot/crash/kernel lockup occurring in between steps A and B
A)
CRASH
B) cannot take place because of the crash.
Now look at data = ordered mode. Since data is always first written to disk before writing the metadata, you always have the most current data on disk. Hence data = ordered gurantees that you will never have stale data on disk.
Whereas for data=writeback mode, when the metadata is written first and you crash before writing the data to fs, this is what happens:
You have stale data, but updated metadata. So what can now happen is, you still read old data and this could be
a security threat (since the user does not expect this behavior) .
However, such a threat does not exist in data=ordered mode. Hence the default mount time option should rightly be data=ordered instead of data = writeback. Change the compile time option accordingly to reflect this change.