> Well, the solution to this is a simple extension of the one I mentioned:
> pre-emptively allocate a block to the file when it is created. [... ]
>
> That will solve the common case above. The only difficult one is
> f=creat(name, ...); // f is now zero-length
> fstat(f,&st); // get the inode number
> close(f);
> stat(name,&st2); // oops... inode number just changed
This can happen on "normal" unix filesystems anyway. Imagine another
process that mucks with the file between the close and the final
stat() call. Wait, no, the other process doesn't have to wait for the
close() call, mixing fstat() and stat() can always give you different
results.
-wayne
-- Wayne Schlitt can not assert the truth of all statements in this article and still be consistent.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/