On 06/15/2011 09:01 PM, Toby Thain wrote:
I know I've certainly had many situations where people wanted to
snapshot or
rev individual files everytime they're modified. As I said - perfect
example is Google Docs. Yes it is useful. But no, it's not what ZFS
does.
Exactly versions of a whole file, but that is different to a snapshot on
every write.
How you interpret "on every write" depends on where in the stack you are
coming from. If you think about an application a "write" is whey you
save the document but at the ZPL layer that is multiple write(2) calls
and maybe even some rename(2)/unlink(2)/close(2) calls as well.
That's one big problem with the naive plan of using snapshots.
Another one is that snapshots are per-filesystem, while the intention
here is to capture a document in one user session. Taking a snapshot
will of course say nothing about the state of other user sessions. Any
document in the process of being saved by another user, for example,
will be corrupt.
Would it be? I think that's pretty lame for ZFS to corrupt data. If I
were to manually create a snapshot and two users were writing to the FS,
how would ZFS handle that? Are you saying it would corrupt the data? I
thought snapshots could be taken regardless of if there is activity.
If I monitor (via Dtrace?) for what equates to a "save", would that be
sufficient? If It's particular sequence, then should it not be able to
be monitored for? Since it is a NAS, only one or two daemons will be
writing to the particular FS. I can get expected behaviour from these
daemons.
If it really is a retarded idea, at least with the current FSs
available, then I'll just use SVN and manage the repos somehow. I just
thought I'd see if it's an option.
Anyone know how Google Docs does it?
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss