NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/56332: swap on 4k sector device uses only 1/8 of the configured capacity



>Number:         56332
>Category:       kern
>Synopsis:       swap on 4k sector device uses only 1/8 of the configured capacity
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 28 02:00:00 +0000 2021
>Originator:     Tobias Nygren
>Release:        9.99.87
>Organization:
>Environment:
>Description:
swap assumes the block size is 512 bytes.

>How-To-Repeat:
Set up 32 GiB of swap area on gpt on a 4k sector device:

ld4 at nvme0 nsid 1
ld4: 238 GB, 7752 cyl, 128 head, 63 sec, 4096 bytes/sect x 62514774 sectors
dk3 at ld4: 8388608 blocks at 50397440, type: swap

... but only 4 GiB is available.

# swapctl -lm
Device      1M-blocks     Used    Avail Capacity  Priority
/dev/dk3         4096        0     4096     0%    0

>Fix:
kernel should query the device for the correct block size when configuring swap.



Home | Main Index | Thread Index | Old Index