Skip to content
Commit f592aa85 authored by Hai Zhang's avatar Hai Zhang
Browse files

Rewrite AtomicDirectory.

The previous version didn't close its FDs for directories, and called
fsync() on the wrong FDs. To make sure a rename() is persisted, we
need to call fsync() on the FD of the parent directory, because file
names are stored in directory entries instead of inodes.

Also removed the need for dedicated native code by calling the Os
class directly.

Fixes: 139302541
Bug: 138866253
Test: presubmit
Change-Id: I67fe98811814acba5158d760766a2ef3b121225a
parent fa3d2016
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment