Re: mc and ZFS (or other filesystems with funky st_size)
- From: Ed Ravin <eravin panix com>
- To: mc-devel gnome org
- Subject: Re: mc and ZFS (or other filesystems with funky st_size)
- Date: Mon, 31 Mar 2008 17:41:52 -0400
No response yet - can anyone theorize on what would make mc switch
from the current working directory to the / directory? I see the
same thing happens if I chmod my current directory perms to zero.
On Mon, Mar 24, 2008 at 02:01:34AM -0400, Ed Ravin wrote:
> I'm having trouble using mc in a NetBSD 3.0 environment. Everything
> works normally except when I tell mc to look at directories on a particular
> NFS server. That server is a Solaris 10 box using ZFS. When I start mc
> while cd'd to a directory on that server, when mc comes up it shows the
> contents of / instead. Running a shell command shows that mc has chdir'd
> to /.
> My first guess as to the cause of the problem was that ZFS reports
> a different value than "normal" in st_size when you stat a directory
> entry. Instead of a bytecount which you divide by some constant (usually
> 24) to get the number of items in the directory, ZFS reports the number
> of entries in the directly in st_size. This confuses older implementations
> of scandir(), and especially programs that implement their own versions
> of directory browsers that try to figure out how many items are in a
> directory from st_size.
> But I wasn't able to verify if that guess was correct - mc does not
> seem to use scandir and I didn't see any obvious misuse of st_size.
> Any idea what's going on here? Is this problem related to st_size,
> or is there something else about ZFS that mc doesn't like?
> -- Ed
> Mc-devel mailing list
Ed Ravin | "The law, in its majestic equality, forbids the rich as
| well as the poor to sleep under bridges, to beg in the
eravin@ | streets, and to steal bread."
panix.com | --Anatole France, Le Lys Rouge 
][Date Next] [Thread Prev