With FAT32 images, copying files to an unmounted image is possible with the mcopy command:
mcopy -v -i [image file] -s [files to copy] ::/
However, this is not possible with an ext4-based image file. Is there an equivalent command to achieve the…
I understand the O_DIRECT flag when opening a file via the system call. The file with this flag is read without buffering. There are restrictions of read offset and the number of bytes of each read opearation.
However, DAX is a parameter of the…
I'd like to know what are possible states if system crashes while trimming beginning of a file using fallocate with FALLOC_FL_COLLAPSE_RANGE flag. Is it possible that only part of the blocks we want to trim is absent, and some blocks are still…
When creating the filesystem images Android uses the utility mkuserimg_mke2fs. The utility can be provided a config file with the uid/gid and the permissions. The utility uses the fs_config function when a mountpoint is passed to it and uses the…
I'm using debugfs to change the ctime of a file (programm rotine attached to ctime of this specific file) on an ext4 file system.
The therefor used command is:
debugfs -w -R 'set_inode_field foo/bar ctime 20130503145204' /dev/vdb1
but this is…
journal mode
data=journal mode provides full data and metadata journaling. All new
data is written to the journal first, and then to its final location.
In the event of a crash, the journal can be replayed, bringing both
data and metadata into a…
I am writing a program in windows (C#) to extract disk images from AOSP. I am using simg2img, but to no avail. Simg2img only supports EXT4 based file systems and some of my IMG files are written in F2FS. How do I extract these files? I have been…
I'm using Yocto on Ubuntu 18.04 with the Warrior Branch of Meta-Tegra in order to try to integrate the RAUC Open Source project for Linux Firmware Updates.
I've learned that U-Boot has issues writing to EXT4 partitions ( to update the U-Boot Env )…
I have an empty ext4 formated hard disk and would like to create a single file that takes up all available disk space. And I would like to know the size of this file before creating it.
My approach was to run 'df -k' to get the available space and…
This is regarding setting of Project Quotas/ Directory Quotas on ext4 filesystems. The patch for allowing Project Quotas in ext4 filesystems was submitted via patch https://lore.kernel.org/patchwork/patch/541895/ .
I have tried the below steps…
I'm seeing references to "IND" vs "DIND" vs "TIND" block-types in a few places, whereas the definition in the code is very terse:
(https://github.com/torvalds/linux/blob/master/fs/ext4/ext4.h#L362)
#define EXT4_NDIR_BLOCKS 12
#define…
Flink has a RollingFileSink which per the documentation works with HDFS (Hadoop). Are there similar classes which can be used to sink data to file systems such as NFS, ext4 or…
For part of some application it is required to write a VBScript to format SD card to EXT4 fs. Application is running on Windows OS. I found that the format command in CMD can perform disk formatting but only to FAT*, NTFSm UDF and ReFS. Is there any…
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
tune2fs -l /dev/sdb2 | grep 'Filesystem created:'
and make a parser.
Thanks
In the jbd2 source code, any modification in the File System is mapped into a handle_t structure (per process) that later is used to map the buffer_head to the transaction_t which this handle is going to be part of.
As far as I could understand,…