On Sun, 28 Aug 2005, Yura Pakhuchiy wrote:
> On Sun, 2005-08-28 at 08:25 +0100, Anton Altaparmakov wrote:
> > Interestingly, the bug I thought was the problem was actually not the
> > problem because by pure chance the code treated the "unhandled error code"
> > the same way as a +1 collation, i.e. continue searching the index. And
> > this is what the index lookup code does as well (both in Linux NTFS and
> > Windows NTFS.sys), so by pure chance it actually happened to work.
> >
> > Thus I don't actually understand what was wrong with the index at all. It
> > doesn't appear to be what I thought it was. I had remembered wrong that
> > it should be -1 collation when in fact it should be +1 collation which is
> > exactly how the code treated it.
> >
> > So I think the actual problem is still unknown.
>
> I guess ntfs.sys in NT4 is buggy, and it get fixed in XP (AFAIU you too
> used it for testing) or 2000. When I disabled check by
> legal_ansi_char_array I received properly collated index after creation
> of all those files and chkdsk had no problems with it. I think for >=
> 3.0 volumes we can remove this check at all. Not sure what about 1.2
> version, will be great to test on NT4 what happens when it found such
> properly collated index.
Sorry but no. I had a _very_ quick look at ntfs.sys from xp sp2 to see if
things had changed. It still has the array (but I didn't verify that the
content is the same) and it uses it in four or five functions:
1) names collation (used twice)
2) is file name valid
3) is ea name valid
4) and possibly 5) I can't remember, sorry...
And in each of these it uses different masks when testing with the array
so some of the bits mean one thing and some another.
Also, is file name valid (IIRC) does check each character whether it is
":" or "\" (it might have been "|" rather than ":" and "/" rather than
"\", not sure) and flags those as invalid (I think it does anyway, I
didn't look properly where the jumps went to but both went to the same
place so I assume it was "invalid", I was only having a very quick look I
didn't have time to do more than that).
When I find some more free time I will look through properly and report
here again. I am afraid it might be at least till the week after next as
I am on holiday this week and it's my daughter's second birthday so we
have two parties to organise this week and we are going away to a safari
park and to an adventure park and I still have to get the garden sorted
(putting up a large wendy house for the children and have to mow the lawn
for the children's party) so I doubt I will have any time to sit in front
of computer and stare at disassembled ntfs code... (-;
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
|