From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-fsdevel@vger.kernel.org
Subject: Re: FAT-filesystem EOF marker problem
Date: 24 Sep 2002 12:34:22 -0700 [thread overview]
Message-ID: <amqenu$cic$1@cesium.transmeta.com> (raw)
In-Reply-To: Pine.LNX.4.33L2.0209222319590.20873-100000@dragon.pdx.osdl.net
Followup to: <Pine.LNX.4.33L2.0209222319590.20873-100000@dragon.pdx.osdl.net>
By author: "Randy.Dunlap" <rddunlap@osdl.org>
In newsgroup: linux.dev.fs.devel
> |
> | My docs say: FAT entry 0 contains the media descriptor byte.
> | FAT entry 1 contains the EOF marker, except that the high order two
> | bits can be used for other purposes.
>
> And the value that I see there is 0xfff.
>
Fat entry 0 contains the media descriptor byte, and fat entry 1 *used*
to contain the EOC mark, but has been retconned as the volume dirty
bit (Microsoft OSs don't recognize a volume dirty flag for FAT12,
however; this is presumably because of the MS assumption that FAT12 ==
floppy.):
For FAT16: ClnShutBitMask = 0x8000; HrdErrBitMask = 0x4000;
For FAT32: ClnShutBitMask = 0x08000000; HrdErrBitMask = 0x04000000;
Bit ClnShutBitMask If bit is 1, volume is clean . If bit is 0,
volume is dirty . This indicates that the file system driver did not
Dismount the volume properly the last time it had the volume
mounted. It would be a good idea to run a Chkdsk/Scandisk disk repair
utility on it, because it may be damaged.
Bit HrdErrBitMask If this bit is 1, no disk read/write errors were
encountered. If this bit is 0, the file system driver encountered a
disk I/O error on the Volume the last time it was mounted, which is an
indicator that some sectors may have gone bad on the volume. It would
be a good idea to run a Chkdsk/Scandisk disk repair utility that does
surface analysis on it to look for new bad sectors.
Either way, I vote we should always use all ones of the EOC mark.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
next prev parent reply other threads:[~2002-09-24 19:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-22 5:30 FAT-filesystem EOF marker problem Randy.Dunlap
2002-09-22 18:18 ` OGAWA Hirofumi
2002-09-22 18:53 ` Randy.Dunlap
2002-09-23 3:18 ` Andries Brouwer
2002-09-23 6:24 ` Randy.Dunlap
2002-09-23 7:59 ` OGAWA Hirofumi
2002-09-23 18:08 ` Randy.Dunlap
2002-09-24 19:36 ` H. Peter Anvin
2002-09-24 21:36 ` Randy.Dunlap
2002-09-24 19:34 ` H. Peter Anvin [this message]
2002-09-24 21:08 ` Andries Brouwer
2002-09-24 19:27 ` H. Peter Anvin
2002-09-24 19:40 ` H. Peter Anvin
2002-09-24 21:11 ` Andries Brouwer
2002-09-24 21:40 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='amqenu$cic$1@cesium.transmeta.com' \
--to=hpa@zytor.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).