Skip to content
Commit 3f066515 authored by Lennart Poettering's avatar Lennart Poettering Committed by Zbigniew Jędrzejewski-Szmek
Browse files

fs-util: add new unlinkat_deallocate() helper

This new helper not only removes a file from a directory but also
ensures its space on disk is deallocated, by either punching a hole over
the full file or truncating the file afterwards if the file's link
counter is 0. This is useful in "vacuuming" algorithms to ensure that
client's can't keep the disk space the vacuuming is supposed to recover
pinned simply by keeping an fd open to it.

(cherry picked from commit 43767d9d)
(cherry picked from commit 7f4db26a)
parent b36b6a9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment