DragonFly users List (threaded) for 2008-08
[Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Hammer: Transactional file updates
Hi,
So Hammer does not guarantee "transctional consistency" of data in case
of a crash, only that of meta-data, right?
Is there a method to guarantee the write to be transactional, so that
I either have the previous "version" of the file or the version that I
wrote? Like this:
fd = open(file); // behaves like START TRANSACTION
read(fd, ...);
write(fd, ...);
close(fd); // behaves like COMMIT
That would be incredible cool (and very useful!) and could play well due
to Hammers historical nature.
I know I could probably solve this issue by creating a new file,
fsyncing it and then doing a "rm old_file; mv new_file old_file" (or
something like that), but that would give me a new inode number, which
I'd like to avoid.
Regards,
Michael
[Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]