Skip to content

Commit e4cacb4

Browse files
committed
btrfs-progs: docs: clarify swapfile an multi-device filesystem
It is possible to create swapfile on a multi-device filesystem but it's not reliable. The check that verifies that in kernel: 10698 } else if (device != map->stripes[0].dev) { 10699 btrfs_warn(fs_info, "swapfile must be on one device"); 10700 ret = -EINVAL; 10701 goto out; 10702 } This does not count devices but rather the actual placement of the swapfile extents, so multi-device filesystem with single profile can create it as long as there's enough space and the allocator decides to place it properly. [ci skip] Pull-request: #839 Signed-off-by: David Sterba <dsterba@suse.com>
1 parent a9c9f88 commit e4cacb4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Documentation/ch-swapfile.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ The limitations come namely from the COW-based design and mapping layer of
1616
blocks that allows the advanced features like relocation and multi-device
1717
filesystems. However, the swap subsystem expects simpler mapping and no
1818
background changes of the file block location once they've been assigned to
19-
swap.
19+
swap. The constraints mentioned above (single device and single profile) are
20+
related to the swapfile itself, i.e. the extents and their placement. It is
21+
possible to create swapfile on multi-device filesystem as long as the extents
22+
are on one device but this cannot be affected by user and depends on free space
23+
fragmentation and available unused space for new chunks.
2024

2125
With active swapfiles, the following whole-filesystem operations will skip
2226
swapfile extents or may fail:

0 commit comments

Comments
 (0)