swapon fails with EINVAL
Username: xnoreq
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=2394
Hardware:
- archer-c7-v5
Software:
-
ath79/generic
-
mips_24kc
-
OpenWrt SNAPSHOT r10551-d616b2c9
Steps to reproduce:
- USB thumb drive with a single f2fs partition set up as extroot (according to wiki)
Fyi, mount shows:
/dev/sda1 on /overlay type f2fs (rw,lazytime,relatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
-
dd if=/dev/zero of=/swapfile bs=1M count=256
-
chmod 0600 /swapfile
-
mkswap /swapfile
-
swapon /swapfile
Result:
- block: failed to swapon /swapfile (-1)
Expected result:
- swapon succeeds