On Tue, Oct 25, 2011 at 02:25:23PM +0200, Christian Engelmayer wrote: > >> Sounds like this bug report belongs on LKML or the bug tracker for > >> these filesystems... > > You are right that applications normally shall not cover up file system > design issues. In this case also have a look on the Linux man page on > rename(): > > However, when overwriting there will probably be a window in which both > oldpath and newpath refer to the file being renamed. > > Regardless of the steps leading to the problematic condition - file system > behaviour after power loss or malicious manipulation - the 'goto repopen' > construct in log_locally() leads to trouble in case the assumptions on > rename during the file rotation do not hold as expected. > > In my opinion the proposed patch introducing the additional call to > unlink() does not harm the common case, but makes the code more robust > with the smallest possible changeset.
I'm undecided on its merits at this point, but isn't it possible that your proposed patch deletes a newly-created file even in the absence of power failure issues?? Rich _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
