Kernels v4.9+ cause short reads of block devices

From: Doug Nazar
Date: Wed Aug 23 2017 - 15:55:04 EST


The following commits cause short reads of block devices, however writes are still allowed.

c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()")
d05c5f7ba164 ("vfs,mm: fix return value of read() at s_maxbytes")

When e2fsck sees this, it thinks it's a bad sector and tries to write a block of nulls which overwrites the valid data.

Device is LVM over 2 x RAID-5 on an old 32bit desktop.

RO RA SSZ BSZ StartSec Size Device
rw 4096 512 4096 0 9748044840960 /dev/Storage/Main

Doug