On Fri, 9 Apr 2004, Anton Altaparmakov wrote:
> On Thu, 8 Apr 2004, Szakacsits Szabolcs wrote:
> > On Thu, 25 Mar 2004, Anton Altaparmakov wrote:
> > > The difficulty is that there is no single bit saying "journal clean" or
> > > "journal dirty".
> >
> > On NTFS 3.1 in the 'flags' field of the restart area, the bit 1 (starting
> > from 0) tells apparently if NTFS is supposed to be clean or not. If the
> > value is set ('flags' field is 2) then NTFS is "clean", or at least it was
> > shutdown properly.
> >
> > Confirmations? Rebuttals?
>
> Er who says that?
Apparently NTFS 3.1 says so. You never checked?
> It certainly isn't the case for LFS 1.1 (the only one I know about).
> I believe XP uses LFS 1.1, too (as do NT4 and Win2k).
AFAIK, the only LFS user is NTFS. NTFS 3.0 and earlier isn't able to
access/mount NTFS 3.1. So NTFS 3.1 LFS version could be anything.
Moreover this feature is backward compatible. What happens if 3rd party
softwares can't interpret the flag? They waste time trying to recover a
consistent NTFS until they find so.
Microsoft invested a lot to improve NTFS for version 3.1 and the boot
time. Probably it was realised it's more efficient just mark the volume
clean if it was clean at shutdown and make a quick check for it at boot
time than parsing several times (redo, undo, etc) 50-100+ MB journal files
needlessly.
> The easiest way to find out which version of LFS you are looking at is to
> run ntfsdump_logfile /dev/partition | more or ntfsdump_logfile -f
> ntfs_image_file | more. You need the more as the log record stuff is a
> lot of bogus crap at the moment and it outputs tons of rubbish. But I
> have been doing lots of work on the restart pages parts and what I say
> there should be correct and the output from ntfsdump_logfile regarding the
> restart pages should be correct, too.
Yes, people could help out here also:
download/install ntfsprogs
./configure
make install
cd ntfsprogs
make ntfsdump_logfile
cp .libs/ntfsdump_logfile /usr/bin/
repeatedly crash (make an 'ntfsclone' just for your extra safety) and
shutdown Windows properly then run
ntfsdump_logfile partition | head -40 | grep flags
If Windows is XP/W2K3/Longhorn then
flags = 2 apparently means clean shutdown, no recovery needed
flags = 0 means unknows state, recovery needed
> > However all comments and guesses related to dirty/clean NTFS I've seen in
> > the NTFS doc and in the sources are bogus (at least on NTFS 3.1).
>
> Have you looked at the most recent include/ntfs/logfile.h? That contains
> a lot of good info about the restart pages and how dirty/clean can be
> distinguished. And that is I believe correct for LFS 1.1.
Yes, I meant for those with NTFS 3.1 and
http://linux-ntfs.sourceforge.net/ntfs/files/logfile.html
http://linux-ntfs.sourceforge.net/ntfs/concepts/restart.html
> If you believe they are bogus then please let me know which bits and
> why...
All comments because they are always the same on NTFS 3.1 independently if
Windows crashed or not.
Szaka
|