swapent, or as seen in userland, is dbtob(1), which turns to be 512 for all
arch for now.
In struct swapdev, there is another field for block size. This value is private
to uvm_swap.c and is only used for swap I/O on regular files. It is equal to
the underlying device block size and it is not necessarily 512.
- Added two more swapctl commands: GETFREESWAP and GETSWAPVIRT.
There is a problem in the way swap block size are found here. See comment
in get_block_size().
sys_swapctl(SWAP_STATS). This enable the use of a kernel based
buffer instead of using some temporary memory in the stackgap,
whereas we cannot make sure that the size os the struct swapent array
will fit in it. (it is not known at build time, but the stackgap len
is set at build time).