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 <[EMAIL PROTECTED]>


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to