Erik Trimble wrote:
The developers can answer this definitively, but I believe the answer
to your questions is NO. That is, if there is anything in the buffer
waiting to be written when a snapshot request comes along, the buffer
is written out so that the file is consistent with the last write().
So, snapshotting should NEVER cause a file corruption in this matter.
That said, if you are doing the following:
1. App issues write() for data A
2. snapshot request
3. App issues write for data B
Then yes, the snapshot file will only contain data A, and not data B,
which might lead to an inconsistency in the app's behavior, if both A
and B were important to be written together.
Yes, this is what I was talking about.
But if that were the case, then the app should have written A and B
atomically.
And how realistic is that? You are suggesting, for example, that every
application that writes an XML file should buffer the _entire_ XML
stream in memory and issue a single atomic write of that entire
document. That's not realistic, and in some cases not even possible.
Otherwise, uh, we better fix sed then :-)
--joe
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss