You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by rd...@apache.org on 2022/10/31 07:31:50 UTC
[incubator-teaclave-sgx-sdk] branch v2.0.0-preview updated: Revert "Add fsync to flush and drop in tthe protectedfs" due to performance regression
This is an automated email from the ASF dual-hosted git repository.
rduan pushed a commit to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git
The following commit(s) were added to refs/heads/v2.0.0-preview by this push:
new 41225257 Revert "Add fsync to flush and drop in tthe protectedfs" due to performance regression
41225257 is described below
commit 4122525745a18da0422ef4aa9a1592aecf03902c
Author: volcano <vo...@163.com>
AuthorDate: Mon Oct 31 15:31:28 2022 +0800
Revert "Add fsync to flush and drop in tthe protectedfs" due to performance regression
---
sgx_protected_fs/ufs/src/lib.rs | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sgx_protected_fs/ufs/src/lib.rs b/sgx_protected_fs/ufs/src/lib.rs
index 0ccce906..4e304f01 100644
--- a/sgx_protected_fs/ufs/src/lib.rs
+++ b/sgx_protected_fs/ufs/src/lib.rs
@@ -110,12 +110,7 @@ impl HostFile {
}
pub fn flush(&mut self) -> OsResult {
- self.stream.flush()?;
- if unsafe { libc::fsync(self.fd) } == 0 {
- Ok(())
- } else {
- Err(errno())
- }
+ self.stream.flush()
}
pub fn size(&self) -> OsResult<usize> {
@@ -149,7 +144,6 @@ impl Drop for HostFile {
fn drop(&mut self) {
unsafe {
libc::flock(self.fd, libc::LOCK_UN);
- libc::fsync(self.fd);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org