Re: CD-ROM Success!

Gordon Chaffee (chaffee@kitty1.cs.berkeley.edu)
Thu, 30 Oct 1997 16:22:39 -0800 (PST)


Steven N. Hirsch writes:
> As a followup to my own followup, the CD-From-Hell(tm) which started this
> whole thread (from O'Reilly, as the companion to Tcl/Tk Tools) fails to
> read properly under 2.0.31. The problems are deep enough in the directory
> hierarchy that I didn't see them until running diffs between ls -alR
> dumps (which as was pointed out, I should have done to begin with).
>
> After Gordon's latest patches it seems 100% correct under 2.1.60. Now I'm
> glad I brought this up!

A problem, or maybe the problem, seems to be with relocated deep
directory entries. If the code in namei.c ran across one of these,
it would just quit. Not the best choice. Here is a patch against
the clean linux-2.0.31 code that might fix it.

Now that I think about it more, I'm becoming concerned that there
might be a problem somewhere in get_rock_ridge_filename in 2.1.60.
What was happening was that get_rock_ridge_filename was returning -1
at the toplevel directory of the O'Reilly CD. That indicates a
relocated deep directory, but I don't think 2.0.31 was showing this
until much later, probably on a real relocated deep directory. Since
I don't know much about the RockRidge format, I don't know if there is
a real problem or not in 2.1.60 that I just masked in my patch. The
patch is correct, but some underlying behavior might be incorrect.

- Gordon

--- linux-2.0.31-clean/fs/isofs/namei.c Tue Oct 21 17:55:22 1997
+++ linux/fs/isofs/namei.c Thu Oct 30 16:51:10 1997
@@ -154,9 +154,7 @@
dpnt = de->name;
/* Now convert the filename in the buffer to lower case */
rrflag = get_rock_ridge_filename(de, &dpnt, &dlen, dir);
- if (rrflag) {
- if (rrflag == -1) goto out; /* Relocated deep directory */
- } else {
+ if (!rrflag) {
if(dir->i_sb->u.isofs_sb.s_mapping == 'n') {
for (i = 0; i < dlen; i++) {
c = dpnt[i];