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>
This commit is contained in:
Jan Kara
2009-03-19 16:21:38 +01:00
parent 225feded89
commit 4034600516
2 changed files with 196 additions and 258 deletions
+191 -253
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -117,7 +117,7 @@ struct udf_sb_info {
/* Sector headers */
__s32 s_session;
__u32 s_anchor[3];
__u32 s_anchor;
__u32 s_last_block;
struct buffer_head *s_lvid_bh;