tech-kern archive

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

Re: extended attributes and lsextattr/extattr_list_file

David Holland <> wrote:

> > Converting in libc is another option,
> That is by far the sanest way to do it.

The problem is that it will not work with NetBSD 5.x libc running on
NetBSD 6.0 kernel, a situation we had always supported.

>  > and we can also add a flavor flag to VOP_LISTEXTATTR so that we can
>  > require the filesystem to output the data in the appropriate format.
> Please don't.

What are the drawbacks? It require a large change to pull up to
netbsd-5, which is annoying for me. On the positive side, the code is
much cleaner, and this is the most efficient way performance-wise, since
we never have to convert: the data is produced in the right format in
the first place. And should we ever want a third format, we could
introduce another flag value.

I am experimenting, I will propose a patch soon for review

> That said, even if you don't like the suggestion of using struct
> dirent, ISTM that the preferred user API for listing extended
> attributes should be something more like opendir/readdir.

Well, using dirent-like structure is a weird idea, we already need two
format, I have trouble to see the interest of producing a third one and
always convert to the two others.

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index