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 in all future Linux kernel versions?
A usage example…
I'm writing an app that needs to store lots of files up to approx 10 million.
They are presently named with a UUID and are going to be around 4MB each but always the same size. Reading and writing from/to these files will always be sequential.
2…
I need to create a very high number of files which are not very large (like 4kb,8kb).
It's not possible on my computer cause it takes all inodes up to 100% and I cannot create more files :
$ df -i /dev/sda5
Filesystem Inodes IUsed …
I only created about 8 million files, then there was no free inode in /dev/sdb1.
[spider@localhost images]$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sdb1 8483456 8483456 0 100% /home
Someone says…
I have a program that produces large number of small files (say, 10,000 files). After they are created, another script accesses them and processes one by one.
Questions:
does it matter, in terms of performance, how the files are organized (all in…
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).
Note: there are other questions on StackOverflow…
I am writing a library that uses the Linux asynchronous I/O system calls, and would like to know why the io_submit function is exhibiting poor scaling on the ext4 file system. If possible, what can I do to get io_submit not to block for large IO…
What is the limit of EXT4, what i found is only EXT3, and other links only suppositions and not a real number?
Can you please provide me: max number per directory, max size?
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 for a while after creating directories everything…
Can the ext4 filesystem detect data corruption of file contents? If yes, is it enabled by default and how can I check for corrupted data?
I have read that ext4 maintains checksums for file metadata and its journal, but I was unable to find any…
I'm shrinking a partion size with
#Reduce Partition Size
fsck -f /dev/sdb2
resize2fs /dev/sdb2 -M -p
#Limit Partion
fdisk /dev/sdb
... #Now I'm changing the Partition 2 to the new (smaller) size
fdisk gives me a (red) warning like partition#2…
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 article is that FileDescriptor.sync() should be called…
I am considering moving my ext3 partition to ext4 in order to overcome the 32000 subdirectory limit. I have seen two different numbers thrown around about the limits of ext4, both from reputable sources:
Limit of 64,000:
ext4.wiki.kernel.org
SO…
This is a simple question but I've done some research and can't find any answers... So does anyone know if when we define extended attributes through xattr, those attributes are stored within - as a part of - the file'contents(in the biggining, in…