This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, release/2.11/master, updated. glibc-2.11-24-g1bc1954


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.11/master has been updated
       via  1bc1954c735788ae9e7f954e18cf39a22f964d06 (commit)
      from  16b583ea7ec0b96c8908e6c5418836f74554329a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bc1954c735788ae9e7f954e18cf39a22f964d06

commit 1bc1954c735788ae9e7f954e18cf39a22f964d06
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Nov 17 18:04:51 2009 -0800

    Fix sync_file_range on ppc/ppc64.
    
    I've noticed that sync_file_range is a stub on ppc/ppc64.
    The kernel on these arches provides sync_file_range2 syscall with swapped
    parameters.
    The following completely untested patch ought to fix this.
    (cherry picked from commit 8ad81b316bc158746aee18aa7d7df44d3eb61871)

diff --git a/ChangeLog b/ChangeLog
index b6f77ff..34212ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range):
+	Implement using sync_file_range2 syscall if __NR_sync_file_range2
+	is defined.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c: New
+	file.
+
 2009-11-19  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #10958]
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
similarity index 82%
copy from sysdeps/unix/sysv/linux/sync_file_range.c
copy to sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
index 4e267a1..1ca4ce6 100644
--- a/sysdeps/unix/sysv/linux/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
@@ -1,5 +1,5 @@
 /* Selective file content synch'ing.
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,14 +25,11 @@
 #include <sys/syscall.h>
 
 
-#ifdef __NR_sync_file_range
+#if defined __NR_sync_file_range2
 int
 sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
 {
-  return INLINE_SYSCALL (sync_file_range, 6, fd,
-			 __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
-			 __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
-			 flags);
+  return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
 }
 #else
 int
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
index 4e267a1..41e08e0 100644
--- a/sysdeps/unix/sysv/linux/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/sync_file_range.c
@@ -1,5 +1,5 @@
 /* Selective file content synch'ing.
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -34,6 +34,14 @@ sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
 			 __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
 			 flags);
 }
+#elif defined __NR_sync_file_range2
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+  return INLINE_SYSCALL (sync_file_range2, 6, fd, flags,
+			 __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+			 __LONG_LONG_PAIR ((long) (to >> 32), (long) to));
+}
 #else
 int
 sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    8 ++++++++
 .../{ => powerpc/powerpc64}/sync_file_range.c      |    9 +++------
 sysdeps/unix/sysv/linux/sync_file_range.c          |   10 +++++++++-
 3 files changed, 20 insertions(+), 7 deletions(-)
 copy sysdeps/unix/sysv/linux/{ => powerpc/powerpc64}/sync_file_range.c (82%)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]