[Bug 616617] New: Cannot use swap file on BtrFS
http://bugzilla.novell.com/show_bug.cgi?id=616617 http://bugzilla.novell.com/show_bug.cgi?id=616617#c0 Summary: Cannot use swap file on BtrFS Classification: openSUSE Product: openSUSE 11.3 Version: RC 1 Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: silviu_marin-caea@otpbank.ro QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100527 SUSE/3.6.4-2.2 Firefox/3.6.4 I know that I'm not supposed to report bugs for BtrFS, but I'm doing this for next openSUSE version. Just close with INVALID if this bugreport is not appropriate. The bug: Cannot use a swapfile on BtrFS, error is: Invalid argument. On the same computer and hard-disk, I can use a swap file created on a different ext4 partition. Reproducible: Always Steps to Reproduce: silviu:~ # cd /var/tmp silviu:/var/tmp # dd if=/dev/zero of=swapfile bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 18.633 s, 57.6 MB/s silviu:/var/tmp # mkswap swapfile mkswap: swapfile: warning: don't erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 1048572 KiB no label, UUID=c356f0ff-1524-4b99-88f9-94465d555161 silviu:/var/tmp # chmod 0600 swapfile silviu:/var/tmp # swapon -v swapfile swapon on swapfile swapon: /var/tmp/swapfile: found swap signature: version 1, page-size 4, same byte order swapon: /var/tmp/swapfile: pagesize=4096, swapsize=1073741824, devsize=1073741824 swapon: swapfile: swapon failed: Invalid argument Actual Results: Cannot use swap file Expected Results: Should be able to use the swap file -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=616617 http://bugzilla.novell.com/show_bug.cgi?id=616617#c1 Jeff Mahoney <jeffm@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeffm@novell.com --- Comment #1 from Jeff Mahoney <jeffm@novell.com> 2010-06-24 20:59:05 UTC --- This is a known limitation of btrfs. The issue is that the swapfile implementation assumes that it can take a file without holes in it and build an extent map of how the file maps to disk blocks and write to those blocks directly. Since btrfs is CoW, the file extents can be remapped by the file system arbitrarily. If swapfile is allowed to map those blocks and then the file is remapped - then the swap subsystem will happily corrupt your btrfs file system. At some point, it may be possible to stop that behavior but it isn't currently. A workaround is to map your swapfile via a loopback device and use that instead. There will be a performance hit but then you're already using swap. :) That the limitation and the workaround isn't well documented is a bug, though. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=616617 http://bugzilla.novell.com/show_bug.cgi?id=616617#c2 Jeff Mahoney <jeffm@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kernel-maintainers@forge.pr |puzel@novell.com |ovo.novell.com | --- Comment #2 from Jeff Mahoney <jeffm@novell.com> 2010-06-24 21:27:04 UTC --- OBS SR 42022 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=616617 http://bugzilla.novell.com/show_bug.cgi?id=616617#c3 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Petr Uzel <puzel@novell.com> 2010-06-25 07:57:13 UTC --- Thanks for the patch - just submitted to Factory. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=616617 http://bugzilla.novell.com/show_bug.cgi?id=616617#c4 --- Comment #4 from Bernhard Wiedemann <bwiedemann@suse.com> --- This is an autogenerated message for OBS integration: This bug (616617) was mentioned in https://build.opensuse.org/request/show/42035 Factory / util-linux -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com