Zheng Lv <lv.zheng.2015@xxxxxxxxx> writes: >> Hm, it is a bit hard to think what to do. But I guess it is better to >> allow access to rescue some files. (Yes, it may lost new data. But >> read-only or in-place update is safe.) > > I would like to list the reasons it's better not to allow mounting. > > - The "attempt to access beyond end of device" error would fill the kernel > log. It's drivers' business to prevent such kind of errors. > - Clever data rescuers won't mount the damaged device. They would instead > mount a copy of the broken image. It isn't much work to "truncate" the file > to larger after they receive the message. > - It's at least unsafe to allow mounting rw a truncated device. > - ext4 driver forbids mounting a truncated device, too. > > In fact, the code was basically copied from ext4 fs driver. :-) I see. But a big difference with ext4 is, there is many bad implementations of FAT. My concern is formatted usb thumb (or mmc etc.) by bad formatter. Yes, it is illegal format, but if user used only top of device (e.g. used to move small file to move other machine), user would not notice bad format, and works well until this patch applied. So, windows also refuse to read/write? And dosfsck can fix? (and some embedded device may not have to run fsck or mkfs). Thanks. -- OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html