public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: libc-hacker@sources.redhat.com
Subject: [PATCH] POSIX_FADV_{DONTNEED,NOREUSE} defines on s390-64.
Date: Mon, 11 Jul 2005 11:13:00 -0000	[thread overview]
Message-ID: <20050711111323.GA9994@localhost.localdomain> (raw)


Hi,
our testers noticed that the definitions of POSIX_FADV_DONTNEED and
POSIX_FADV_NOREUSE of the glibc and the linux kernel differ. There
are two options to fix this problem: in the glibc or in the kernel.
I considered this for a while and came to the conclusion that this
is better fixed in the glibc. To fix this in the kernel I'd need to
analyse the arguments of the compat fadvise system call and change
the 31 bit defines to the 64 bit defines. The 64 bit applications
that are currently using DONTNEED and NOREUSE always get -EINVAL.
Nobody complained so far.

blue skies,
  Martin.

2005-07-11  sky  <sky@localhost.localdomain>

	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h (POSIX_FADV_DONTNEED,
	POSIX_FADV_NOREUSE): Use correct values for s390-64.

diff -urpN libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h libc-s390/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
--- libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h	2004-08-23 09:28:45.000000000 +0200
+++ libc-s390/sysdeps/unix/sysv/linux/s390/bits/fcntl.h	2005-07-11 12:34:36.000000000 +0200
@@ -190,13 +190,8 @@ struct flock64
 # define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
 # define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
 # define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
-# if __WORDSIZE == 64
-#  define POSIX_FADV_DONTNEED	6 /* Don't need these pages.  */
-#  define POSIX_FADV_NOREUSE	7 /* Data will be accessed once.  */
-# else
-#  define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
-#  define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
-# endif
+# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
+# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
 #endif
 
 __BEGIN_DECLS

             reply	other threads:[~2005-07-11 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11 11:13 Martin Schwidefsky [this message]
2005-07-11 16:55 ` Ulrich Drepper
2005-07-12  7:47   ` Martin Schwidefsky
2005-07-14  9:02   ` Martin Schwidefsky
2005-07-14 15:00     ` Ulrich Drepper
2005-07-12 11:49 Martin Schwidefsky

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=20050711111323.GA9994@localhost.localdomain \
    --to=schwidefsky@de.ibm.com \
    --cc=libc-hacker@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).