summaryrefslogtreecommitdiffstats
path: root/dalvik
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-03-17 12:13:09 -0700
committerElliott Hughes <enh@google.com>2011-03-17 14:00:22 -0700
commit52724d3ebd4ccaaa4b9f5576e329d4272cde8ea9 (patch)
treee2895b08e51a2ffed5ffd39f9b7b3bda794f6425 /dalvik
parentddfdbb9d172fe9b72e08e8d7deab0aa3b8acf044 (diff)
downloadlibcore-52724d3ebd4ccaaa4b9f5576e329d4272cde8ea9.zip
libcore-52724d3ebd4ccaaa4b9f5576e329d4272cde8ea9.tar.gz
libcore-52724d3ebd4ccaaa4b9f5576e329d4272cde8ea9.tar.bz2
Add fsync(2) and fdatasync(2).
Interesting parts to this change: * first BlockGuard support (and general delegation support). * first rethrowing of ErrnoException as IOException. * switching FileChannelImpl from int to FileDescriptor. The special case in FileDescriptor.sync has been removed. Testing with the RI showed that it doesn't treat syncing a FileDescriptor that corresponds to a socket as a special case --- it throws SyncFailedException just like normal. Bug: 3107501 Change-Id: I99faf120bd802aec0397a79772ed38c5e1542fed
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/system/BlockGuard.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java
index d2d6862..6e333dc 100644
--- a/dalvik/src/main/java/dalvik/system/BlockGuard.java
+++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java
@@ -215,11 +215,6 @@ public final class BlockGuard {
return mFileSystem.seek(fileDescriptor, offset, whence);
}
- public void fsync(int fileDescriptor, boolean metadata) throws IOException {
- BlockGuard.getThreadPolicy().onWriteToDisk();
- mFileSystem.fsync(fileDescriptor, metadata);
- }
-
public void truncate(int fileDescriptor, long size) throws IOException {
BlockGuard.getThreadPolicy().onWriteToDisk();
mFileSystem.truncate(fileDescriptor, size);