]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemd-sleep: refuse to calculate swapfile offset on Btrfs 12760/head
authorZach Smith <z@zxmth.us>
Wed, 26 Jun 2019 13:55:37 +0000 (06:55 -0700)
committerZach Smith <z@zxmth.us>
Thu, 27 Jun 2019 05:04:59 +0000 (22:04 -0700)
commit64602c843beb228be919e5f0639427b60d589ec6
tree73437a58c7a801c963d604455d298707f16b42d5
parent2002d8cdaee105a7ab6bc89d480a9ded2198247a
systemd-sleep: refuse to calculate swapfile offset on Btrfs

If hibernation is requested but /sys/power/resume and
/sys/power/resume_offset are not configured correctly, systemd-sleep
attempts to calculate swapfile offset using fstat and fiemap.
Btrfs returns virtual device number for stat and a virtual offset
for fiemap which results in incorrect offset calculations. In the
case where offset would be calculated and the user is using Btrfs,
log a debug message and fail to write device and offset values.
src/sleep/sleep.c