systemd / zram-generator

Systemd unit generator for zram devices
MIT License
575 stars 48 forks source link

Missing backing_dev attribute should be handled gracefully #144

Closed keszybz closed 2 years ago

keszybz commented 2 years ago

Right now we fail like this:

Dec 10 07:24:51 rawhide systemd[1]: Starting systemd-zram-setup@zram1.service - Create swap on /dev/zram1...
Dec 10 07:24:51 rawhide zram-generator[724]: Error: Failed to configure write-back device into /sys/block/zram1/backing_dev
Dec 10 07:24:51 rawhide zram-generator[724]: Caused by:
Dec 10 07:24:51 rawhide zram-generator[724]:     Permission denied (os error 13)

which is rather confusing. If the kernel is compiled without the option, we should just warn and ignore the option to set writeback device.