mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Cc: dosfstools <daniel@debian.org>, mtools <Alain@linux.lu>,
	linux-kernel@vger.kernel.org
Subject: Re: End of FAT directories
Date: Sat, 23 Apr 2011 05:40:43 +0900	[thread overview]
Message-ID: <87hb9qnho4.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1303498136.8485.128.camel@localhost> (Michael Karcher's message of "Fri, 22 Apr 2011 20:48:56 +0200")

Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> writes:

> I'm afraid this is not a pure academic post, but I write it because I
> spent hours on trying to find out why I had problem to make some USB
> flash drive bootable with syslinux (which follows the MS model on
> loading files while booting) after copying files with the linux kernel
> (which follows the Linux model, obviously), additionally dosfsck on that
> stick showed quite strange results (it dived into a directory that does
> no longer exist). Another incarnation is mentioned in
> https://wiki.physik.fu-berlin.de/linux-minidisc/doku.php?id=himddiskformat
> in the section "Filesystem Issues with some Models on Linux". Some of
> the Sony devices clear only the first half of the cluster containing
> that subdirectory to zeroes, which works fine if software aborts on the
> first entry being zero, but obviously makes problem if the second half
> of the cluster is accessed.
>
> I would really appreciate it if all FOSS working on FAT would agree to
> one behaviour, and I think we have no choice except being MS compatible
> (i.e. implement the behaviour as it has always been in DOS and Windows)

It is simply the bug of Sony devices, and can't work on it for both of
Windows and Linux (it have to be fixed by fsck). Yeah, I know Linux can
stop on first zeroed directory entry (I will not complain about it), but
it doesn't fix the problem at all.

Assume 0-3 directory entires fine, 4 is zeroed entry, and 5- is crappy data.

1| ENT1        valid
2| ENT2        valid
3| ENT3        valid
4|             zeroed
5| djafdjoi    crappy data
...

Windows will stop at 4, but if windows write new entry as 4, 5- will
show those up as crap like linux. I.e. never adds new zeroed entry as
end of directory. In short, in spec, directory must be initialized by
zero (it is same assumption on linux and windows).

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  parent reply	other threads:[~2011-04-22 20:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 18:48 Michael Karcher
2011-04-22 18:51 ` End of FAT directories (added missing reference) Michael Karcher
2011-04-22 20:40 ` OGAWA Hirofumi [this message]
2011-04-22 21:56   ` End of FAT directories Michael Karcher
2011-04-23  0:06     ` OGAWA Hirofumi
2011-04-23 11:38       ` Michael Karcher
2011-04-23 13:46         ` OGAWA Hirofumi
2011-04-28 13:25         ` Pavel Machek
2011-04-28 13:43           ` Michael Karcher
2011-04-28 15:44             ` OGAWA Hirofumi
2011-06-28 23:09               ` Alain Knaff
2011-04-28 20:51             ` Pavel Machek

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=87hb9qnho4.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=Alain@linux.lu \
    --cc=daniel@debian.org \
    --cc=kernel@mkarcher.dialup.fu-berlin.de \
    --cc=linux-kernel@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

Powered by JetHome