linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: "Randy.Dunlap" <randy.dunlap@verizon.net>
Cc: linux-fsdevel@vger.kernel.org, chaffee@cs.berkeley.edu
Subject: Re: FAT-filesystem EOF marker problem
Date: Mon, 23 Sep 2002 05:18:04 +0200	[thread overview]
Message-ID: <20020923031804.GA16248@win.tue.nl> (raw)
In-Reply-To: <3D8D556B.4D3BF8B7@verizon.net>

On Sat, Sep 21, 2002 at 10:30:19PM -0700, Randy.Dunlap wrote:

> On 2002-Sept-15 a Linux-USB user reported a problem when using
> a file written by Linux to a CompactFlash (CF) card in an MP3
> player.  Linux and Windows can still read the CF card correctly,
> but the MP3 player cannot.  I have successfully reproduced this
> problem.
> 
> Initial problem report and thread begin at:
> http://marc.theaimsgroup.com/?l=linux-usb-users&m=103210507227709&w=2

There seem to be many more people with this problem.
One web page describing it is
http://home.earthlink.net/~ebrombaugh/fattools.html

> Windows (ME version at least) writes 0xfff for a FAT12 EOF marker.
> mtools writes 0xfff for a FAT12 EOF marker.
> Linux (v)fat filesystem writes 0xff8 for a FAT12 EOF marker.

> I would prefer to see something like (a) Linux uses 0xfff for
> FAT(12) EOF [and sign-extended for FAT16 and FAT32], or
> (b) Linux uses a mount option to indicate the EOF marker value,
> or (c) Linux dynamically checks what EOF marker value is in
> the FAT already, and continues to use that value [and continues
> to use 0xff8 as its default value].

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.

So, I would like to reject (b) - if a device does not work, very few
people will get the idea that the end-of-file marker used by the
FAT filesystem is to blame. And (a) is reasonable, that is what
Microsoft does. And (c) might be replaced by (c'): read the desired
EOF marker from FAT entry 1. If that yields an invalid value, use
what Microsoft does: 0xfff.

Andries

  parent reply	other threads:[~2002-09-23  3:18 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 [this message]
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
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=20020923031804.GA16248@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=chaffee@cs.berkeley.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=randy.dunlap@verizon.net \
    /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).