public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philippe De Muyter <phdm@macqel.be>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH vfat] allow retrieving entries with trailing dots
Date: Thu, 11 Mar 2010 00:58:08 +0100	[thread overview]
Message-ID: <20100310235808.GA4353@frolo.macqel> (raw)
In-Reply-To: <87hboow105.fsf@devron.myhome.or.jp>

Hi Ogawa,

On Thu, Mar 11, 2010 at 02:16:26AM +0900, OGAWA Hirofumi wrote:
> Philippe De Muyter <phdm@macqel.be> writes:
> 
> >> This introduces unneeded directory-parse to standard one.  And for
> >
> > No.  There will only be a second parse if someone is looking for a filename
> > with a trailing dot, and it is not found (*).  I there is no trailing dot in qname, only the first fat_search_long will be called, because len after vfat_striptail_len would be equal to qname->len.
> 
> Yes, I'm saying about trailing-dot filename case. Any disadvantage to
> standard one is unacceptable to workaround.

This is unavoidable.
Let me explain again, with better words I hope,
IOMEGA firmware allows creation of files/directories whose name have
trailing dots.

When I connect such a disk (which is vfat-formatted) via USB to my
linux computer, I want consistency between what getdents says and what
open or stat will do : if getdents says there is a file called "a.",
currently open("a.") and stat("a.") fail with ENOENT No such file or directory.
I would like open("a.") or stat("a.") to succeed.  Nothing more.
For that, I need to first search for the not truncated name.  If that fails
and the filename can be truncated then and only then, try again with the
truncated name.  I cannot let getdents truncate the name, because there 
could also be a different file really called "a".

There would be no advantage in making the change in fat_search_long,
because while searching for "a.", even if it finds a "a" entry, it must
continue till the end of the directory to be sure there is no "a.".

> 
> >> IO-MEGA, this wouldn't provide proper filename handling.
> >
> > For accessing IO-MEGA disk in read mode, this is perfect.  I didn't want
> > to replicate IO-MEGA write behaviour here, only fix the read behaviour for
> > such simple commands as 'ls', 'find' and all the directory browsers.
> >
> >> If it wants to handle the tailing-dot as a part of filename, it
> >> shouldn't be able to access to the stripped-dots filename. (For simple
> >> example, I guess you can't do "mv a a." with this patch.)
> >
> > As I explained above, I only fix read-access on IO-MEGA drives, while
> > preserving standard behaviour for write mode.
> >
> > But I'll try your testcase asap.  Which behaviour do you expect ?
> > I would expect a no-op, because I did not change the write-behaviour.
> 
> Those sound like strange.  Well, I expect there is no any change to
> standard one for IO-MEGA.
> 
> And I can't see what is your read-access mean in here. What did this
> expect to behave like e.g. following operations,

Sorry bad wording. I meant I do not want to change the behaviour for file
creation, only to fix the behaviour while accessi8ng existing files.

> 
> 	$ ls
>         a.. a. a
>         $ rm -rf *
> 
>         $ ls
>         a..
>         $ touch a.
>         $ touch a
> ...
> 
> I assumed you want to define "a." and "a" are different name on
> "mv a a.", and _totally_.

For file creation and renaming, I want to introduce no change, because there
is no problem.  If one wants to create a "a." file on a IO-MEGA disk suing
linux and USB, it is currently called "a", and that will remain exactly the
same.

Best regards

Philippe

  reply	other threads:[~2010-03-10 23:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 12:32 [PATCH vfat] allow retrieving entries with trailing dots Philippe De Muyter
2010-03-10 14:44 ` OGAWA Hirofumi
2010-03-10 16:14   ` Philippe De Muyter
2010-03-10 17:16     ` OGAWA Hirofumi
2010-03-10 23:58       ` Philippe De Muyter [this message]
2010-03-11  9:26         ` OGAWA Hirofumi
2010-03-11 12:02           ` Philippe De Muyter
2010-03-11 12:41             ` OGAWA Hirofumi
2010-03-13 11:31               ` Philippe De Muyter
2010-03-13 13:06                 ` OGAWA Hirofumi
2010-03-14 10:39                   ` [PATCH vfat] IOMEGA network drive compatibility Philippe De Muyter
2010-03-14 11:17                     ` OGAWA Hirofumi
2010-03-14 14:13                       ` Philippe De Muyter
2010-03-14 14:52                         ` OGAWA Hirofumi
  -- strict thread matches above, loose matches on Subject: below --
2009-03-19 18:11 [PATCH] parport netmos 9845 & 9855 1P4S fixes Philippe De Muyter
2009-03-23  8:50 ` Philippe De Muyter
2009-03-23 14:00   ` Philippe De Muyter
2009-09-25 19:46     ` [PATCH RFC] vfat and Simon_&_Garfunkel-Wednesday_Morning,_3_a.m Philippe De Muyter
2009-09-29 10:05       ` OGAWA Hirofumi
2009-09-29 10:25         ` Philippe De Muyter
2009-09-29 22:43           ` Philippe De Muyter
2009-09-30 11:02             ` OGAWA Hirofumi
2009-09-30 22:19               ` Philippe De Muyter
2009-10-01 10:42                 ` OGAWA Hirofumi
2010-02-08  9:39                   ` [PATCH vfat] allow retrieving entries with trailing dots Philippe De Muyter

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=20100310235808.GA4353@frolo.macqel \
    --to=phdm@macqel.be \
    --cc=hirofumi@mail.parknet.co.jp \
    --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