From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org, drepper@redhat.com
Subject: Re: [PATCH] Add getdents32t syscall
Date: Thu, 26 Feb 2004 14:03:27 -0800 [thread overview]
Message-ID: <20040226140327.0d46cd1e.rddunlap@osdl.org> (raw)
In-Reply-To: <20040226193819.GA3501@sunsite.ms.mff.cuni.cz>
On Thu, 26 Feb 2004 20:38:19 +0100 Jakub Jelinek wrote:
| glibc struct dirent has d_type field (similarly to struct dirent64).
| Because no 32-bit getdents syscall provides this field to userland,
| glibc needs to use getdents64 syscall even for 32-bit getdents
| (and readdir etc.) and convert dirent entries from struct dirent64
| to struct dirent. The code is quite complicated and as the former
| is bigger and the size of 64-bit dirents cannot be predicted accurately,
| it can happen that glibc reads too many entries and has to seek back
| on the dir etc.
|
| The following patch introduces a new syscall (on 32-bit architectures),
| which fills in 32-bit struct dirent with d_type member.
| With this syscall glibc can simply call this syscall in 32-bit getdents
| and be done with it, no seeking, issues with NFS zero extended d_ino values,
| buffer translation etc. sys_getdents32t (the t in there is for type,
| to differentiate it from compatibility sys_getdents32 which don't provide
| d_type) function should be usable both on 32-bit arches and in 32-bit
| compatibility layers on 64-bit arches (on most arches directly, if
| the arguments are zero extended in assembly).
|
| +asmlinkage long sys_getdents32t(unsigned int fd, struct linux_dirent32t __user * dirent, unsigned int count)
| +{
Please add function prototype for that to include/linux/syscalls.h.
Thanks,
--
~Randy
next prev parent reply other threads:[~2004-02-26 22:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-26 19:38 Jakub Jelinek
2004-02-26 22:03 ` Randy.Dunlap [this message]
2004-02-26 22:15 ` Linus Torvalds
2004-02-26 22:25 ` Linus Torvalds
2004-02-26 22:29 ` Ulrich Drepper
2004-02-26 23:00 ` Linus Torvalds
2004-02-26 22:32 ` Jakub Jelinek
2004-02-26 23:15 ` Linus Torvalds
2004-02-27 1:33 ` Ulrich Drepper
2004-02-27 6:16 ` Linus Torvalds
2004-02-27 7:05 ` Ulrich Drepper
2004-02-28 23:21 ` Jamie Lokier
2004-02-27 1:46 ` Andreas Dilger
2004-02-27 3:36 ` Theodore Ts'o
2004-02-29 0:25 ` Jamie Lokier
2004-02-27 19:28 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040226140327.0d46cd1e.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=drepper@redhat.com \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®