From: Alain Knaff <alain@knaff.lu>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>,
Pavel Machek <pavel@ucw.cz>, dosfstools <daniel@debian.org>,
mtools <Alain.Knaff@linux.lu>,
linux-kernel@vger.kernel.org
Subject: Re: End of FAT directories
Date: Wed, 29 Jun 2011 01:09:31 +0200 [thread overview]
Message-ID: <4E0A5F2B.9010302@knaff.lu> (raw)
In-Reply-To: <87d3k6idnz.fsf@devron.myhome.or.jp>
Hello,
I've just released mtools 4.0.17
It fixes the issue by:
1. Considering all directory entry after an "endmark" (first byte of
filename zero) to be free, even if the first byte is not zero (this
avoids the problem of not finding any free space because of phantom
entries after endmark)
2. Writing an endmark after having created a filename that's beyond the
endmark (this avoids the problem of accidentally transforming phantom
entries into real entries by "filling the gap")
http://www.gnu.org/software/mtools/download.html
Thanks for drawing my attention to this issue.
Regards,
Alain
On 2011-04-28 17:44, OGAWA Hirofumi wrote:
> Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> writes:
>
>> Am Donnerstag, den 28.04.2011, 15:25 +0200 schrieb Pavel Machek:
>>>>> For overwriting the
>>>>> zeroed entry, why we have to check all entries until see next zeroed
>>>>> (yeah, now, we allowed the crappy data after zeroed)?
>>>> My point was not about checking all entries until the next zeroed entry,
>>>> which is overcomplicating stuff. I meant that if we hit the end (i.e.
>>>> the first zeroed entry) when searching for free slots, in that case we
>>>> just clear the one entry directly following the inserted entries. This
>>>> makes sure that no files magically appear. I *do* understand that
>>> This sounds like a good idea, and costs nothing. I hope we can
>>> convince Ogawa...
>>
>> I am going to implement that and publish a patch. If the patch is clean
>> enough, maybe we can convince him. But the freedom of open source can't
>> prevent me from using a patch like that, of course. And maybe it also
>> helps when the patch gets some testing.
>
> Of course, it's good to publish. However if you can't detect buggy or
> corrupted directory, I wouldn't ack to help buggy stuff.
>
> So it can be the mount option, but I can't see at all the point it is
> in-kernel as FS.
>
>>> Kernel should stop at zero invalid entry.
>
> I'm not complaining to stop at zero. Rather I acked already if it didn't
> overwrite after zeroed entry.
>
>>> fsck should consider any garbage past zero entry as an error, and zero
>>> it out. (Complaining about duplicate blocks is unhelpful but better
>>> than nothing. It should really zero the garbage out.)
>>
>> In fact, what you describe is something I would call "consistent". I was
>> not implying that kernel and dosfsck should do exactly the same thing,
>> but I was implying that the kernel and dosfsck should either both or
>> none consider entries past the gap as existing file.
>> Current state is: both consider past-gap entries valid. Your described
>> state will be: none consider past-gap entries valid. The behaviour you
>> describe is exactly what I would imagine as best way to go. Maybe fsck
>> should ask for "shift post-gap entries/create a dummy deleted entry"
>> vs. "clear post-gap entries".
>
> Yes. Also my opinion is the fsck should get ack from user to overwrite
> data or salvage (has possibility to salvage) if interactive mode, then
> fixes it.
>
> Thanks.
next prev parent reply other threads:[~2011-06-28 23:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-22 18:48 End of FAT directories Michael Karcher
2011-04-22 18:51 ` End of FAT directories (added missing reference) Michael Karcher
2011-04-22 20:40 ` End of FAT directories OGAWA Hirofumi
2011-04-22 21:56 ` 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 [this message]
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=4E0A5F2B.9010302@knaff.lu \
--to=alain@knaff.lu \
--cc=Alain.Knaff@linux.lu \
--cc=daniel@debian.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=kernel@mkarcher.dialup.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.