Neil Brown wrote:
On Wed, 24 Feb 2010 09:54:17 -0500
Bill Davidsen <davidsen@xxxxxxx> wrote:
Neil Brown wrote:
md is not in a position to lock the page - there is simply no way it can stop
the filesystem from changing it.
The only thing it could do would be to make a copy, then write the copy out.
This would incur a performance cost.
Two thoughts on that - one is that for critical data, give me the option
at array start time, make the copy, slow the performance and make it
more consistent. My second thought is that a checksum of the page before
initiating write and after all writes are complete might be less of a
performance hit, and still could detect that the buffer had changed.
The idea of calculating a checksum before and after certainly has some merit,
if we could choose a checksum algorithm which was sufficiently strong and
sufficiently fast, though in many cases a large part of the cost would just be
bringing the page contents into cache - twice.
It has the advantage over copying the page of not needing to allocate extra
memory.
If someone wanted to try an prototype this and see how it goes, I'd be happy
to advise....
Disagree if you wish, but MD5 should be fine for this. While it is not
cryptographically strong on files, where the size can be changed and
evil doers can calculate values to add at the end of the data, it should
be adequate on data of unchanging size. It's cheap, fast, and readily
available.
--
Bill Davidsen <davidsen@xxxxxxx>
"We can't solve today's problems by using the same thinking we
used in creating them." - Einstein
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html