"Anton B. Rang" <[EMAIL PROTECTED]> wrote:
> > OK, thanks. I still haven't got any answer to my original question,
> > though. I.e., is there some way to know what text the
> > filename is, or do I have to make a more or less wild guess what
> > encoding the program that created the file used?
> 
> You have to guess.

Ouch! Guessing sucks. (By the way, that's why I switched to ZFS with its
internal checksums, so that I wouldn't have to guess if my data was OK.)

Thanks for the answer, though.

Do you happen to know where programs in (Open)Solaris look when they
want to know how to encode text to be used in a filename? Is it
LC_CTYPE?

> NFS doesn't provide a mechanism to send the encoding with the
> filename; I don't believe that CIFS does, either.

Really?!? That's insane! How do programs know how to encode filenames
to be sent over NFS or CIFS?

> If you're writing the application, you could store the encoding as an
> extended attribute of the file. This would be useful, for instance,
> for an AFP server.

OK. But then I'd have to hack a similar change into all other programs
that I use, too.

> > > The trick is that in order to support such things as
> > > casesensitivity=false for CIFS, the OS needs to know what
> > > characters are uppercase vs lowercase, which means it needs to
> > > know about encodings, and reject codepoints which cannot be
> > > classified as uppercase vs lowercase.
> > 
> > I don't see why the OS would care about that. Isn't that the job of
> > the CIFS daemon?
> 
> The CIFS daemon can do it, but it would require that the daemon cache
> the whole directory in memory (at least, to get reasonable
> efficiency).

I guess that depends on what file access functions there are for the
file system.

> If you leave it up to the CIFS daemon, you also wind up with problems
> if you have a single sharepoint shared between local users, NFS &
> CIFS -- the NFS client can create two files named "a" and "A", but
> the CIFS client can only see one of those.

Not necessarily. There could be some (nonstandard) way of accessing
such duplicates (e.g., by having the CIFS daemon append "[dup-N]" or
somesuch to the name). And even if that problem did exist it might still
be OK for CIFS access to have that limitation.


Regards,

Marcus
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to