[PATCH] POSIX_FADV_{DONTNEED,NOREUSE} defines on s390-64.

Martin Schwidefsky schwidefsky@de.ibm.com
Mon Jul 11 11:13:00 GMT 2005


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



More information about the Libc-hacker mailing list