ext4fs_write() attempts to write past the end of the block device
As of mainline,2035, reproducing the following steps will lead to an attempt by
ext4fs server to write past the end of the block device:
klogso that you can see what happens
- in another terminal, run:
mkfile -s 30m /foo
Instead of failing gracefully (30m is too much for the root file system), the
mkfile command will never return.
klog will print a stack trace as a result of detecting an error condition in
write_blocks(). The system will appear pretty much wedged, because of some repeating file system activity going on in the background, which is somehow preventing the rest of the system to use the filesystem. This activity can be still observed from
The stack trace displayed by
klog goes like this:
block_get() ext4fs_write() vfs_connection()
The message printed upon detecting the error condition in
write_blocks() is as follows:
Error -3 writing 8 blocks starting at block 49280 to device handle 16.
Error -3 stands for ELIMIT, suggesting the write happened beyond the end of the device.