Sparse files can significantly reduce the storage requirements for a file that has large "empty" portions. But does the increased bookkeeping for these sparse regions materially impact access performance?
This will, of course, depend on the file…
I have lots of data which I would like to save to disk in binary form and I would like to get as close to having ACID properties as possible. Since I have lots of data and cannot keep it all in memory, I understand I have two basic approaches:
Have…
I've ran into a scenario where I've created a simple plain text file with just one ASCII letter: a. I checked the file size with stat and here's what I got:
$ stat file
File: 'file'
Size: 1 Blocks: 8 IO Block: 4096 regular…
Update: Turns out I was being very stupid. I was checking the modification time when I should be checking the access time. The reason it was not reproducible was that the test files were made with dd if=/dev/urandom of="$target" bs='1K' count=1 ||…
I am working with NVMe card on linux(Ubuntu 14.04).
I am finding some performance degradation for Intel NVMe card when formatted with xfs file system with its default sector size(512). or any other sector size less than 4096.
In the experiment I …
I have folder with two million of images 1-2KB.
I try to read
for (File f : tmpDir.listFiles()) {
long t1 = System.currentTimeMillis();
image = ImageIO.read(f);
long time = System.currentTimeMillis() - t1;
}
first 20,000 files time = 0 or…
I am working on an encrypted filesystem that encrypts data just before writing it to disk and decrypts it right after reading from disk. Any file in disk is useless if not decrypted first. so far I changed standard read and write methods that…
I am puzzled by the following sequence of commands.
sh-4.2$ pwd
/home/willard
sh-4.2$ ls -l f
-rwxr-xr-x 1 willard users 59116 Jan 23 14:54 f
sh-4.2$ file f
f: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared…
For debugging purposes, I want to open a file on a specific predefined block. For instance, if I suspect a specific block is damaged, I want to write and read from it, and I'd rather do that in user mode, while the partition is mounted.
Is there a…
I have a yocto meta layer which build a complete Linux distribution for an embedded system.
It is based on 'dunfell' (3.1.11) branch of yocto and using the linux mainline kernel 5.10.57.
The file system which I use is ext4 and the /etc/fstab file…
I am working on an embedded Linux project that can run on multiple
platforms. One uses e.MMC for storage and another NAND flash. I want
to encrypt all the filesystems (mainly to protect against someone
unsoldering the flash chips and putting them in…
Env: Linux Kernel 5.3; FS: ext4
When requesting stat(const char *pathname, struct stat *statbuf) how is the const char *pathname is checked for existence?
It is necessary since in case there is no such path stat returns -1 (ENOENT). Here is the…
It is said that ext3 supports file timestamp precision up to seconds and ext4 up to nanoseconds...
What happens is that my old VPS running Ubuntu 12.04 with a ext3 filesystem always (as far as I can remember) supported nanoseconds very nicely, like…
I am building an extent-based File System for a school project.
I wanted to use an ext4-like design with its Extent Trees, but I don't understand how exactly the Extent Trees are built.
As far as I understood, there is one inode per one file and…