linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: case-insensitive rename support in the VFS
@ 2008-05-02  4:14 Barry Naujok
  2008-05-02  6:22 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Barry Naujok @ 2008-05-02  4:14 UTC (permalink / raw)
  To: linux-fsdevel@vger.kernel.org

As some of you know, I've been working on CI support for XFS.
Currently, the Linux VFS does not make this very easy and neat.

One issue I've encountered is the case of rename in a CI
filesystem where the destination is the same as the source
(both parent and child) differing only in case.

So, currently, do_rename() calls do_path_lookup() which
gets the source and destination dentries, etc. The third
parameter, flags, is stored in the nameidata structure
which is passed to the filesystem implementations of
lookup.

vfs_rename() checks to see if the two dentry inodes are
the same, and if so, just returns 0.

I propose adding a 7th LOOKUP_xxx flag for the rename case
where we indicate we are after an exact (non-CI) match for
the destination name in the lookup call in do_rename.

Filesystem support in lookup would check for this flag
in addition to LOOKUP_CONTINUE not existing (ie. at the
last component during lookup) and if so, do an exact
lookup rather than a CI lookup as it normally would do.
Traditional non-CI filesystems would ignore this flag.

If this is deemed acceptable, or a better idea is proposed,
I can write a patch for further scrutiny.

Regards,
Barry.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFC: case-insensitive rename support in the VFS
  2008-05-02  4:14 RFC: case-insensitive rename support in the VFS Barry Naujok
@ 2008-05-02  6:22 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2008-05-02  6:22 UTC (permalink / raw)
  To: Barry Naujok; +Cc: linux-fsdevel@vger.kernel.org, viro

On Fri, May 02, 2008 at 02:14:56PM +1000, Barry Naujok wrote:
> As some of you know, I've been working on CI support for XFS.
> Currently, the Linux VFS does not make this very easy and neat.
>
> One issue I've encountered is the case of rename in a CI
> filesystem where the destination is the same as the source
> (both parent and child) differing only in case.
>
> So, currently, do_rename() calls do_path_lookup() which
> gets the source and destination dentries, etc. The third
> parameter, flags, is stored in the nameidata structure
> which is passed to the filesystem implementations of
> lookup.
>
> vfs_rename() checks to see if the two dentry inodes are
> the same, and if so, just returns 0.
>
> I propose adding a 7th LOOKUP_xxx flag for the rename case
> where we indicate we are after an exact (non-CI) match for
> the destination name in the lookup call in do_rename.
>
> Filesystem support in lookup would check for this flag
> in addition to LOOKUP_CONTINUE not existing (ie. at the
> last component during lookup) and if so, do an exact
> lookup rather than a CI lookup as it normally would do.
> Traditional non-CI filesystems would ignore this flag.

I think passing a flag to the filesystem for this is fine, but
flag in nameidata won't do it since lookup is going to lose the
nameidata argument soon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-02  6:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02  4:14 RFC: case-insensitive rename support in the VFS Barry Naujok
2008-05-02  6:22 ` Christoph Hellwig

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).