Re: FAT speedup patch revisited for 2.2.1

Riley Williams (rhw@BigFoot.Com)
Sun, 7 Mar 1999 21:31:17 +0000 (GMT)


Hi there.

> Now, the catch is that this patch is assuming:

> - the cluster_size will always be a full power of two
> - filenames and extensions are always padded with spaces

> It seems to me these two conditions are true in general; no
> exceptions have been brought to my attention since I've started
> posting these optimizations. Some parts of the code appear to
> already be more or less assuming the above. But be forewarned,
> if for some reason either one isn't true, applying and running
> this patch may lead to filesystem corruption. I'd like to know
> of any such instances.

I can't comment on the first of those two assumptions as I've no
specific information on it, other than that all of the implementations
I'm aware of follow it. However, I can make the following observations
regarding the second assumption:

1. In MS-DOS 1.xx filenames were padded with spaces, but extensions
were inconsistantly padded as follows:

1. If the entire extension was unused, three spaces were used
to fill the field.

2. If at least one character was used, the field was padded with
NUL (zero) bytes rather than spaces.

2. According to MicroSoft's own documentation, from MS-DOS 2.00 the
file system would always pad both fields with spaces where
required.

I'll agree that systems running MS-DOS 1.xx are probably not in the
majority, but that's the only variation from that specification that I
am aware of...

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.Amush.cx/pub/rhw/Linux
* http://www.Amush.cx/~rhw/kernel.versions.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/