btrfs-progs/cmds
David Sterba 54b90cb6e5 btrfs-progs: fi mkswapfile: fix page count in header
Per user report on https://old.reddit.com/r/btrfs/comments/107fnw1/btrfs_filesystem_mkswapfile_results_in_an/
the swapfile header does not contain the correct number of pages that
matches the file size and the activated swapfile is only 1GiB:

  # btrfs filesystem mkswapfile -s 10g swapfile
  # swapon swapfile
  # cat /proc/swaps
  Filename          Type    Size       Used    Priority
  /swap/swapfile    file    1048572    0       -2

A workaround is to run 'mkswap swapfile' before activation. Proper fix
is to calculate the number of (fixed size) 4K pages available for the
swap.

Issue: #568
Signed-off-by: David Sterba <dsterba@suse.com>
2023-01-25 16:19:36 +01:00
..
balance.c btrfs-progs: cmds: use bool for status variables 2022-10-11 09:08:12 +02:00
commands.h btrfs-progs: add new group reflink and command 2022-12-07 01:43:30 +01:00
device.c btrfs-progs: device stats: fix json formatter type for devid 2022-12-16 00:49:07 +01:00
filesystem-du.c btrfs-progs: cmds: use bool for status variables 2022-10-11 09:08:12 +02:00
filesystem-usage.c btrfs-progs: cmds: use bool for status variables 2022-10-11 09:08:12 +02:00
filesystem-usage.h btrfs-progs: fi usage: unify naming of device and chunk info variables 2022-10-11 09:08:08 +02:00
filesystem.c btrfs-progs: fi mkswapfile: fix page count in header 2023-01-25 16:19:36 +01:00
inspect-dump-super.c btrfs-progs: cmds: use bool for status variables 2022-10-11 09:08:12 +02:00
inspect-dump-tree.c btrfs-progs: replace strerror(errno) with %m in printf formats 2022-10-26 09:46:22 +02:00
inspect-tree-stats.c btrfs-progs: cmds: use bool for status variables 2022-10-11 09:08:12 +02:00
inspect.c btrfs-progs: inspect: add build conditionals around list-chunk 2023-01-05 14:59:12 +01:00
property.c btrfs-progs: property: use pr_verbose for messages 2022-10-11 09:08:11 +02:00
props.h btrfs-progs: prop set: add force parameter 2021-10-07 18:40:24 +02:00
qgroup.c Revert "btrfs-progs: rename qgroup items to match the kernel naming scheme" 2023-01-03 13:10:54 +01:00
qgroup.h Revert "btrfs-progs: rename qgroup items to match the kernel naming scheme" 2023-01-03 13:10:54 +01:00
quota.c btrfs-progs: quota: add -W option to rescan to wait without starting rescan 2022-10-25 21:12:24 +02:00
receive-dump.c btrfs-progs: receive: add support for fs-verity 2022-10-11 09:08:08 +02:00
receive-dump.h btrfs-progs: cmds: update include lists 2022-10-11 09:07:59 +02:00
receive.c btrfs-progs: receive: fix silent data loss after fall back from encoded write 2022-11-24 17:29:12 +01:00
reflink.c btrfs-progs: add new group reflink and command 2022-12-07 01:43:30 +01:00
replace.c btrfs-progs: ioctl: move dev-replace NO_RESULT definition into replace.c 2022-11-28 18:57:43 +01:00
rescue-chunk-recover.c btrfs-progs: don't use btrfs_header_csum helper 2022-11-30 19:14:29 +01:00
rescue-super-recover.c btrfs-progs: cmds: update include lists 2022-10-11 09:07:59 +02:00
rescue.c btrfs-progs: cmds: use bool for status variables 2022-10-11 09:08:12 +02:00
rescue.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
restore.c btrfs-progs: sync compression.h from the kernel 2022-11-30 19:14:29 +01:00
scrub.c btrfs-progs: cmds: use bool for status variables 2022-10-11 09:08:12 +02:00
send.c btrfs-progs: replace strerror(errno) with %m in printf formats 2022-10-26 09:46:22 +02:00
subvolume-list.c btrfs-progs: subvol list: fix the wrong timestamp and UUID check for root items 2023-01-02 13:57:29 +01:00
subvolume.c Revert "btrfs-progs: rename qgroup items to match the kernel naming scheme" 2023-01-03 13:10:54 +01:00