BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001521 [BusyBox] Other major always 10-04-07 04:03 02-13-08 07:32
Reporter rol View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0001521: Busybox 1.7.1 - mkswap can't create correctly a 4Go swap partition on a mapper device...
Description Hello,

It seems that the mkswap utility is not behaving as expected :
 - If the partition is too big, the reported size is wrong,
 - It is not possible to put a label,
 - the created swap partition cannot be activated.
Here is a copy of the tests done :

[root@corp-ref busybox-1.7.1]# ./mkswap
BusyBox v1.7.1 (2007-10-01 15:05:39 GMT) multi-call binary

Usage: mkswap [-c] [-v0|-v1] device [block-count]

Prepare a disk partition to be used as swap partition

Options:
        -c Check for read-ability
        -v0 Make version 0 swap [max 128 Megs]
        -v1 Make version 1 swap [big!] (default for kernels > 2.1.117)
        block-count Number of block to use (default is entire partition)

[root@corp-ref busybox-1.7.1]# ./mkswap /dev/mapper/isw_decfbeidae_RAID1p5
Setting up swapspace version 1, size = -1407488 bytes

# Here, the size is wrong....

[root@corp-ref busybox-1.7.1]# mkswap -L SWAP-isw_decfbe /dev/mapper/isw_decfbeidae_RAID1p5
Setting up swapspace version 1, size = 4293558 kB
LABEL=SWAP-isw_decfbe, no uuid

# Same partition, using system mkswap : partition is correct.

What's more, any attempts to activate it fails :
[root@corp-ref busybox-1.7.1]# ./mkswap /dev/mapper/isw_decfbeidae_RAID1p5
Setting up swapspace version 1, size = -1407488 bytes
[root@corp-ref busybox-1.7.1]# swapon -a
swapon: /dev/mapper/isw_decfbeidae_RAID1p5: Invalid argument

Paul
Additional Information
Attached Files

- Relationships

- Notes
(0003194)
bernhardf
12-16-07 06:53

IIRC this was fixed quite some time ago. Please retry with 1.8.2 and current trunk and let us know if this works as expected on trunk.

thanks,
 
(0004374)
vda
02-13-08 07:32

Your bbox was compiled without CONFIG_LFS=y

Just tested current svn with CONFIG_LFS=y on 6 GB file:

# ./busybox mkswap zswap
Setting up swapspace version 1, size = 6291451904 bytes

# ./busybox swapon zswap
 

- Issue History
Date Modified Username Field Change
10-04-07 04:03 rol New Issue
10-04-07 04:03 rol Status new => assigned
10-04-07 04:03 rol Assigned To  => BusyBox
12-16-07 06:53 bernhardf Note Added: 0003194
02-13-08 07:32 vda Status assigned => closed
02-13-08 07:32 vda Note Added: 0004374
02-13-08 07:32 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker