bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-6.3: spurious stat_dtype failure


From: Michael Deutschmann
Subject: Re: coreutils-6.3: spurious stat_dtype failure
Date: Wed, 4 Oct 2006 12:40:12 -0700 (PDT)

On Tue, 3 Oct 2006, you wrote:
> I'm not surprised.
> I was counting on someone like you to tell me how to
> perform the check reliably :-)

I don't think it's possible.  The best you could do is create a special
shim C program just to check if those files return DT_UNKNOWN.

> > Also, I understand that
> > even on a cutting edge kernel, the feature will not be available if the
> > given ext2 filesystem was originally formatted for compatibility to old
> > kernels.
>
> Can you point to documentation supporting that?

Look at the "mke2fs" manpage, under the '-O' option.  There's a feature
called "filetype".  The description is vague, but I think this refers to
d_type.

It makes a certain amount of sense.  dirent.d_type is only a speed hack,
after all.  It would be silly for the kernel to do a stat() internally on
every readdir() just to support it -- and that would be required if the
filetype info was only stored in the inode table.

I understand what modern Linux actually does is embed redundant type
information in the directory itself -- where it can be accessed with no
extra effort.  This isn't possible while keeping the format fully
compatible to 2.0.

---- Michael Deutschmann <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]