]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal: when copying journal file to undo NOCOW flag, go via fd
authorLennart Poettering <lennart@poettering.net>
Wed, 2 Feb 2022 14:21:27 +0000 (15:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 3 Feb 2022 10:34:24 +0000 (11:34 +0100)
commit5d04cec867365a4b5d76e327df4ef8b7ad1e89c2
tree433bb48db448ccb5efdf5ba96331b6f023a113da
parentbe496d6a9b88d808ac009da311251fa25a62c39e
journal: when copying journal file to undo NOCOW flag, go via fd

We have the journal file open already, hence reference it via the fd
insted of the file name. After all, some other tool might have
renamed/deleted it already.

Let's not actually reuse the fd though, since we want a separate file
offset for the copying, hence just make it simply and reopen via
/proc/self/fd/.

Follow-up for d71ece3f0b85c7a3decc50143b68ac07fc5831ae
src/journal/managed-journal-file.c