]> git.ipfire.org Git - thirdparty/systemd.git/commit
homed: mark LUKS loopback file as "dirty" via xattr when in use
authorLennart Poettering <lennart@poettering.net>
Mon, 17 Aug 2020 18:37:04 +0000 (20:37 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 Aug 2020 16:18:46 +0000 (18:18 +0200)
commit565ac8b1c85acb9550d0645f65ac63ec9a255ffd
treebbf15d9cf7a892aa7b2f22200bde1d8a5f43e95d
parent05c8e12c4729a8965079aed63e82799d3023c6a8
homed: mark LUKS loopback file as "dirty" via xattr when in use

Let's track the "dirty" state of a home directory backed by a LUKS
volume by setting a new xattr "home.home-dirty" on the backing file
whenever it is in use.

This allows us to later user this information to show a home directory
as "dirty". This is useful because we trim/allocate on log-out, and
if we don't do that a home directory will be larger than necessary. This
fact is something we should communicate to the admin.

The idea is that when an admin sees a user with a "dirty" home directory
they can ask them to log in, to clean up the dirty state, and thus trim
everything again.
src/home/homework-luks.c
src/home/homework-luks.h
src/home/homework.c
src/home/homework.h