diff options
author | Peter A. Felvegi <petschy@gmail.com> | 2013-10-18 20:07:44 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-10-18 22:39:07 +0200 |
commit | 444996027e80f96c9948d8d5b8f067a8aff9861d (patch) | |
tree | 878a4fe01b1070c972334f543c7fbf2bde2a7e93 /fs/jbd | |
parent | 2046fd1873886e8c774d7c1b0961624c164e7db2 (diff) |
udf: fix for pathetic mount times in case of invalid file system
The UDF driver was not strict enough about checking the IDs in the
VSDs when mounting, which resulted in reading through all the sectors
of the block device in some unfortunate cases. Eg, trying to mount my
uninitialized 200G SSD partition (all 0xFF bytes) took ~350 minutes to
fail, because the code expected some of the valid IDs or a zero byte.
During this, the mount couldn't be killed, sync from the cmdline
blocked, and the machine froze into the shutdown. Valid filesystems
(extX, btrfs, ntfs) were rejected by the mere accident of having a
zero byte at just the right place in some of their sectors, close
enough to the beginning not to generate excess I/O. The fix adds a
hard limit on the VSD sector offset, adds the two missing VSD IDs, and
stops scanning when encountering an invalid ID. Also replaced the
magic number 32768 with a more meaningful #define, and supressed the
bogus message about failing to read the first sector if no UDF fs was
detected.
Signed-off-by: Peter A. Felvegi <petschy@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/jbd')
0 files changed, 0 insertions, 0 deletions