Daniel Taylor wrote:
--- On Fri, 1/8/08, Michael Neumann <[EMAIL PROTECTED]> wrote:
fd = open(file); // behaves like START TRANSACTION
read(fd, ...);
write(fd, ...);
close(fd); // behaves like COMMIT
If you want a commit on close, fsync() the file just before you close() it.
That's not what I want. fsync only guarantees that the data is stored
permanently. That's not my problem. I want to ensure that some
write-operations are performed either-all-or-nothing.
That would be fine except that it would give me a new inode
number, and
the inode number is right now the only way to associate
further data
with a file.
Why do you care if you get a new inode vs multiple versions of the same inode?
Hammer doesn't reuse inode numbers. So inode numbers could be used as
unique id's to refer to that file (like a ROWID or OID in a database).
Regards,
Michael