udf: Try anchor in block 256 first
authorJan Kara <jack@suse.cz>
Thu, 19 Mar 2009 15:21:38 +0000 (16:21 +0100)
committerJan Kara <jack@suse.cz>
Thu, 2 Apr 2009 10:29:56 +0000 (12:29 +0200)
commit40346005166329bc4b53e0c564aff3968c1ddaa0
treeaf6440a2aeff69ed6cccd93c663eb564e7cf6411
parent225feded89d447c2ab76e38e67ef56860c5bb60f
udf: Try anchor in block 256 first

Anchor block can be located at several places on the medium. Two of the
locations are relative to media end which is problematic to detect. Also
some drives report some block as last but are not able to read it or any
block nearby before it. So let's first try block 256 and if it is all fine,
don't look at other possible locations of anchor blocks to avoid IO errors.
This change required a larger reorganization of code but the new code is
hopefully more readable and definitely shorter.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/super.c
fs/udf/udf_sb.h