Re: Want to help with NTFS

From: Jeff V. Merkey (jmerkey@timpanogas.com)
Date: Mon Jul 10 2000 - 12:25:30 EST


Anton Altaparmakov wrote:
>
> O
> > 1. Check for the duplicate boot sector at sectors-1 instead of always
> > assumming it's supposed to be at sectors/2. This looks fixed, but you
> > should check to make certain you are not blindly writing to n/2
> > somewhere in the code when you update the boot sector for the volume.
>
> Argh. I thought it was checking at sectors-1 anyway. - This obviously
> needs to be changed ASAP. Everybody knows/should know that only WinNT 3.x
> used sectors/2 and WinNT4 + 2k use sectors-1 (I think this is stated in
> Regis <can't spell surname> infos).
>
> > 2. NTFS journalling is covered under a bunch of patents, and is
> > probably impossible to implement properly without infringing them. The
>
> )-:
>
> >
> I am well aware of the operational concepts of the LFS+NTFS. And your
> reasoning is also the same why I think there is corruption by not handling
> the journal. - Seing the patents issue which I was not aware off, I now
> think that the implementation for the linux driver will be without the
> journal BUT when mounting a volume read/write, we will scan the journal
> and check whether it is as it were "empty", i.e. a proper shutdown has
> occured. - If yes then everything is fine since NT/2k will stop after the
> analysis pass, or at least the redo and undo passes will have nothing to
> do (that's my understanding of it). If however the system was not shutdown
> properly we will either (user selectable mount option maybe?):
>
> - tell the user that she/he needs to mount the volume under NT/2k and run
> chkdsk on it (we can set the chkdsk flag if it is not set but it shouldn't
> be required since the NTFS+LFS will operate regardless but chkdsk might
> fix some more things [refering to bit 1, run chkdsk on mount]). We would
> then mount read-only and refuse r/w mounting.

Set the flag.

>
> - ignore the contents of the journal but mark it as empty anyway or
> completely get rid of it. - This is a nasty way of doing things, since it
> will result in data corruption due to log file contents not being
> redone/undone but it will stop the corruption due to windows
> redoing/undoing things randomly from an inconsistent journal.

Mark it empty. The info the journal will have already been committed to
the MFT -- the journal just allows the cache manager to go back and
verify each transaction. Just zapping it the first time it's munted
read/write will completely avoid this problem :-).

>
> Thinking about this, the first option should probably be the one to
> implement since the second will cause data corruption and we don't want
> that...
>
>
> I actually did some comparisons between NTFS v1.2 and NTFS v3.0 partitions
> and the way they are dealt with by NT/2k last weekend and found something
> interesting: NT4 when it sees a v3.0 NTFS parititon sets the 4th bit
> (=0x8) in the volume flags field. - I think that this is to signal win2k
> that an older NTFS driver has written to the new version NTFS partition.

Correct, there's also a MOUNTED_ON_NT4 bit in the Volume Flags Field as
well for W2K volumes that have been converted -- very good -- A+.

>>
> I was unable to complete my experimenting since Win2k decided to commit
> suicide on the system partition and even though it did a clean shutdown it
> refused to mount the partition again afterwards and the only way to read
> the partition now is using your diskedit utility from my NT4 install
> (which refuses to display the mounted partition stating there are errors).
> Diskedit does work and I can't see anything immediately wrong with it
> apart from the two MFT copies are inconsistent. )-: Anyway a reinstall is
> probably required here but I might first try to copy one of the MFTs on
> top of the other and see what happens first... [Note this is not the linux
> driver or NT4 at fault, since I only rebooted the computer and haven't
> done any writting to the partition in between and I never write mount the
> system partition on linux anyway...]

Sounds like we need a repair utility first so you don't have to keep
reinstalling W2K everytime the drive gets trashed. Set the dirty
squared bit, and you'll find that chkdsk will be able fix the volume
more often without always needing to re-install. You may also want to
download alritis image blaster or express from www.altris.com so you can
image your NTFS volumes and store them offline so when one gets trashed
you can just boot to DOS or linux and restore the volume. Will save you
a lot of time ....

:-)

Jeff

>
> Anton
>
> > 4. I think so long as this is being enabled for Linux/W2K migration, MS
> > may be more open to tolerating NTFS on Linux. Read only is already
> > there and without their help, but at the very least, MS customers who
> > want to migrate Linux/W2K should be allowed to without too much pain.
> >
> > :-)
> >
> > Jeff
> >
> > -
> > 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/
> >
>
> --
>
> Anton Altaparmakov Phone: +44-(0)1223-333541 (lab)
> Christ's College eMail: AntonA@bigfoot.com
> Cambridge CB2 3BU WWW: http://www-stu.christs.cam.ac.uk/~aia21/
> United Kingdom ICQ: 8561279

-
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/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:11 EST