FS#63839 - [linux] `swapon -d swapfile` on F2FS makes the file system inaccessible

Attached to Project: Arch Linux
Opened by nl6720 (nl6720) - Thursday, 19 September 2019, 12:44 GMT
Last edited by freswa (frederik) - Friday, 21 February 2020, 22:16 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
After updating to linux 5.3.arch1-1 and rebooting as soon as the swap file on a F2FS root file system got activated a lot of services failed. It started with "Failed to mount temporary directory (/tmp)".
Rebooting with Ctrl+Alt+Del was not possible since the root file system could not be accessed and I'd get:

[!!!!!!] Failed to execute shutdown binary.

After commenting-out the swap file entry I was able to boot.
But after creating a new swapfile and running swapon the file system would again become inaccessible. Nothing could be executed.

After some trial and error and restoring the root file system from backup (twice), I come to the conclusion that it's the fault of the "discard" option. The issue only occurs when using `swapon -d` or having "discard" in the swap file options in /etc/fstab.

I'm not sure if using TRIM on a swap file is sane or not, but I've haven't been able to find a any valid source recommending against it. FWIW it worked fine in Linux < 5.3.

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any
linux 5.3.arch1-1

Steps to reproduce:
Use F2FS for /
Boot linux 5.3.arch1-1
# dd if=/dev/zero of=/swapfile bs=1M count=16384 status=progress
# chmod 600 /swapfile
# mkswap /swapfile
# swapon -d /swapfile

This task depends upon

Closed by  freswa (frederik)
Friday, 21 February 2020, 22:16 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#63841 

Loading...