]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/user-record-show.c
user-record: add new field for requesting LUKS discard on logout
authorLennart Poettering <lennart@poettering.net>
Tue, 5 May 2020 13:05:59 +0000 (15:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 May 2020 14:13:07 +0000 (16:13 +0200)
commit5e86c82acd45842ec5ffbb620d77e9f2c164a7b7
tree57674af5b1f84d5009c3cf2bdf25c5bd93332b76
parentc06bcd4d687a43e295ca626a6793631c8d354eac
user-record: add new field for requesting LUKS discard on logout

We make this entirely independent of the regular discard field, i.e. the
one that controls discard behaviour when the home directory is online.
Not all combinations make a ridiculous amount of sense, but most do.
Specifically:

online-discard = yes, offline-discard = yes
       → Discard when activating explicitly, and during runtime using
       the "discard" mount option, and discard explicitly when logging
       out again.

online-discard = no, offline-discard = yes
       → The new default: when logging in allocate the full backing
       store, and use no discard while active. When loging out discard
       everything. This provides nice behaviour: we take minimal storage
       when offline but provide allocation guarantees while online.

online-discard = no, offline-discard = no
       → Never, ever discard, always operate with fully allocated
       backing store. The extra safe mode.
src/shared/user-record-show.c
src/shared/user-record.c
src/shared/user-record.h