Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 16 Oct 2001 00:42:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 16 Oct 2001 00:42:48 -0400 Received: from leibniz.math.psu.edu ([146.186.130.2]:48340 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Tue, 16 Oct 2001 00:42:32 -0400 Date: Tue, 16 Oct 2001 00:43:03 -0400 (EDT) From: Alexander Viro To: Linus Torvalds cc: linux-kernel@vger.kernel.org Subject: Re: [CFT][PATCH] large /proc/mounts and friends In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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/