Hi Yura,
On Fri, 26 Aug 2005, Yura Pakhuchiy wrote:
> On Fri, 2005-08-26 at 16:09 +0100, Anton Altaparmakov wrote:
> > I am afraid your code for file/directory creation is broken. After
> > accessing volume with ntfsmount and creating some files in the root
> > directory running chkdsk I get:
> >
> >[...]
> >
> > So the directory index that I modified was sorted incorrectly! That is
> > a very serious problem...
> >
> > Also there seems to be a bug: "Correcting errors in the Volume Bitmap."
> > I wonder what that is going on about...
>
> AFAICS chkdsk always print this message if it resorts index allocation.
Ah, that's ok then.
> > I suspect the problem with the index sorting is related to the bugs I
> > described in collation, i.e. the NTFS_COLLATION_ERROR stuff I wrote
> > about a few days ago as I predicted it would cause wrong collation and
> > it appears it does.
>
> Indeed, planned to fix, but had not found time before your email.
>
> > To reproduce the bug create identical filenames
> > with only one character difference. E.g. this is what I have (after
> > chkdsk, the files I created are marked with a *):
> >
> > [...]
> >
> > Running chkdsk again to see what the "normal" output looks like:
> >
> > [...]
> >
> > I am afraid I don't have any further info as I did not take a snapshot
> > of the volume before running chkdsk. )-:
>
> Thanks, this information was enough to reproduce.
>
> BTW, it seems that legal_ansi_char_array is broken, it forbids '"', '<',
> '>', '?', '*', but '|' and '\' treated as correct characters. This is
> very strange because does not conform to any namespace.
Depends on your definition of broken. It is what ntfs.sys does. So by
definition it is correct as ntfs.sys is the reference implementation.
btw. I am not convinced your fix to the collation error is correct. IIRC
in ntfs.sys collation error is set to -1, i.e. treated the same way as a
real -1 result. But that doesn't make sense to me either.
*Shrug* I guess it is better to return error instead of creating a badly
collated index...
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/
|