If there is no 3 and the server crashes just after 4, I don't think the rename() was guaranteed to have reached the disk.
OK, I understand.

If NetBSD doesn't support this, what other way is there to do it?
I don't know of a way of doing this. The problem probably is that metadata writes used to be synchronous on FFS from the beginning. However the goal was not to guarantee that any metadata change made it to persistent storage before the system call returned so the change would survive a crash. The goal was to always have the on-disk metadata in a state, which, if not consistent, could be brought to a consistent state by fsck. However, soft updates achieve this goal a different way so UFS with soft updates doesn't do those synchronous writes anymore.

I'll ask the question on tech-kern.

Reply via email to