[systemd-devel] [ANNOUNCE] systemd 207
Jan Engelhardt
jengelh at inai.de
Tue Sep 17 15:47:49 PDT 2013
On Wednesday 2013-09-18 00:15, Lennart Poettering wrote:
>>
>> In pam_mount where discard too had been feature-requested (and then
>> implemented according to the way it sounds): "allow-discards"
>> _allows_ discarding, but only "discard" would make it such that
>> the filesystem issues discards to the block layer, leaving the
>> former case for manual discards.
>
>Hmm, and what the is the underlying between the two in pam_mount? I
>mean, what does it translate to in mount options?
In pseudocode:
if (allow_discards || discards)
flags |= CRYPT_ACTIVATE_ALLOW_DISCARDS;
crypt_activate_by_passphrase(, ..., flags);
if (discard)
system("mount -o discard /dev/foo /bar");
else
system("mount /dev/foo /bar");
Here is also some quoting from (another poster; not me) from the
pam_mount archives.
>[pam_mount's] "discard" [...] does two things: 1) allows the discard
>FITRIM ioctl to be passed through to the underlying filesystem, and
>2) actually passes the discard mount option down [...] 1) is
>necessary to allow the fstrim command to work, and 2) is undesirable
>because automatic discard incurs a significant performance penalty
>(see e.g. https://patrick-nagel.net/blog/archives/337).
More information about the systemd-devel
mailing list