xfs
[Top] [All Lists]

Swapfiles broken on XFS.

To: XFS list <linux-xfs@xxxxxxxxxxx>
Subject: Swapfiles broken on XFS.
From: Nigel Cunningham <ncunningham@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Jan 2004 16:55:09 +1300
Cc: Karol Kozimor <sziwan@xxxxxxxxxxx>, swsusp-devel <swsusp-devel@xxxxxxxxxxxxxxxxxxxxx>
Reply-to: ncunningham@xxxxxxxxxxxxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hi.

It appears to me that a swapfile on an XFS filesystem will not work, at
least some of the time.

mm/page_io:722 uses swapf->i_sb->s_blocksize to determine the number of
blocks required to store a page. This method is also in Software
Suspend's swapfile support. Karol emailed me yesterday saying swapfile
support in Suspend seemed to be broken, and I've tracked it down to the
fact that (at least on a test 192MB XFS partition with a 98MB swapfile
on it), s_blocksize is set to 4096 while the blocksize actually appears
to be 512. The means Suspend only gets 12.5% of the way through writing
the image before finding it has run out of space. I don't know how the
system would cope with the descrepancy.

Kernel is 2.4.25-pre4 by the way.

Regards,

Nigel
-- 
My work on Software Suspend is graciously brought to you by
LinuxFund.org.

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>