Skip to content
Advertisement

Tag: ext4

Get filesystem creation date in C

I need to know the creation datetime of the filesystem on a disk (in a Linux machine) with C. I would like to avoid using shell commands, such as and make a parser. Thanks Answer From a program coded in C (or in any language capable of calling C routines) you would use the stat(2) system call (or, with recent

Understanding Linux write performance

I’ve been doing some benchmarking to try and understand write performance on Linux, and I don’t understand the results I got (I’m using ext4 on Ubuntu 17.04, though I’m more interested in understanding ext4 if anything, than I am in comparing filesystems). Specifically, I understand that some databases/filesystems work by keeping a stale copy of your data, and then writing

Is rename() without fsync() safe?

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 in Python: Answer No. Look at libeatmydata, and this presentation: Eat My Data: How Everybody Gets File

Advertisement