[330] in arla-drinkers
Re: get_unused_fd()
daemon@ATHENA.MIT.EDU (Magnus Ahltorp)
Tue Oct 20 19:33:05 1998
From owner-arla-drinkers@stacken.kth.se Tue Oct 20 23:33:04 1998
Return-Path: <owner-arla-drinkers@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 21971 invoked from network); 20 Oct 1998 23:33:03 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
by bloom-picayune.mit.edu with SMTP; 20 Oct 1998 23:33:03 -0000
Received: (from majordom@localhost)
by sundance.stacken.kth.se (8.8.8/8.8.8) id BAA27797
for arla-drinkers-list; Wed, 21 Oct 1998 01:27:50 +0200 (MET DST)
Received: (from map@localhost)
by sundance.stacken.kth.se (8.8.8/8.8.8) id BAA27784;
Wed, 21 Oct 1998 01:27:37 +0200 (MET DST)
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Magnus Ahltorp <map@stacken.kth.se>, linux-kernel@vger.rutgers.edu,
arla-drinkers@stacken.kth.se
Subject: Re: get_unused_fd()
References: <Pine.LNX.3.96.981020140435.2217Q-100000@penguin.transmeta.com>
From: Magnus Ahltorp <map@stacken.kth.se>
Date: 21 Oct 1998 01:27:36 +0200
In-Reply-To: Linus Torvalds's message of Tue, 20 Oct 1998 14:04:51 -0700 (PDT)
Message-ID: <lv1vhleak5z.fsf@sundance.stacken.kth.se>
Lines: 56
X-Mailer: Gnus v5.3/Emacs 19.34
Sender: owner-arla-drinkers@stacken.kth.se
Precedence: bulk
> > Does anyone have religious problems with this patch?
>
> I'd like to know who and why needs it..
I sent a message to the list some weeks ago (included below) and since
no one has commented on that, I supposed that there were no
objections.
The thing is, it's very hard to do some serious file system modules
hacking without these functions. Since the Linux module system is
built the way it is, symbol names have to, as you know, be explicitly
exported.
This is all very good (since you get nice things like version
symbols), but it relies on the fact that someone puts the
EXPORT_SYMBOL lines in the kernel. Therefore, I am now proposing this
patch.
The particular purpose is an open split into two parts (the lookup
phase and the opening phase). Cookies are used to divide the process
between two syscalls. This is used in Arla, the free AFS client from
KTH.
Since the symbol has not been exported, development code must look
like this:
int (* get_unused_fd_p)(void) = 0xf0043c3c;
This is what I'm trying to avoid.
/Magnus
map@stacken.kth.se
---------------------------------------------------------------
From: Magnus Ahltorp <map@stacken.kth.se>
Subject: get_unused_fd & get_empty_filp
To: linux-kernel@vger.rutgers.edu
Date: 08 Oct 1998 21:56:28 +0200
X-From-Line: nobody Thu Oct 8 21:56:32 1998
Sender: map@yakko.stacken.kth.se
Message-ID: <lv1sogyakur.fsf@yakko.stacken.kth.se>
X-Mailer: Gnus v5.3/Emacs 19.34
Lines: 12
Xref: yakko.stacken.kth.se sent-mail:151
X-Gnus-Article-Number: 151 Thu Oct 8 21:56:32 1998
Would it be very bad if get_unused_fd() and get_empty_filp() were
exported, so that modules are able to allocate entries in the file
table?
This is absolutely necessary for "half way" open system calls, that
does the file name lookup in one part, and the actual opening in the
second part.
/Magnus
map@stacken.kth.se