24.06.2014 12:22, Minchan Kim wrote:
Hello,
Sorry for the late response.
Better late than never.
If I parse your problem correctly, you meant that changing disksize is
failed while someone opens /dev/zram0?
I tried test which opens "/dev/zram0" with O_RDWR and sleep forever
and then echo $((512<<20)) > /sys/block/zram0/disksize is successful.
IOW, it's okay with me.
No, this is only a part of the problem. A valid test would be:
0. Reset the unused zram device.
1. Use a program that opens /dev/zram0 with O_RDWR and sleeps until killed.
2. While that program sleeps, echo the correct value to
/sys/block/zram0/disksize.
3. Verify (e.g. in /proc/partitions) that the disk size is applied
correctly. It is.
4. While that program still sleeps, attempt to mkswap /dev/zram0. This
fails:
mkswap: error: swap area needs to be at least 40 KiB
There is nothing in dmesg.
--
Alexander E. Patrakov
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel