Thanks for the analysis. I agree, this really looks like the filesystem just doesn't support swapfiles. I'll dig in deeper, and update the mailing list when I find out more.
Regards, Jon. Ubidyne GmbH Lise-Meitner-Straße 14 D-89081 Ulm mail [EMAIL PROTECTED] web www.ubidyne.com Registered office: Ulm District court of Ulm: HRB 5295 Managing Directors: Dipl. Ing. Ken Hawk Dipl. Ing. Beat Müller Dr. Clemens Rheinfelder -----Original Message----- From: Denys Vlasenko [mailto:[EMAIL PROTECTED] Sent: 27 March 2008 17:46 To: Jonathan Moore Cc: [email protected] Subject: Re: More Data: v1.10.0 swapon: swapfile has holes - blocksize ? On Thursday 27 March 2008 15:04, Jonathan Moore wrote: > More data follows .... > > /mnt $ dd if=/dev/zero of=/mnt/swapfile bs=1024 count=65536 > 65536+0 records in > 65536+0 records out > /mnt $ mkswap /mnt/swapfile > Setting up swapspace version 1, size = 67104768 bytes /mnt $ swapon > /mnt/swapfile > swapon: blocks 131200 size 67108864 > swapon: swapfile has holes <======================== ??!!! You DEFINITELY do not use 1.10.0. slightly different error message is a dead giveaway. > swapon: /mnt/swapfile: Invalid argument > > mkswap and the extra debug output don't state the same size. mkswap says what is the usable swap size is. That is, minus header. > Swapon is larger. Although blocks * 512 is larger than st.st_size, Yes. 131200 * 512 == 67174400 which is > 67108864. Probably because filesystem reports also indirect blocks used, etc... > so no error statement is generated. I wonder if swapon believes the > file is larger than it actually is? No. "size 67108864", and 67108864 / 1024 == 65536. Exactly what you specified for dd. swapon sees correct file size. I did the same test on my machine: bash-3.2# dd if=/dev/zero of=/mnt/swapfile bs=1024 count=65536 65536+0 records in 65536+0 records out bash-3.2# mkswap /mnt/swapfile Setting up swapspace version 1, size = 67104768 bytes bash-3.2# ./busybox swapon /mnt/swapfile swapon: blocks 131200 size 67108864 <============= DEBUG DATA same as yours swapon succeeded! bash-3.2# swapoff /mnt/swapfile bash-3.2# rm /mnt/swapfile I think you are simply trying to swap on a filesystem which does not support that. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
