fsync Questions
3
Solved
"what exactly the python's file.flush() is doing?" says you should first f.flush() and then os.fsync(f.fileno()) to make sure the data are written to the disk.
Furthermore, "does clo...
1
Solved
Context
With the goal in mind to explore the domain of data persistence, I am trying to write a (very) simple networked service:
A client sends some data to a server.
The server writes the data to...
3
Is there an alternative to fsync for windows? (C++ builder)
Fsync required to include unistd.h and it's only for unix systems
Thanks!
3
Solved
I'm worried that I see through the disk LED and iotop quite some write activity every couple of seconds, mostly coming from the chromium's processes, on a completely idle system.
It doesn't make a...
Outspread asked 28/12, 2016 at 14:16
4
Solved
I know there are already similar questions and I gave them a look but I couldn't find an explicit univocal answer to my question. I was just investigating online about these functions and their rel...
Mendicant asked 12/5, 2015 at 9:14
1
fsync(2) manpage tells syncing directory is explicitly needed if a file is synced.
How about Java's sync method in io package? Does is take care about that? Does it depend on OS and/or file system...
Unhorse asked 12/12, 2013 at 15:26
6
Solved
I thought fsync() does fflush() internally, so using fsync() on a stream is OK. But I am getting an unexpected result when executed under network I/O.
My code snippet:
FILE* fp = fopen(file, "wb"...
3
Solved
I am trying to clone the tensorflow/models repo. I am connected to the remote machine with ssh. I tried many suggestions out there for fixing the issue but none worked for me.
git clone --recursi...
0
I watched the talk: "PostgreSQL vs. fsync. How is it possible that PostgreSQL used fsync incorrectly for 20 years, and what we'll do about it." via https://fosdem.org/2019/schedule/event/postgresql...
Metallophone asked 13/2, 2019 at 0:35
4
Solved
I found this in the Python documentation for File Objects:
flush() does not necessarily write the file’s data to disk. Use flush() followed by os.fsync() to ensure this behavior.
So my question i...
Tysontyumen asked 19/8, 2011 at 20:32
2
I'm writing some software to deal with pretty critical data, and need to know what exactly I need to do to achieve durability.
Everywhere I look is contradictory information, so I'd appreciate any...
Rhythmics asked 20/10, 2012 at 15:59
1
Solved
The FUSE API doesn't expose a file-system level sync call, just fsync and fsyncdir. Does it mean that when sync is called (or syncfs inside a FUSE mountpoint), the kernel invokes fsync on all open ...
Perversion asked 31/8, 2015 at 13:16
3
Solved
Is it safe to call rename(tmppath, path) without calling fsync(tmppath_fd) first?
I want the path to always point to a complete file.
I care mainly about Ext4. Is the rename() promised to be safe ...
4
I want to make sure that an ofstream has been written to the disk device. What's the portable way (portable on POSIX systems) of doing this?
Does that solve the problem if I open the file separate...
2
This question is in follow up of an earlier question I posted: Windows fsync (FlushFileBuffers) performance with large files. Where I found a possible solution but also new questions.
While bench...
Bodrogi asked 19/8, 2013 at 7:48
4
From information on ensuring data is on disk (http://winntfs.com/2012/11/29/windows-write-caching-part-2-an-overview-for-application-developers/), even in the case of e.g. a power outage, it appear...
Sessile asked 16/8, 2013 at 15:8
4
Solved
I am intended to use fdatasync in a system like log or diskqueue.
The first thing is to create a 10MB file with "000000..." in file system like ext4.
But I don't know how to do it properly.
Atrocious asked 28/5, 2013 at 16:49
4
Solved
What's the correct way to durably rename a file in a POSIX file system? Specifically wondering about fsyncs on the directories. (If this depends on the OS/FS, I'm asking about Linux and ext3/ext4)....
2
I have a test program. It takes about 37 seconds on Linux kernel 3.1.*, but only takes about 1 seconds on kernel 3.0.18 (I just replace the kernel on the same machine as before). Please give me a c...
Arrio asked 16/1, 2012 at 4:16
3
Solved
Suppose I write a block to a file descriptor without doing fsync and then read the same block from the same descriptor some time later. Is it guaranteed that I will receive the same information?
T...
2
Solved
Tim Bray's article "Saving Data Safely" left me with open questions. Today, it's over a month old and I haven't seen any follow-up on it, so I decided to address the topic here.
One point of the a...
Marybellemarybeth asked 16/1, 2011 at 19:52
0
I am using boost::filesystem::create_directories() to create new directories. When I try to access these directories shortly after creation, I get an error saying: no such directory. But if I sleep...
Accrescent asked 19/8, 2011 at 9:5
1
© 2022 - 2024 — McMap. All rights reserved.