When I do the following:
cryptsetup open /dev/sdX[Y] rand --type plain --key-file /dev/random;
blkdiscard -z /dev/mapper/rand
Some OOM killings and a kernel panic occur. Here is a screenshot:
Similar issue is NOT found in doing `cat /dev/zero > /dev/mapper/rand`, or
`blkdiscard -z /dev/sdX[Y]` (without opening a dm-crypt on it), on the same
hardware and configuration.
Note that `blkdiscard -z` does not trigger the BLKDISCARD ioctl but the
BLKZEROOUT ioctl. And the devices I have been testing on are USB devices that
does NOT support WRITE SAME or UNMAP.
dm-devel mailing list