Re: [CFT][PATCH] large /proc/mounts and friends

Alexander Viro (viro@math.psu.edu)
Tue, 16 Oct 2001 00:43:03 -0400 (EDT)


On Mon, 15 Oct 2001, Linus Torvalds wrote:

> So you'd have the start be something like
>
> p = m->op->start(m);
> if (m->did_lseek) {
> m->did_lseek = 0;
> p = m->op->seek(m, pos);
> }
> p = m->op->next(m, p);
>
> instead of that for-loop..

Umm... That assumes that we actually can keep state. Neither /proc/mounts
nor /proc/ksyms can do that (well, /proc/mounts can - at the price of really
dirty trick; we can insert a dummy element into vfsmntlist and use it as a
cursor, but I'd rather Not Go There(tm)).

However, having ->seek() (with default being a loop) makes sense. I'll
play with that area and try to get a decent API - I understand what you
want, but there are several other issues I'd like to deal with. I suspect
that ->start() semantics needs to be changed a bit...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/