greghvk
greghvk

Reputation: 86

Is trimming beginning of a file using fallocate with FALLOC_FL_COLLAPSE_RANGE atomic on ext4?

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 present? If so, are the missing blocks always from the beginning, or can they be somewhere in the middle of range we want to trim?

The filesystem I'm using is ext4. I tried to get answer to this question from ext4 source code, but I'm not familiar enough with the filesystem to conclude the answer.

Upvotes: 2

Views: 255

Answers (0)

Related Questions