Re: [RFC][PATCHSET v3] non-recursive pathname resolution & RCU symlinks

From: Jeremy Allison
Date: Thu May 14 2015 - 19:57:33 EST

On Thu, May 14, 2015 at 04:24:13PM -0700, Linus Torvalds wrote:
> On Thu, May 14, 2015 at 3:09 PM, Jeremy Allison <jra@xxxxxxxxx> wrote:
> >
> > Of course we tell people to just set their filesystems
> > up using mkfs.xfs -n version=ci :-).
> So ASCII-only case-insensitivity is sufficient for you guys?

No it's not enough really. But for specific Windows apps that
use restricted namespaces (and there are such) it works.

ZFS on *BSD does do full case-insenitive lookups (utf8) as part of
FreeNAS. I think if it's configured a SMB-only share they turn
that on.

> Doing case-insensitive lookups at a vfs layer level wouldn't be
> impossible (add some new lookup flag, so it would *not* be
> per-filesystem, it would be per-operation!), but the *full*
> case-insensitivity space in utf-8 is too much to expect. Especially
> since different people have different opinions on what it even should
> be.

Yeah, Apple are the real sinners here. utf8-compose-characters - pah !

> What else is problematic? I think you want an error on symlinks in the
> middle, right? So that you can do those manually? I also assume you
> don't like to follow ".." due to containment issues?

We already strip . and .. out of incoming pathnames. Once we've
walked the path (following links) we then use realpath() to ensure
the full path is under the exported share "path =" directive.

> Adding (again per-lookup) flags for "no symlinks" and "no dotdot")
> would be trivial (much more so than the case insensitivity). Would you
> require "error out on non-ascii characters" too, to then handle the
> complex cases by hand?

Don't need the dot-dot stuff - "no symlinks" would be useful,
but you have to remember Samba is still portable to *BSD and
Solaris-clones (all that anyone really cares about these days)
so we'll have to keep the old code paths too.

> I dunno. But it *may* be worth it to really try to give samba what it
> wants. Of course, if samba is happy doing all the name caching in user
> space, then that's not worth worrying about.

Case insensitive pathname lookup is the one I remember
Windows sales guys beating us up on benchmarks (create 1,000,000 files
in a directory and then have a client that looks for a file
that *doesn't* exist :-).

Hopefully Volker is also on this thread and can chime in with
some requirements of his own :-).

> And the reason I don't use samba myself is that I'm not a fan of
> network filesystems. I want my filesystems low-latency and right there
> on the local ssd, thank you very much. But if you have some
> local-machine benchmarkign thing you use, I guess I could use that to
> see what the profile looks like...

You don't know what you're missing mate !

I use it every day via my local NAS to play music (via SONOS
Linux clients) and movies/TV (SageTV Linux boxes) everywhere
in the house. I don't even have a Windows box (other than
VM's for testing) anywhere.

But my house is fully wired for gigabit, I wouldn't do that over
wireless :-).

Samba, it's not just for Windows anymore :-).
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at