* Re: [PATCH] git-p4: improve performance with large files
From: Sam Hocevar @ 2009-03-05 17:23 UTC (permalink / raw)
To: git
In-Reply-To: <20090305100527.shmtfbdvk0ggsk4s@webmail.fussycoder.id.au>
On Thu, Mar 05, 2009, thestar@fussycoder.id.au wrote:
> > The current git-p4 way of concatenating strings performs in O(n^2)
> >and is therefore terribly slow with large files because of unnecessary
> >memory copies. The following patch makes the operation O(n).
>
> The reason why it uses simple concatenation is to cut down on memory usage.
> - It is a tradeoff.
>
> I think the modification you have made below is reasonable, however be
> aware that memory usage could double, which substantially reduce the
> size of the changesets that git-p4 would be able to import /at all/,
> rather than to merely be slow.
Uhm, no. The memory usage could be an additional X, where X is the
size of the biggest file in the commit. Remember that commit() stores
the complete commit data in memory before sending it to fast-import.
Also, on my machine the extra memory is already used because at some
point, "text += foo" calls realloc() anyway and often duplicates the
memory used by text.
The ideal solution is to use a generator and refactor the commit
handling as a stream. I am working on that but it involves deeper
changes, so as I am not sure it will be accepted, I'm providing the
attached compromise patch first. At least it solves the appaling speed
issue. I tuned it so that it never uses more than 32 MiB extra memory.
Signed-off-by: Sam Hocevar <sam@zoy.org>
---
contrib/fast-import/git-p4 | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 3832f60..151ae1c 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -984,11 +984,19 @@ class P4Sync(Command):
while j < len(filedata):
stat = filedata[j]
j += 1
+ data = []
text = ''
while j < len(filedata) and filedata[j]['code'] in ('text', 'unicod
e', 'binary'):
- text += filedata[j]['data']
+ data.append(filedata[j]['data'])
del filedata[j]['data']
+ # p4 sends 4k chunks, make sure we don't use more than 32 MiB
+ # of additional memory while rebuilding the file data.
+ if len(data) > 8192:
+ text += ''.join(data)
+ data = []
j += 1
+ text += ''.join(data)
+ del data
if not stat.has_key('depotFile'):
sys.stderr.write("p4 print fails with: %s\n" % repr(stat))
--
Sam.
^ permalink raw reply related
* Re: latest pv_ops dom0 (2.6.29-rc7) crashes
From: Pasi Kärkkäinen @ 2009-03-05 17:50 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: xen-devel
In-Reply-To: <49AEE819.30901@goop.org>
On Wed, Mar 04, 2009 at 12:44:09PM -0800, Jeremy Fitzhardinge wrote:
> Pasi Kärkkäinen wrote:
> >On Tue, Mar 03, 2009 at 07:41:49PM +0200, Pasi Kärkkäinen wrote:
> >
> >>>>
> >>>>
> >>>Yeah, something got broken. Tracking it down now.
> >>>
> >>>
> >>>>Any ideas what's going on?
> >>>>
> >>>>(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch
> >>>>input to Xen)
> >>>>(XEN) Freed 112kB init memory.
> >>>>mapping kernel into physical memory
> >>>>(XEN) d0:v0: unhandled page fault (ec=0000)
> >>>>(XEN) Pagetable walk from bffff000:
> >>>>(XEN) L3[0x002] = 000000003d204001 00001204
> >>>>(XEN) L2[0x1ff] = 0000000000000000 ffffffff
> >>>>(XEN) domain_crash_sync called from entry.S (ff1a2c9e)
> >>>>(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
> >>>>(XEN) ----[ Xen-3.3.1 x86_32p debug=n Not tainted ]----
> >>>>(XEN) CPU: 0
> >>>>(XEN) EIP: e019:[<c0879716>]
> >>>>
> >>>>
> >>>What does this map to in your vmlinux?
> >>>
> >>>
> >
> >Just upgraded to latest tree (as of some hours ago), and I still get the
> >same crash:
> >
> >http://pasik.reaktio.net/xen/pv_ops-dom0-debug/pv_ops-dom0-bootlog-16-xen331-linux-2.6.29-rc6-crash.txt
> >
> >(XEN) Freed 112kB init memory.
> >mapping kernel into physical memory
> >(XEN) d0:v0: unhandled page fault (ec=0000)
> >(XEN) Pagetable walk from bffff000:
> >(XEN) L3[0x002] = 000000003d204001 00001204
> >(XEN) L2[0x1ff] = 0000000000000000 ffffffff
> >(XEN) domain_crash_sync called from entry.S (ff1a2c9e)
> >(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
> >(XEN) ----[ Xen-3.3.1 x86_32p debug=n Not tainted ]----
> >(XEN) CPU: 0
> >(XEN) EIP: e019:[<c0877902>]
> >
> >
> >[root@dom0test linux-2.6-xen]# gdb vmlinux
> >GNU gdb Fedora (6.8-29.fc10)
> >Copyright (C) 2008 Free Software Foundation, Inc.
> >License GPLv3+: GNU GPL version 3 or later
> ><http://gnu.org/licenses/gpl.html>
> >This is free software: you are free to change and redistribute it.
> >There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> >and "show warranty" for details.
> >This GDB was configured as "i386-redhat-linux-gnu"...
> >(gdb) x/i 0xc0877902
> >0xc0877902 <xen_map_identity_early+157>: mov (%edi,%ebx,8),%edx
> >
>
> Yep, working on it at the moment.
>
Wow, latest tree (2.6.29-rc7) _almost_ boots now!
First time ever (on my testing box) disk attached to ata_piix is now actually
detected and seems to work.. at least partly!
See:
http://pasik.reaktio.net/xen/pv_ops-dom0-debug/pv_ops-dom0-bootlog-17-xen331-linux-2.6.29-rc7-crash.txt
But now I get crash when init is started..
Starting udev: BUG: unable to handle kernel paging request at c1106840
IP: [<c04045ef>] get_phys_to_machine+0x24/0x29
*pdpt = 000000005fa7a001
Thread overran stack, or stack corrupted
[root@dom0test linux-2.6-xen]# gdb vmlinux
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb) x/i 0xc04045ef
0xc04045ef <get_phys_to_machine+36>: mov (%eax,%ecx,4),%eax
(gdb)
-- Pasi
^ permalink raw reply
* [PATCH 1/1] checkpoint: define pid==0 as self-checkpoint
From: Serge E. Hallyn @ 2009-03-05 17:49 UTC (permalink / raw)
To: Oren Laadan, Dave Hansen; +Cc: Linux Containers, lkml
[ this is on top of Dave's version of Oren's patchset, i.e.
http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/daveh/linux-2.6-cr.git;a=shortlog;h=dave-v13.4 ]
Define pid=0 when calling sys_checkpoint as asking for
a self-checkpoint.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
---
checkpoint/sys.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/checkpoint/sys.c b/checkpoint/sys.c
index 4a51ed3..acc5121 100644
--- a/checkpoint/sys.c
+++ b/checkpoint/sys.c
@@ -224,6 +224,8 @@ asmlinkage long sys_checkpoint(pid_t pid, int fd, unsigned long flags)
if (flags)
return -EINVAL;
+ if (pid == 0)
+ pid = current->pid;
ctx = cr_ctx_alloc(fd, flags | CR_CTX_CKPT);
if (IS_ERR(ctx))
return PTR_ERR(ctx);
--
1.5.4.3
^ permalink raw reply related
* Re: Please apply to stable: cfg80211: add support for custom firmware regulatory solutions
From: reinette chatre @ 2009-03-05 17:54 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: stable@kernel.org, John W. Linville, wireless, Tim Gardner
In-Reply-To: <43e72e890903041335n47a70186u4a7aeb304f8b6979@mail.gmail.com>
On Wed, 2009-03-04 at 13:35 -0800, Luis R. Rodriguez wrote:
> Forgot to Cc: stable@kernel.org for this patch during its submission,
> this is needed on 2.6.28 as otherwise there is an issue for Intel
> cards which get their channels 5 GHz disabled if OLD_REG is set to no
> (this is not the default) or the channels 12-14 are disabled if
> OLD_REG is set to yes (default) set to no and the ieee80211_module
> parameter is not used. The later issue is resolved by userspace as
> well but we cannot yet expect 2.6.28 kernels to have enough userspace
> interfaces to set the regulatory domain just yet. This is why OLD_REG
> is still set to default with 2.6.28.
>
> 14b9815af3f4fe0e171ee0c4325c31d2a2c1570b
> Author: Luis R. Rodriguez <lrodriguez@atheros.com>
> Date: Wed Nov 12 14:22:03 2008 -0800
>
> cfg80211: add support for custom firmware regulatory solutions
>
> This adds API to cfg80211 to allow wireless drivers to inform
> us if their firmware can handle regulatory considerations *and*
> they cannot map these regulatory domains to an ISO / IEC 3166
> alpha2. In these cases we skip the first regulatory hint instead
> of expecting the driver to build their own regulatory structure,
> providing us with an alpha2, or using the reg_notifier().
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> Acked-by: Zhu Yi <yi.zhu@intel.com>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Could you please also add commit
ea4a82dceec7b5782b1259079c8de508d0afe33a? This is the commit that
enables the Intel cards to take advantage of the parameter introduced in
previous commit.
commit ea4a82dceec7b5782b1259079c8de508d0afe33a
Author: Luis R. Rodriguez <lrodriguez@atheros.com>
Date: Wed Nov 12 14:22:04 2008 -0800
iwlwifi: enable custom fw regulatory solution
This enables the custom firmware regulatory solution option
on iwlwifi drivers. These devices are uncapable of mapping their
EEPROM regulatory domain to a specific ISO / IEC alpha2.
Although the new 11n devices (>= iwl 5000) have only
3 regultaory SKUs -- MOW, ABG (no N) and BG -- the older
devices (3945 and 4965) have a more complex SKU arrangement
and therefore its not practical to move this to the driver.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
^ permalink raw reply
* [Bug 12821] filesystem corrupts on heavy I/O
From: bugme-daemon @ 2009-03-05 17:46 UTC (permalink / raw)
To: linux-ext4
In-Reply-To: <bug-12821-13602@http.bugzilla.kernel.org/>
http://bugzilla.kernel.org/show_bug.cgi?id=12821
------- Comment #2 from ddi@dubex.dk 2009-03-05 09:46 -------
It continually spews messages in syslog while it's powered on, but that's not
exactly "reproduction" I guess.
Tried to find the inode in question with debugfs, it said that this particular
inode does not belong to any file - maybe because the inode contains filesystem
metadata, not file data? Anyhow, no useful output - probably in no small part
because I have no clue what I'm doing with debugfs ;-)
New kernel: Okay, upgraded to the latest available Ubuntu Server kernel. Had
to yank the power; the sync would never finish (vmstat says it synced about
1kB/s). Looks like the filesystem is also super-slow for some reason.
(Possible that a logging daemon was putting error messages in the buffer cache
while the sync got farther and farther behind trying to sync those, not sure.
Did kill all loggers at one point, but didn't help much. Hmm.)
It came up with the new kernel, did a fsck, which finished off with "fsck died
with exit status 1".
Will try e2image in a moment..
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply
* Time never changes patch
From: Venefax @ 2009-03-05 17:45 UTC (permalink / raw)
To: xen-devel
In-Reply-To: <10C63FAD690C13458F0B32BCED571F1406BAB7CD@pdsmsx502.ccr.corp.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 210 bytes --]
Dear Profound Xen Masters
How do I patch a Centos Para-virtualized VM to keep the time static inside
itself? I mean, any application that requests the time will always get the
same date and time?
Federico
[-- Attachment #1.2: Type: text/html, Size: 4812 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply
* Re: [linux-lvm] LVM partition type (device or Logical Volume)
From: Bryn M. Reeves @ 2009-03-05 17:44 UTC (permalink / raw)
To: LVM general discussion and development
In-Reply-To: <254dd9430903050854s19ce5e57v949eaf8860cb0474@mail.gmail.com>
Lic. Domingo Varela Yahuitl. wrote:
> Sir:
>
> I have a question - doubt, what is the difference between the installation
> of a system Guest in XEN using the device like so and using the logical
> Volume, here down are those that created
>
> 1) I'm have install like device /dev/sda2 (CentOS 47GB)
> 2) and then other like Logical Volume ( all a hard disk /dev/sdb3 as
> /dev/XenVolGWin0/XenLogVolWin also 47GB other server CentOS)
>
> … somebody can explain to me please the diference
>
> I hope your answers
Please don't hijack existing threads with new questions. Start a new
thread with a descriptive subject line instead.
Regards,
Bryn.
^ permalink raw reply
* [PATCH 8/9] nfs-utils: Include legacy or TI-RPC headers, not both
From: Chuck Lever @ 2009-03-05 17:42 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Data type incompatibilities between the legacy RPC headers and the
TI-RPC headers mean we can't use libtirpc with code that was compiled
against the legacy RPC headers. The definition of rpcprog_t for
example is "unsigned long" in the legacy library, but it's "uint32_t"
for TI-RPC. On 32-bit systems, these types happen to have the same
width, but on 64-bit systems they don't, making more complex data
structures that use these types in fields ABI incompatible.
Adopt a new strategy to deal with this issue. When --enable-tirpc is
set, append "-I/usr/include/tirpc" to the compilation steps. This
should cause the compiler to grab the tirpc/ headers instead of the
legacy headers. Now, for TI-RPC builds, the TI-RPC legacy functions
and the TI-RPC headers will be used. On legacy systems, the legacy
headers and legacy glibc RPC implementation will be used.
A new ./configure option is introduced to allow system integrators to
use TI-RPC headers in some other location than /usr/include/tirpc.
/usr/include/tirpc remains the default setting for this new option.
The gssd implementation presents a few challenges, but it turns out
the gssglue library is similar to the auth_gss pieces of TI-RPC. To
avoid similar header incompatibility issues, gssd now uses libtirpc
instead of libgssglue if --enable-tirpc is specified. There may be
other issues to tackle with gssd, but for now, we just make sure it
builds with --enable-tirpc.
Note also: svc_getcaller() is a macro in both cases that points to
a sockaddr field in the svc_req structure. The legacy version points
to a sockaddr_in type field, but the TI-RPC version points to a
sockaddr_in6 type field.
rpc.mountd unconditionally casts the result of svc_getcaller() to a
sockaddr_in *. This should be OK for TI-RPC as well, since rpc.mountd
still uses legacy RPC calls (provided by glibc, or emulated by TI-RPC)
to set up its listeners, and therefore rpc.mountd callers will always
be from AF_INET addresses for now.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
aclocal/librpcsecgss.m4 | 17 +++++++++++------
aclocal/libtirpc.m4 | 10 +++++++++-
aclocal/rpcsec_vers.m4 | 7 +++++--
support/nfs/getport.c | 4 ++--
support/nfs/rpc_socket.c | 45 ++-------------------------------------------
utils/gssd/gssd_proc.c | 3 ++-
utils/gssd/krb5_util.c | 1 -
utils/gssd/krb5_util.h | 6 ++++++
utils/mountd/svc_run.c | 4 ++++
9 files changed, 41 insertions(+), 56 deletions(-)
diff --git a/aclocal/librpcsecgss.m4 b/aclocal/librpcsecgss.m4
index 5791260..d1dd25e 100644
--- a/aclocal/librpcsecgss.m4
+++ b/aclocal/librpcsecgss.m4
@@ -3,12 +3,17 @@ dnl KRB5LIBS must be set before this function is invoked.
dnl
AC_DEFUN([AC_LIBRPCSECGSS], [
- dnl Check for library, but do not add -lrpcsecgss to LIBS
- AC_CHECK_LIB([rpcsecgss], [authgss_create_default], [librpcsecgss=1],
- [AC_MSG_ERROR([librpcsecgss not found.])])
+ dnl libtirpc provides an rpcsecgss API
+ if test "$enable_tirpc" = no; then
- AC_CHECK_LIB([rpcsecgss], [authgss_set_debug_level],
- [AC_DEFINE([HAVE_AUTHGSS_SET_DEBUG_LEVEL], 1,
- [Define to 1 if you have the `authgss_set_debug_level' function.])])
+ dnl Check for library, but do not add -lrpcsecgss to LIBS
+ AC_CHECK_LIB([rpcsecgss], [authgss_create_default], [librpcsecgss=1],
+ [AC_MSG_ERROR([librpcsecgss not found.])])
+
+ AC_CHECK_LIB([rpcsecgss], [authgss_set_debug_level],
+ [AC_DEFINE([HAVE_AUTHGSS_SET_DEBUG_LEVEL], 1,
+ [Define to 1 if you have the `authgss_set_debug_level' function.])])
+
+ fi
])dnl
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
index b1f3669..af4c7d3 100644
--- a/aclocal/libtirpc.m4
+++ b/aclocal/libtirpc.m4
@@ -2,6 +2,12 @@ dnl Checks for TI-RPC library and headers
dnl
AC_DEFUN([AC_LIBTIRPC], [
+ AC_ARG_WITH([tirpcinclude],
+ [AC_HELP_STRING([--with-tirpcinclude=DIR],
+ [use TI-RPC headers in DIR])],
+ [tirpc_header_dir=$withval],
+ [tirpc_header_dir=/usr/include/tirpc])
+
dnl if --enable-tirpc was specifed, the following components
dnl must be present, and we set up HAVE_ macros for them.
@@ -12,8 +18,10 @@ AC_DEFUN([AC_LIBTIRPC], [
[AC_MSG_ERROR([libtirpc not found.])])
dnl also must have the headers installed where we expect
- AC_CHECK_HEADERS([tirpc/netconfig.h], ,
+ dnl look for headers; add -I compiler option if found
+ AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h], ,
[AC_MSG_ERROR([libtirpc headers not found.])])
+ AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])
fi
diff --git a/aclocal/rpcsec_vers.m4 b/aclocal/rpcsec_vers.m4
index df7cfb9..5d13db3 100644
--- a/aclocal/rpcsec_vers.m4
+++ b/aclocal/rpcsec_vers.m4
@@ -1,8 +1,11 @@
dnl Checks librpcsec version
AC_DEFUN([AC_RPCSEC_VERSION], [
- PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.16], ,
- [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])])
+ dnl TI-RPC replaces librpcsecgss
+ if test "$enable_tirpc" = no; then
+ PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.16], ,
+ [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])])
+ fi
PKG_CHECK_MODULES([GSSGLUE], [libgssglue >= 0.1])
diff --git a/support/nfs/getport.c b/support/nfs/getport.c
index 2255b7d..734d21a 100644
--- a/support/nfs/getport.c
+++ b/support/nfs/getport.c
@@ -41,8 +41,8 @@
#include <rpc/pmap_prot.h>
#ifdef HAVE_LIBTIRPC
-#include <tirpc/netconfig.h>
-#include <tirpc/rpc/rpcb_prot.h>
+#include <netconfig.h>
+#include <rpc/rpcb_prot.h>
#endif
#include "nfsrpc.h"
diff --git a/support/nfs/rpc_socket.c b/support/nfs/rpc_socket.c
index 4b4b0be..2b11e35 100644
--- a/support/nfs/rpc_socket.c
+++ b/support/nfs/rpc_socket.c
@@ -41,49 +41,8 @@
#include "nfsrpc.h"
#ifdef HAVE_LIBTIRPC
-
-/*
- * Most of the headers under /usr/include/tirpc are currently
- * unusable for various reasons. We statically define the bits
- * we need here until the official headers are fixed.
- *
- * The commonly used RPC calls such as CLNT_CALL and CLNT_DESTROY
- * are actually virtual functions in both the legacy and TI-RPC
- * implementations. The proper _CALL or _DESTROY will be invoked
- * no matter if we used a legacy clnt_create() or clnt_tli_create()
- * from libtirpc.
- */
-
-#include <tirpc/netconfig.h>
-#include <tirpc/rpc/rpcb_prot.h>
-
-/* definitions from tirpc/rpc/types.h */
-
-/*
- * The netbuf structure is used for transport-independent address storage.
- */
-struct netbuf {
- unsigned int maxlen;
- unsigned int len;
- void *buf;
-};
-
-/* definitions from tirpc/rpc/clnt.h */
-
-/*
- * Low level clnt create routine for connectionless transports, e.g. udp.
- */
-extern CLIENT *clnt_dg_create(const int, const struct netbuf *,
- const rpcprog_t, const rpcvers_t,
- const u_int, const u_int);
-
-/*
- * Low level clnt create routine for connectionful transports, e.g. tcp.
- */
-extern CLIENT *clnt_vc_create(const int, const struct netbuf *,
- const rpcprog_t, const rpcvers_t,
- u_int, u_int);
-
+#include <netconfig.h>
+#include <rpc/rpcb_prot.h>
#endif /* HAVE_LIBTIRPC */
/*
diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
index d0d3f7f..295c37d 100644
--- a/utils/gssd/gssd_proc.c
+++ b/utils/gssd/gssd_proc.c
@@ -70,7 +70,6 @@
#include "gssd.h"
#include "err_util.h"
#include "gss_util.h"
-#include "gss_oids.h"
#include "krb5_util.h"
#include "context.h"
@@ -778,8 +777,10 @@ handle_krb5_upcall(struct clnt_info *clp)
out:
if (token.value)
free(token.value);
+#ifndef HAVE_LIBTIRPC
if (pd.pd_ctx_hndl.length != 0)
authgss_free_private_data(&pd);
+#endif
if (auth)
AUTH_DESTROY(auth);
if (rpc_clnt)
diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
index 8923b3b..e3c6f5e 100644
--- a/utils/gssd/krb5_util.c
+++ b/utils/gssd/krb5_util.c
@@ -124,7 +124,6 @@
#include "gssd.h"
#include "err_util.h"
#include "gss_util.h"
-#include "gss_oids.h"
#include "krb5_util.h"
/* Global list of principals/cache file names for machine credentials */
diff --git a/utils/gssd/krb5_util.h b/utils/gssd/krb5_util.h
index 4b2da6b..7d808f5 100644
--- a/utils/gssd/krb5_util.h
+++ b/utils/gssd/krb5_util.h
@@ -3,6 +3,12 @@
#include <krb5.h>
+#ifdef HAVE_LIBTIRPC
+#include <rpc/auth_gss.h>
+#else
+#include "gss_oids.h"
+#endif
+
/*
* List of principals from our keytab that we
* will try to use to obtain credentials
diff --git a/utils/mountd/svc_run.c b/utils/mountd/svc_run.c
index 422e839..5ba5af6 100644
--- a/utils/mountd/svc_run.c
+++ b/utils/mountd/svc_run.c
@@ -54,6 +54,10 @@
#include <errno.h>
#include <time.h>
+#ifdef HAVE_LIBTIRPC
+#include <rpc/rpc_com.h>
+#endif
+
void cache_set_fds(fd_set *fdset);
int cache_process_req(fd_set *readfds);
^ permalink raw reply related
* Re: [PATCH 0/3] xfs: fix sparse warnings
From: Felix Blyakher @ 2009-03-05 17:43 UTC (permalink / raw)
To: Hannes Eder; +Cc: kernel-janitors, linux-kernel, Christoph Hellwig
In-Reply-To: <20090304183136.525.13769.stgit@f10box.hanneseder.net>
On Mar 4, 2009, at 12:33 PM, Hannes Eder wrote:
> The following series fixes a fair amount of the remaining sparse
> warnings in fs/xfs with !CONFIG_XFS_DEBUG.
>
> With CONFIG_XFS_DEBUG we still got alot of "Should it be static?"
> warnings, but that's a different issue.
Looks good to me with the changes Christoph pointed out.
I'll push it in. Thanks.
Reviewed-by: Felix Blyakher <felixb@sgi.com>
>
>
> ---
> Hannes Eder (3):
> xfs: include header files for prototypes
> xfs: make symbols static
> xfs: move declaration to header file
>
> fs/xfs/linux-2.6/xfs_ioctl.c | 1 +
> fs/xfs/linux-2.6/xfs_super.c | 6 +++---
> fs/xfs/support/debug.c | 1 +
> fs/xfs/xfs_bmap.c | 2 +-
> fs/xfs/xfs_da_btree.h | 1 +
> fs/xfs/xfs_dir2.c | 2 --
> fs/xfs/xfs_dir2_leaf.c | 2 +-
> 7 files changed, 8 insertions(+), 7 deletions(-)
^ permalink raw reply
* [PATCH 2/9] configure: move TI-RPC checks into aclocal/
From: Chuck Lever @ 2009-03-05 17:41 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Define an aclocal test for TI-RPC headers and library, and move the
TI-RPC checks earlier in our configure script so other feature checks
can use the availability of TI-RPC to decide what to do.
Since bindresvport_sa is required just for IPv6 support, move that
check to the IPv6 feature tests.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
Makefile.am | 3 ++-
aclocal/libtirpc.m4 | 25 +++++++++++++++++++++++++
configure.ac | 28 +++++++++-------------------
3 files changed, 36 insertions(+), 20 deletions(-)
create mode 100644 aclocal/libtirpc.m4
diff --git a/Makefile.am b/Makefile.am
index 88ae210..cfe2d37 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,7 +40,8 @@ EXTRA_DIST = \
aclocal/bsdsignals.m4 \
aclocal/nfs-utils.m4 \
aclocal/kerberos5.m4 \
- aclocal/tcp-wrappers.m4
+ aclocal/tcp-wrappers.m4 \
+ aclocal/libtirpc.m4
ACLOCAL_AMFLAGS = -I aclocal
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
new file mode 100644
index 0000000..67c4012
--- /dev/null
+++ b/aclocal/libtirpc.m4
@@ -0,0 +1,25 @@
+dnl Checks for TI-RPC library and headers
+dnl
+AC_DEFUN([AC_LIBTIRPC], [
+
+ dnl if --enable-tirpc was specifed, the following components
+ dnl must be present, and we set up HAVE_ macros for them.
+
+ if test "$enable_tirpc" = yes; then
+
+ dnl look for the library; add to LIBS if found
+ AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
+ [AC_MSG_ERROR([libtirpc not found.])])
+
+ dnl also must have the headers installed where we expect
+ AC_CHECK_HEADERS([tirpc/netconfig.h], ,
+ [AC_MSG_ERROR([libtirpc headers not found.])])
+
+ dnl set up HAVE_FOO for various functions
+ AC_CHECK_FUNCS([getnetconfig \
+ clnt_create clnt_create_timed \
+ clnt_vc_create clnt_dg_create xdr_rpcb])
+
+ fi
+
+])dnl
diff --git a/configure.ac b/configure.ac
index 97b084b..becbb7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,11 @@ AC_ARG_ENABLE(mount,
enable_mount=$enableval,
enable_mount=yes)
AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])
+AC_ARG_ENABLE(tirpc,
+ [AC_HELP_STRING([--enable-tirpc],
+ [enable use of TI-RPC @<:@default=no@:>@])],
+ enable_tirpc=$enableval,
+ enable_tirpc=no)
AC_ARG_ENABLE(ipv6,
[AC_HELP_STRING([--enable-ipv6],
[enable support for IPv6 @<:@default=no@:>@])],
@@ -131,13 +136,8 @@ AC_ARG_ENABLE(ipv6,
AC_SUBST(enable_ipv6)
AM_CONDITIONAL(CONFIG_IPV6, [test "$enable_ipv6" = "yes"])
-AC_ARG_ENABLE(tirpc,
- [AC_HELP_STRING([--enable-tirpc],
- [enable use of TI-RPC @<:@default=no@:>@])],
- enable_tirpc=$enableval,
- enable_tirpc=no)
- AC_SUBST(enable_tirpc)
- AM_CONDITIONAL(CONFIG_TIRPC, [test "$enable_tirpc" = "yes"])
+dnl Check for TI-RPC library and headers
+AC_LIBTIRPC
# Check whether user wants TCP wrappers support
AC_TCP_WRAPPERS
@@ -262,22 +262,12 @@ AC_CHECK_DECL([AI_ADDRCONFIG],
[Define this to 1 if AI_ADDRCONFIG macro is defined]), ,
[ #include <netdb.h> ] )
-if test "$enable_tirpc" = yes; then
- AC_CHECK_LIB(tirpc, clnt_tli_create, ,
- AC_MSG_ERROR([libtirpc not found.]))
- AC_CHECK_HEADERS(tirpc/netconfig.h, ,
- AC_MSG_ERROR([libtirpc headers not found.]))
- AC_CHECK_FUNCS([bindresvport_sa getnetconfig \
- clnt_create clnt_create_timed \
- clnt_vc_create clnt_dg_create xdr_rpcb])
-fi
-
if test "$enable_ipv6" = yes; then
if test "$enable_tirpc" = no; then
AC_MSG_ERROR('--enable-ipv6' requires '--enable-tirpc'.)
fi
- AC_CHECK_FUNC(getnameinfo, , ,
- AC_MSG_ERROR(Function 'getnameinfo' not found.))
+ AC_CHECK_FUNCS([getnameinfo bindresvport_sa], , ,
+ [AC_MSG_ERROR([Missing functions needed for IPv6.])])
AC_CHECK_DECL([AI_ADDRCONFIG], ,
AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support]),
[ #include <netdb.h> ] )
^ permalink raw reply related
* Re: [PATCH 0/3] xfs: fix sparse warnings
From: Felix Blyakher @ 2009-03-05 17:43 UTC (permalink / raw)
To: Hannes Eder; +Cc: kernel-janitors, linux-kernel, Christoph Hellwig
In-Reply-To: <20090304183136.525.13769.stgit@f10box.hanneseder.net>
On Mar 4, 2009, at 12:33 PM, Hannes Eder wrote:
> The following series fixes a fair amount of the remaining sparse
> warnings in fs/xfs with !CONFIG_XFS_DEBUG.
>
> With CONFIG_XFS_DEBUG we still got alot of "Should it be static?"
> warnings, but that's a different issue.
Looks good to me with the changes Christoph pointed out.
I'll push it in. Thanks.
Reviewed-by: Felix Blyakher <felixb@sgi.com>
>
>
> ---
> Hannes Eder (3):
> xfs: include header files for prototypes
> xfs: make symbols static
> xfs: move declaration to header file
>
> fs/xfs/linux-2.6/xfs_ioctl.c | 1 +
> fs/xfs/linux-2.6/xfs_super.c | 6 +++---
> fs/xfs/support/debug.c | 1 +
> fs/xfs/xfs_bmap.c | 2 +-
> fs/xfs/xfs_da_btree.h | 1 +
> fs/xfs/xfs_dir2.c | 2 --
> fs/xfs/xfs_dir2_leaf.c | 2 +-
> 7 files changed, 8 insertions(+), 7 deletions(-)
^ permalink raw reply
* [PATCH 9/9] nfs-utils: clean up handling of libgssglue in gssd Makefile
From: Chuck Lever @ 2009-03-05 17:42 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
From: Jeff Layton <jlayton@redhat.com>
Make the pkgconfig check for libgssglue conditional on tirpc being
enabled. When it's disabled, the pkgconfig check for librpcsecgss will
pull in the gssglue lib and include dir automatically.
Also, make sure we include GSSGLUE_CFLAGS and the GSSGLUE_LIBS to the
appropriate places in utils/gssd/Makefile.am so that we pick up
the gssglue libs when tirpc is enabled.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
aclocal/rpcsec_vers.m4 | 6 +++---
utils/gssd/Makefile.am | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/aclocal/rpcsec_vers.m4 b/aclocal/rpcsec_vers.m4
index 5d13db3..e59c0aa 100644
--- a/aclocal/rpcsec_vers.m4
+++ b/aclocal/rpcsec_vers.m4
@@ -1,12 +1,12 @@
dnl Checks librpcsec version
AC_DEFUN([AC_RPCSEC_VERSION], [
- dnl TI-RPC replaces librpcsecgss
+ dnl TI-RPC replaces librpcsecgss, but we still need libgssglue
if test "$enable_tirpc" = no; then
PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.16], ,
[AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])])
+ else
+ PKG_CHECK_MODULES([GSSGLUE], [libgssglue >= 0.1])
fi
- PKG_CHECK_MODULES([GSSGLUE], [libgssglue >= 0.1])
-
])dnl
diff --git a/utils/gssd/Makefile.am b/utils/gssd/Makefile.am
index e42b339..95a2bd0 100644
--- a/utils/gssd/Makefile.am
+++ b/utils/gssd/Makefile.am
@@ -39,11 +39,11 @@ gssd_SOURCES = \
write_bytes.h
gssd_LDADD = ../../support/nfs/libnfs.a \
- $(RPCSECGSS_LIBS) $(KRBLIBS)
+ $(RPCSECGSS_LIBS) $(GSSGLUE_LIBS) $(KRBLIBS)
gssd_LDFLAGS = $(KRBLDFLAGS)
gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
- $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
+ $(RPCSECGSS_CFLAGS) $(GSSGLUE_CFLAGS) $(KRBCFLAGS)
svcgssd_SOURCES = \
$(COMMON_SRCS) \
@@ -56,18 +56,18 @@ svcgssd_SOURCES = \
svcgssd_LDADD = \
../../support/nfs/libnfs.a \
- $(RPCSECGSS_LIBS) -lnfsidmap \
+ $(RPCSECGSS_LIBS) $(GSSGLUE_LIBS) -lnfsidmap \
$(KRBLIBS)
svcgssd_LDFLAGS = $(KRBLDFLAGS)
svcgssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
- $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
+ $(RPCSECGSS_CFLAGS) $(GSSGLUE_CFLAGS) $(KRBCFLAGS)
gss_clnt_send_err_SOURCES = gss_clnt_send_err.c
gss_clnt_send_err_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
- $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
+ $(RPCSECGSS_CFLAGS) $(GSSGLUE_CFLAGS) $(KRBCFLAGS)
MAINTAINERCLEANFILES = Makefile.in
^ permalink raw reply related
* Re: [PATCH 1/1] unifdef.c change "getline" to "get_line" to avoid C library confusion.
From: Justin Mattock @ 2009-03-05 17:42 UTC (permalink / raw)
To: Randy Dunlap
Cc: Frederic Weisbecker, Linux Kernel Mailing List, Andrew Morton,
Mike Frysinger
In-Reply-To: <49AFF0D7.8080007@oracle.com>
On Thu, Mar 5, 2009 at 7:33 AM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
>> From: Justin P. Mattock <justinmattock@gmail.com>
>> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
>>
>> This fixes an error when compiling the kernel.
>
> Did you determine why you need this now and other people don't
> need it (yet)? Maybe the rest of us will need it in the future...
>
>
>> CHK include/linux/version.h
>> HOSTCC scripts/unifdef
>> scripts/unifdef.c:209: error: conflicting types for 'getline'
>> /usr/include/stdio.h:651: note: previous declaration of 'getline' was here
>> make[1]: *** [scripts/unifdef] Error 1
>> make: *** [__headers] Error 2
>>
>> --
>> scripts/unifdef.c | 3 +++
>> 1 files changed, 3 insertions(+),0 deletions(-)
>>
>> ---a/scripts/unifdef.c 2009-03-05 00:07:28.000000000 -0800
>> +++b/scripts/unifdef.c 2009-03-05 00:04:56.000000000 -0800
>> @@ -206,7 +206,7 @@ static void done(void);
>> static void error(const char *);
>> static int findsym(const char *);
>> static void flushline(bool);
>> -static Linetype getline(void);
>> +static Linetype get_line(void);
>> static Linetype ifeval(const char **);
>> static void ignoreoff(void);
>> static void ignoreon(void);
>> @@ -512,7 +512,7 @@ process(void)
>>
>> for (;;) {
>> linenum++;
>> - lineval = getline();
>> + lineval = get_line();
>> trans_table[ifstate[depth]][lineval]();
>> debug("process %s -> %s depth %d",
>> linetype_name[lineval],
>> @@ -526,7 +526,7 @@ process(void)
>> * help from skipcomment().
>> */
>> static Linetype
>> -getline(void)
>> +get_line(void)
>> {
>> const char *cp;
>> int cursym;
>>
>>
>
>
> --
> ~Randy
>
As for why I need this:
I keep getting an error while compiling the latest kernel.
(changing getline to get_line fixes it from here);
As for others needing this:
probably in the category for future use.
especially if people don't upgrade there kernel
and libc.
In speculation though, people may never hit this.
The setup I did was created an LFS system(always wanted to create a
linux system from source).
While creating this starting with a plain directory,
then compiling make, gcc, libc, making sure to set CFLAGS,
(in accordance to the processor)
then after those were complete, set the same
CFLAGS for every lib/app that I compiled and put into the system.
(this way the system is atomically synchronized with the processor);
Thus changing the whole setup that I have.
But then If this was the case I would of hit this probably earlier
with 2.6.29-rc4/5.
In regards to the patch(to make things correct) what or how do I
label this person in the patch so they get the proper credit:
vapier@gentoo.org
They were responsible with providing the change
of getline to get_line.
should it be:
Critical-info-by: Mike Frysinger <vapier@gentoo.org>
And also adding the people who reviewed the patch.
This way the patch is proper irregardless of the patch making it
or not.
regards;
--
Justin P. Mattock
^ permalink raw reply
* [PATCH 7/9] configure: move IPv6 feature checks into aclocal/
From: Chuck Lever @ 2009-03-05 17:42 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Clean up: for consistency with other local feature checks, move IPv6
feature checks into aclocal/
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
Makefile.am | 3 ++-
aclocal/ipv6.m4 | 29 +++++++++++++++++++++++++++++
configure.ac | 17 ++---------------
3 files changed, 33 insertions(+), 16 deletions(-)
create mode 100644 aclocal/ipv6.m4
diff --git a/Makefile.am b/Makefile.am
index 098446b..b3a6e91 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,7 +44,8 @@ EXTRA_DIST = \
aclocal/libtirpc.m4 \
aclocal/libevent.m4 \
aclocal/libnfsidmap.m4 \
- aclocal/rpcsec_vers.m4
+ aclocal/rpcsec_vers.m4 \
+ aclocal/ipv6.m4
ACLOCAL_AMFLAGS = -I aclocal
diff --git a/aclocal/ipv6.m4 b/aclocal/ipv6.m4
new file mode 100644
index 0000000..0564b3e
--- /dev/null
+++ b/aclocal/ipv6.m4
@@ -0,0 +1,29 @@
+dnl Checks for IPv6 support
+dnl
+AC_DEFUN([AC_IPV6], [
+
+ AC_CHECK_DECL([AI_ADDRCONFIG],
+ [AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
+ [Define this to 1 if AI_ADDRCONFIG macro is defined])], ,
+ [ #include <netdb.h> ])
+
+ if test "$enable_ipv6" = yes; then
+
+ dnl TI-RPC required for IPv6
+ if test "$enable_tirpc" = no; then
+ AC_MSG_ERROR(['--enable-ipv6' requires '--enable-tirpc'.])
+ fi
+
+ dnl IPv6-enabled networking functions required for IPv6
+ AC_CHECK_FUNCS([getnameinfo bindresvport_sa], , ,
+ [AC_MSG_ERROR([Missing functions needed for IPv6.])])
+
+ dnl Need to detect presence of IPv6 networking at run time via
+ dnl getaddrinfo(3); old versions of glibc do not support ADDRCONFIG
+ AC_CHECK_DECL([AI_ADDRCONFIG], ,
+ [AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support])],
+ [ #include <netdb.h> ])
+
+ fi
+
+])dnl
diff --git a/configure.ac b/configure.ac
index 7d25384..e34b7e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,21 +250,8 @@ if test "$enable_gss" = yes; then
fi
-AC_CHECK_DECL([AI_ADDRCONFIG],
- AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
- [Define this to 1 if AI_ADDRCONFIG macro is defined]), ,
- [ #include <netdb.h> ] )
-
-if test "$enable_ipv6" = yes; then
- if test "$enable_tirpc" = no; then
- AC_MSG_ERROR('--enable-ipv6' requires '--enable-tirpc'.)
- fi
- AC_CHECK_FUNCS([getnameinfo bindresvport_sa], , ,
- [AC_MSG_ERROR([Missing functions needed for IPv6.])])
- AC_CHECK_DECL([AI_ADDRCONFIG], ,
- AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support]),
- [ #include <netdb.h> ] )
-fi
+dnl Check for IPv6 support
+AC_IPV6
dnl *************************************************************
dnl Check for headers
^ permalink raw reply related
* Re: Q: "- PDU header Digest" fetaure
From: Mike Christie @ 2009-03-05 17:42 UTC (permalink / raw)
To: open-iscsi; +Cc: linux-fsdevel, linux-scsi
In-Reply-To: <49AF9897.1070500@panasas.com>
Boaz Harrosh wrote:
> Hi Mike, list.
>
> Mike Christie has pointed out of a serious problem for us which we need
> the list help of.
>
> It started with a question by Ulrich Windl of why data-digests are
> not supported/recommended by open-iscsi installations and distros.
>
> [iscsi data-digests is when the complete payload of an iscsi transaction
> initiator-target is signed by an HMAC(SHA1) both read/write]
>
> Mike Christie wrote:
>> Ulrich Windl wrote:
>> Data digests were working but when upstream did the scatterlist changes
>> to the kernel it broke data digests. We have not found the cause yet.
>>
>> For Red Hat, they do not support them for different reasons depending on
>> the version and arch. For example in RHEL5, the big endien crypto digest
>> code is busted. It needs a fix from upstream, and I think in general
>> there is still some other bugs in the digest code.
>>
>>> I see the performance impact, but is there another reason against implementing it?
>>> Can I safely activate it on the target, or will it cause problems?
>>>
>> Another reason a lot of distros do not support it is because a common
>> problem we always hit is that users will write out some data, then start
>> modifying it again. But the kernel will normally not do do a sync write
>> when you do a write. So once the write() returns, the kernel is still
>> sending it through the caches, block, scsi, and iscsi layers. If you are
>> writing to the data while the it is working its way through the iscsi
>> layers, the iscsi layer could have done the digest calculation, then you
>> could modify it and now when the target checks it the digest check will
>> fail. And so this happens over and over and you get digest errors all
>> over the place and the iscsi layers fire their error handling and retry
>> and retry, and in the end they just say forget it and do not support
>> data digests.
>>
>
> Mike if what you said in the last paragraph is true, about FS modifying the data
> while the request is in-flight, then it does not explain your statement above
> about, things getting worse around the scatterlist changes.
They are two separate issues.
Around the time of the scatterlist changes I will get an oops in the
digest calculation code (when we call into the crypto callouts), or in
newer kernels the oops went away and now I will get data digest errors.
I am still trying to narrow down the commit and line and make sure that
the oops is fixed and did not turn into a digest error or if maybe I am
hitting a real digest error.
The second issue is that we normally do zero copy for writes. I do not
think it is FS bug or net bug or a bug in the iscsi layer. Maybe more of
a bug in what the user expects (who reads the man page for write() to
check if the data is committed to disk when write() returns). We
discussed this a couple times. For open-iscsi we tried to close the gap,
by not doing zero copy writes when data digests are used. And a long
long time ago this was discussed for linux-iscsi, and I think that is
one of the reasons we added DID_IMM_RETRY to the scsi layer (we can then
avoid the 5 retry limit in this case and retry until it is resolved).
>
> The way I see it there can be two fundamental problems:
> 1. The FS is permitted to (or sinfully) modifies pages of memory while a request to
> write these pages is already in-flight. fsdevel guys might want to comment on that?
> Mike have you observed these problems with a particular file system?
> I can anticipate such a problem arising in a memory-mapped IO, while a page-cache
> write-back is in progress. Is that so? is Linux not safe in this regard? If so
> how does DM & MD do there raid parity calculations? do they copy the data?
>
> 2. iSCSI releases the request too soon, before the all data was actually used up by the
> network stack, and is allowing the FS to continue modifying these pages.
> This is a serious problem which means that there can be crashes and data corruption even
> if data-digest are not used.
> Actually we did move not long ago from copy of network data to been completely copy-less
> could that be the point in time things stopped working?
>
> 3. Plain coding bug, but I could not find any.
>
> I know in the passed that data-digests are a grate tool for finding bugs that otherwise can
> go undetected, it happened to me several times in the passed. All of these cases reviled a flaw
> in the code, do to rebasing, things changing, plain programmer bugs.
>
> Mike, I'm running here a plain iscsi initiator-target setup and the regression tests, and it
> runs. What setup and tests did you run to trigger these digest retries, I would like to
> reproduce this here, and investigate.
>
The open-iscsi/test regression script and dat file. Once the section
with data digests runs I hit the oops/digest error. I am not sure if I
ever hit the second zero copy write issues. I might be hitting that now.
Like I said, I have not had time to check if the oops turned into a
digest error when it should not or if I am hitting the zero copy issue.
^ permalink raw reply
* [PATCH 4/9] configure: pull common nfsidmap and event checks into aclocal/
From: Chuck Lever @ 2009-03-05 17:42 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Clean up: Create an aclocal script for the nfsidmap library and
headers checks used for both --enable-gss and --enable-nfsv4.
Move libevent checks out too.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
Makefile.am | 4 +++-
aclocal/libevent.m4 | 11 +++++++++++
aclocal/libnfsidmap.m4 | 17 +++++++++++++++++
configure.ac | 20 ++++++++++----------
4 files changed, 41 insertions(+), 11 deletions(-)
create mode 100644 aclocal/libevent.m4
create mode 100644 aclocal/libnfsidmap.m4
diff --git a/Makefile.am b/Makefile.am
index cfe2d37..6541fb7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,7 +41,9 @@ EXTRA_DIST = \
aclocal/nfs-utils.m4 \
aclocal/kerberos5.m4 \
aclocal/tcp-wrappers.m4 \
- aclocal/libtirpc.m4
+ aclocal/libtirpc.m4 \
+ aclocal/libevent.m4 \
+ aclocal/libnfsidmap.m4
ACLOCAL_AMFLAGS = -I aclocal
diff --git a/aclocal/libevent.m4 b/aclocal/libevent.m4
new file mode 100644
index 0000000..3c962b3
--- /dev/null
+++ b/aclocal/libevent.m4
@@ -0,0 +1,11 @@
+dnl Checks for libevent
+AC_DEFUN([AC_LIBEVENT], [
+
+ dnl Check for libevent, but do not add -levent to LIBS
+ AC_CHECK_LIB([event], [event_dispatch], [libevent=1],
+ [AC_MSG_ERROR([libevent not found.])])
+
+ AC_CHECK_HEADERS([event.h], ,
+ [AC_MSG_ERROR([libevent headers not found.])])
+
+])dnl
diff --git a/aclocal/libnfsidmap.m4 b/aclocal/libnfsidmap.m4
new file mode 100644
index 0000000..cfcde2f
--- /dev/null
+++ b/aclocal/libnfsidmap.m4
@@ -0,0 +1,17 @@
+dnl Checks for libnfsidmap
+dnl
+AC_DEFUN([AC_LIBNFSIDMAP], [
+
+ dnl Check for libnfsidmap, but do not add -lnfsidmap to LIBS
+ AC_CHECK_LIB([nfsidmap], [nfs4_init_name_mapping], [libnfsidmap=1],
+ [AC_MSG_ERROR([libnfsidmap not found.])])
+
+ AC_CHECK_HEADERS([nfsidmap.h], ,
+ [AC_MSG_ERROR([libnfsidmap headers not found.])])
+
+ dnl nfs4_set_debug() doesn't appear in all versions of libnfsidmap
+ AC_CHECK_LIB([nfsidmap], [nfs4_set_debug],
+ [AC_DEFINE([HAVE_NFS4_SET_DEBUG], 1,
+ [Define to 1 if you have the `nfs4_set_debug' function.])])
+
+])dnl
diff --git a/configure.ac b/configure.ac
index becbb7c..0d5f5a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,10 +197,12 @@ AC_CHECK_FUNC([getservbyname], , ,
AC_CHECK_LIB([crypt], [crypt], [LIBCRYPT="-lcrypt"])
if test "$enable_nfsv4" = yes; then
- AC_CHECK_LIB(event, event_dispatch, [libevent=1], AC_MSG_ERROR([libevent needed for nfsv4 support]))
- AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
- AC_CHECK_HEADERS(event.h, ,AC_MSG_ERROR([libevent needed for nfsv4 support]))
- AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
+ dnl check for libevent libraries and headers
+ AC_LIBEVENT
+
+ dnl check for nfsidmap libraries and headers
+ AC_LIBNFSIDMAP
+
dnl librpcsecgss already has a dependency on libgssapi,
dnl but we need to make sure we get the right version
if test "$enable_gss" = yes; then
@@ -239,12 +241,10 @@ AC_SUBST(LIBBLKID)
if test "$enable_gss" = yes; then
dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c
- AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for gss support]))
- AC_CHECK_HEADERS(spkm3.h, ,AC_MSG_WARN([could not locate SPKM3 header; will not have SPKM3 support]))
- dnl the nfs4_set_debug function doesn't appear in all version of the library
- AC_CHECK_LIB(nfsidmap, nfs4_set_debug,
- AC_DEFINE(HAVE_NFS4_SET_DEBUG,1,
- [Whether nfs4_set_debug() is present in libnfsidmap]),)
+ AC_LIBNFSIDMAP
+
+ AC_CHECK_HEADERS([spkm3.h], ,
+ [AC_MSG_WARN([Could not locate SPKM3 header; will not have SPKM3 support])])
dnl Check for Kerberos V5
AC_KERBEROS_V5
^ permalink raw reply related
* [PATCH 5/9] configure: Move rpcsecgss checking into aclocal
From: Chuck Lever @ 2009-03-05 17:42 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Clean up: Introduce two more aclocal scripts for handling rpcsecgss
dependency checking.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
Makefile.am | 3 ++-
aclocal/librpcsecgss.m4 | 16 ++++++++++++++++
aclocal/rpcsec_vers.m4 | 9 +++++++++
configure.ac | 23 ++++++++---------------
4 files changed, 35 insertions(+), 16 deletions(-)
create mode 100644 aclocal/librpcsecgss.m4
create mode 100644 aclocal/rpcsec_vers.m4
diff --git a/Makefile.am b/Makefile.am
index 6541fb7..098446b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,7 +43,8 @@ EXTRA_DIST = \
aclocal/tcp-wrappers.m4 \
aclocal/libtirpc.m4 \
aclocal/libevent.m4 \
- aclocal/libnfsidmap.m4
+ aclocal/libnfsidmap.m4 \
+ aclocal/rpcsec_vers.m4
ACLOCAL_AMFLAGS = -I aclocal
diff --git a/aclocal/librpcsecgss.m4 b/aclocal/librpcsecgss.m4
new file mode 100644
index 0000000..a81819e
--- /dev/null
+++ b/aclocal/librpcsecgss.m4
@@ -0,0 +1,16 @@
+dnl Checks for rpcsecgss library and headers
+dnl KRB5LIBS must be set before this function is invoked.
+dnl
+AC_DEFUN([AC_LIBRPCSECGSS], [
+
+ dnl Check for library, but do not add -lrpcsecgss to LIBS
+ AC_CHECK_LIB([rpcsecgss], [authgss_create_default], [librpcsecgss=1],
+ [AC_MSG_ERROR([librpcsecgss not found.])],
+ [-lgssglue -ldl])
+
+ AC_CHECK_LIB([rpcsecgss], [authgss_set_debug_level],
+ [AC_DEFINE([HAVE_AUTHGSS_SET_DEBUG_LEVEL], 1,
+ [Define to 1 if you have the `authgss_set_debug_level' function.])],,
+ [-lgssglue -ldl])
+
+])dnl
diff --git a/aclocal/rpcsec_vers.m4 b/aclocal/rpcsec_vers.m4
new file mode 100644
index 0000000..df7cfb9
--- /dev/null
+++ b/aclocal/rpcsec_vers.m4
@@ -0,0 +1,9 @@
+dnl Checks librpcsec version
+AC_DEFUN([AC_RPCSEC_VERSION], [
+
+ PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.16], ,
+ [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])])
+
+ PKG_CHECK_MODULES([GSSGLUE], [libgssglue >= 0.1])
+
+])dnl
diff --git a/configure.ac b/configure.ac
index 0d5f5a6..7d25384 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,17 +203,13 @@ if test "$enable_nfsv4" = yes; then
dnl check for nfsidmap libraries and headers
AC_LIBNFSIDMAP
- dnl librpcsecgss already has a dependency on libgssapi,
- dnl but we need to make sure we get the right version
- if test "$enable_gss" = yes; then
- PKG_CHECK_MODULES(RPCSECGSS, librpcsecgss >= 0.16, ,
- [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
- ]
- )
- PKG_CHECK_MODULES(GSSGLUE, libgssglue >= 0.1)
- fi
-
+ dnl librpcsecgss already has a dependency on libgssapi,
+ dnl but we need to make sure we get the right version
+ if test "$enable_gss" = yes; then
+ AC_RPCSEC_VERSION
+ fi
fi
+
if test "$knfsd_cv_glibc2" = no; then
AC_CHECK_LIB(bsd, daemon, [LIBBSD="-lbsd"])
fi
@@ -249,11 +245,8 @@ if test "$enable_gss" = yes; then
dnl Check for Kerberos V5
AC_KERBEROS_V5
- dnl This is not done until here because we need to have KRBLIBS set
- dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS)
- AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), -lgssglue -ldl)
- AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level,
- AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, -lgssglue -ldl)
+ dnl Invoked after AC_KERBEROS_V5; AC_LIBRPCSECGSS needs to have KRBLIBS set
+ AC_LIBRPCSECGSS
fi
^ permalink raw reply related
* [PATCH 6/9] nfs-utils: don't need extra libs to do AC_CHECK_LIBS for librpcsecgss
From: Chuck Lever @ 2009-03-05 17:42 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
From: Jeff Layton <jlayton@redhat.com>
The conftest should work without these extra libs being included.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
aclocal/librpcsecgss.m4 | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/aclocal/librpcsecgss.m4 b/aclocal/librpcsecgss.m4
index a81819e..5791260 100644
--- a/aclocal/librpcsecgss.m4
+++ b/aclocal/librpcsecgss.m4
@@ -5,12 +5,10 @@ AC_DEFUN([AC_LIBRPCSECGSS], [
dnl Check for library, but do not add -lrpcsecgss to LIBS
AC_CHECK_LIB([rpcsecgss], [authgss_create_default], [librpcsecgss=1],
- [AC_MSG_ERROR([librpcsecgss not found.])],
- [-lgssglue -ldl])
+ [AC_MSG_ERROR([librpcsecgss not found.])])
AC_CHECK_LIB([rpcsecgss], [authgss_set_debug_level],
- [AC_DEFINE([HAVE_AUTHGSS_SET_DEBUG_LEVEL], 1,
- [Define to 1 if you have the `authgss_set_debug_level' function.])],,
- [-lgssglue -ldl])
+ [AC_DEFINE([HAVE_AUTHGSS_SET_DEBUG_LEVEL], 1,
+ [Define to 1 if you have the `authgss_set_debug_level' function.])])
])dnl
^ permalink raw reply related
* [PATCH 3/9] nfs-utils: replace function-specific switches with HAVE_LIBTIRPC
From: Chuck Lever @ 2009-03-05 17:42 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Instead of switching in TI-RPC-specific logic with a function-specific
switch like HAVE_CLNT_VG_CREATE, let's use the more generic
HAVE_LIBTIRPC macro everywhere.
This simplifies ./configure (always a good thing), and makes it more
clear in the source code exactly what the extra conditionally compiled
code is for.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
aclocal/libtirpc.m4 | 5 -----
support/nfs/getport.c | 36 +++++++++++++++++----------------
support/nfs/rpc_socket.c | 50 +++++++++++++++++++++++-----------------------
3 files changed, 43 insertions(+), 48 deletions(-)
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
index 67c4012..b1f3669 100644
--- a/aclocal/libtirpc.m4
+++ b/aclocal/libtirpc.m4
@@ -15,11 +15,6 @@ AC_DEFUN([AC_LIBTIRPC], [
AC_CHECK_HEADERS([tirpc/netconfig.h], ,
[AC_MSG_ERROR([libtirpc headers not found.])])
- dnl set up HAVE_FOO for various functions
- AC_CHECK_FUNCS([getnetconfig \
- clnt_create clnt_create_timed \
- clnt_vc_create clnt_dg_create xdr_rpcb])
-
fi
])dnl
diff --git a/support/nfs/getport.c b/support/nfs/getport.c
index 5da1749..2255b7d 100644
--- a/support/nfs/getport.c
+++ b/support/nfs/getport.c
@@ -40,7 +40,7 @@
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
-#ifdef HAVE_TIRPC_NETCONFIG_H
+#ifdef HAVE_LIBTIRPC
#include <tirpc/netconfig.h>
#include <tirpc/rpc/rpcb_prot.h>
#endif
@@ -53,17 +53,17 @@
* Rpcbind's local socket service does not seem to be working.
* Disable this logic for now.
*/
-#ifdef HAVE_XDR_RPCB
+#ifdef HAVE_LIBTIRPC
#undef NFS_GP_LOCAL
-#else /* HAVE_XDR_RPCB */
+#else /* !HAVE_LIBTIRPC */
#undef NFS_GP_LOCAL
-#endif /* HAVE_XDR_RPCB */
+#endif /* !HAVE_LIBTIRPC */
-#ifdef HAVE_XDR_RPCB
+#ifdef HAVE_LIBTIRPC
const static rpcvers_t default_rpcb_version = RPCBVERS_4;
-#else
+#else /* !HAVE_LIBTIRPC */
const static rpcvers_t default_rpcb_version = PMAPVERS;
-#endif
+#endif /* !HAVE_LIBTIRPC */
#ifdef HAVE_DECL_AI_ADDRCONFIG
/*
@@ -242,7 +242,7 @@ static CLIENT *nfs_gp_get_rpcbclient(const struct sockaddr *sap,
* Returns a '\0'-terminated string if successful; otherwise NULL.
* rpc_createerr.cf_stat is set to reflect the error.
*/
-#ifdef HAVE_XDR_RPCB
+#ifdef HAVE_LIBTIRPC
static char *nfs_gp_get_netid(const sa_family_t family,
const unsigned short protocol)
@@ -290,7 +290,7 @@ out:
return NULL;
}
-#endif /* HAVE_XDR_RPCB */
+#endif /* HAVE_LIBTIRPC */
/*
* Extract a port number from a universal address, and terminate the
@@ -453,7 +453,7 @@ static int nfs_gp_ping(CLIENT *client, struct timeval timeout)
return (int)(status == RPC_SUCCESS);
}
-#ifdef HAVE_XDR_RPCB
+#ifdef HAVE_LIBTIRPC
/*
* Initialize the rpcb argument for a GETADDR request.
@@ -565,7 +565,7 @@ static unsigned short nfs_gp_rpcb_getaddr(CLIENT *client,
return port;
}
-#endif /* HAVE_XDR_RPCB */
+#endif /* HAVE_LIBTIRPC */
/*
* Try GETPORT request via rpcbind version 2.
@@ -595,7 +595,7 @@ static unsigned long nfs_gp_pmap_getport(CLIENT *client,
return port;
}
-#ifdef HAVE_XDR_RPCB
+#ifdef HAVE_LIBTIRPC
static unsigned short nfs_gp_getport_rpcb(CLIENT *client,
const struct sockaddr *sap,
@@ -617,7 +617,7 @@ static unsigned short nfs_gp_getport_rpcb(CLIENT *client,
return port;
}
-#endif /* HAVE_XDR_RPCB */
+#endif /* HAVE_LIBTIRPC */
static unsigned long nfs_gp_getport_pmap(CLIENT *client,
const rpcprog_t program,
@@ -652,11 +652,11 @@ static unsigned short nfs_gp_getport(CLIENT *client,
struct timeval timeout)
{
switch (sap->sa_family) {
-#ifdef HAVE_XDR_RPCB
+#ifdef HAVE_LIBTIRPC
case AF_INET6:
return nfs_gp_getport_rpcb(client, sap, salen, program,
version, protocol, timeout);
-#endif /* HAVE_XDR_RPCB */
+#endif /* HAVE_LIBTIRPC */
case AF_INET:
return nfs_gp_getport_pmap(client, program, version,
protocol, timeout);
@@ -922,7 +922,7 @@ unsigned short nfs_getlocalport(const rpcprot_t program,
* address of the same address family. In this way an RPC server can
* advertise via rpcbind that it does not support AF_INET6.
*/
-#ifdef HAVE_XDR_RPCB
+#ifdef HAVE_LIBTIRPC
unsigned short nfs_rpcb_getaddr(const struct sockaddr *sap,
const socklen_t salen,
@@ -955,7 +955,7 @@ unsigned short nfs_rpcb_getaddr(const struct sockaddr *sap,
return port;
}
-#else /* HAVE_XDR_RPCB */
+#else /* !HAVE_LIBTIRPC */
unsigned short nfs_rpcb_getaddr(const struct sockaddr *sap,
const socklen_t salen,
@@ -971,7 +971,7 @@ unsigned short nfs_rpcb_getaddr(const struct sockaddr *sap,
return 0;
}
-#endif /* HAVE_XDR_RPCB */
+#endif /* !HAVE_LIBTIRPC */
/**
* nfs_pmap_getport - query rpcbind via the portmap protocol (rpcbindv2)
diff --git a/support/nfs/rpc_socket.c b/support/nfs/rpc_socket.c
index b7420d1..4b4b0be 100644
--- a/support/nfs/rpc_socket.c
+++ b/support/nfs/rpc_socket.c
@@ -40,7 +40,7 @@
#include "nfsrpc.h"
-#ifdef HAVE_TIRPC_NETCONFIG_H
+#ifdef HAVE_LIBTIRPC
/*
* Most of the headers under /usr/include/tirpc are currently
@@ -84,7 +84,7 @@ extern CLIENT *clnt_vc_create(const int, const struct netbuf *,
const rpcprog_t, const rpcvers_t,
u_int, u_int);
-#endif /* HAVE_TIRPC_NETCONFIG_H */
+#endif /* HAVE_LIBTIRPC */
/*
* If "-1" is specified in the tv_sec field, use these defaults instead.
@@ -107,14 +107,14 @@ static CLIENT *nfs_get_localclient(const struct sockaddr *sap,
const rpcvers_t version,
struct timeval *timeout)
{
-#ifdef HAVE_CLNT_VC_CREATE
+#ifdef HAVE_LIBTIRPC
struct sockaddr_storage address;
const struct netbuf nbuf = {
.maxlen = sizeof(struct sockaddr_un),
.len = (size_t)salen,
.buf = &address,
};
-#endif /* HAVE_CLNT_VC_CREATE */
+#endif /* HAVE_LIBTIRPC */
CLIENT *client;
int sock;
@@ -128,13 +128,13 @@ static CLIENT *nfs_get_localclient(const struct sockaddr *sap,
if (timeout->tv_sec == -1)
timeout->tv_sec = NFSRPC_TIMEOUT_TCP;
-#ifdef HAVE_CLNT_VC_CREATE
+#ifdef HAVE_LIBTIRPC
memcpy(nbuf.buf, sap, (size_t)salen);
client = clnt_vc_create(sock, &nbuf, program, version, 0, 0);
-#else /* HAVE_CLNT_VC_CREATE */
+#else /* !HAVE_LIBTIRPC */
client = clntunix_create((struct sockaddr_un *)sap,
program, version, &sock, 0, 0);
-#endif /* HAVE_CLNT_VC_CREATE */
+#endif /* !HAVE_LIBTIRPC */
if (client != NULL)
CLNT_CONTROL(client, CLSET_FD_CLOSE, NULL);
else
@@ -261,23 +261,23 @@ static CLIENT *nfs_get_udpclient(const struct sockaddr *sap,
const rpcvers_t version,
struct timeval *timeout)
{
-#ifdef HAVE_CLNT_DG_CREATE
+ CLIENT *client;
+ int ret, sock;
+#ifdef HAVE_LIBTIRPC
struct sockaddr_storage address;
const struct netbuf nbuf = {
.maxlen = salen,
.len = salen,
.buf = &address,
};
-#endif /* HAVE_CLNT_DG_CREATE */
- CLIENT *client;
- int ret, sock;
-#ifndef HAVE_CLNT_DG_CREATE
+#else /* !HAVE_LIBTIRPC */
+
if (sap->sa_family != AF_INET) {
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
return NULL;
}
-#endif /* !HAVE_CLNT_DG_CREATE */
+#endif /* !HAVE_LIBTIRPC */
sock = socket((int)sap->sa_family, SOCK_DGRAM, IPPROTO_UDP);
if (sock == -1) {
@@ -305,13 +305,13 @@ static CLIENT *nfs_get_udpclient(const struct sockaddr *sap,
return NULL;
}
-#ifdef HAVE_CLNT_DG_CREATE
+#ifdef HAVE_LIBTIRPC
memcpy(nbuf.buf, sap, (size_t)salen);
client = clnt_dg_create(sock, &nbuf, program, version, 0, 0);
-#else /* HAVE_CLNT_DG_CREATE */
+#else /* !HAVE_LIBTIRPC */
client = clntudp_create((struct sockaddr_in *)sap, program,
version, *timeout, &sock);
-#endif /* HAVE_CLNT_DG_CREATE */
+#endif /* !HAVE_LIBTIRPC */
if (client != NULL) {
CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *)timeout);
CLNT_CONTROL(client, CLSET_FD_CLOSE, NULL);
@@ -337,23 +337,23 @@ static CLIENT *nfs_get_tcpclient(const struct sockaddr *sap,
const rpcvers_t version,
struct timeval *timeout)
{
-#ifdef HAVE_CLNT_VC_CREATE
+ CLIENT *client;
+ int ret, sock;
+#ifdef HAVE_LIBTIRPC
struct sockaddr_storage address;
const struct netbuf nbuf = {
.maxlen = salen,
.len = salen,
.buf = &address,
};
-#endif /* HAVE_CLNT_VC_CREATE */
- CLIENT *client;
- int ret, sock;
-#ifndef HAVE_CLNT_VC_CREATE
+#else /* !HAVE_LIBTIRPC */
+
if (sap->sa_family != AF_INET) {
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
return NULL;
}
-#endif /* !HAVE_CLNT_VC_CREATE */
+#endif /* !HAVE_LIBTIRPC */
sock = socket((int)sap->sa_family, SOCK_STREAM, IPPROTO_TCP);
if (sock == -1) {
@@ -381,13 +381,13 @@ static CLIENT *nfs_get_tcpclient(const struct sockaddr *sap,
return NULL;
}
-#ifdef HAVE_CLNT_VC_CREATE
+#ifdef HAVE_LIBTIRPC
memcpy(nbuf.buf, sap, (size_t)salen);
client = clnt_vc_create(sock, &nbuf, program, version, 0, 0);
-#else /* HAVE_CLNT_VC_CREATE */
+#else /* !HAVE_LIBTIRPC */
client = clnttcp_create((struct sockaddr_in *)sap,
program, version, &sock, 0, 0);
-#endif /* HAVE_CLNT_VC_CREATE */
+#endif /* !HAVE_LIBTIRPC */
if (client != NULL)
CLNT_CONTROL(client, CLSET_FD_CLOSE, NULL);
else
^ permalink raw reply related
* [PATCH 1/9] configure: add defensive quoting in some function checks
From: Chuck Lever @ 2009-03-05 17:41 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
In-Reply-To: <20090305173533.30471.41413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Clean up: Add proper m4 quoting in macros that check for the presence
of some functions in configure.ac.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
configure.ac | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5db4417..97b084b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,23 +176,26 @@ AC_BSD_SIGNALS
dnl *************************************************************
dnl * Check for required libraries
dnl *************************************************************
-AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, [LIBNSL="-lnsl"])])
+
+AC_CHECK_FUNC([gethostbyname], ,
+ [AC_CHECK_LIB([nsl], [gethostbyname], [LIBNSL="-lnsl"])])
AC_SUBST(LIBNSL)
-AC_CHECK_FUNC(connect, ,
- AC_CHECK_LIB(socket, connect, [LIBSOCKET="-lsocket"],
- AC_MSG_ERROR(Function 'socket' not found.), $LIBNSL))
+AC_CHECK_FUNC([connect], ,
+ [AC_CHECK_LIB([socket], [connect], [LIBSOCKET="-lsocket"],
+ [AC_MSG_ERROR([Function 'socket' not found.])], [$LIBNSL])])
+
+AC_CHECK_FUNC([getaddrinfo], , ,
+ [AC_MSG_ERROR([Function 'getaddrinfo' not found.])])
-AC_CHECK_FUNC(getaddrinfo, , ,
- AC_MSG_ERROR(Function 'getaddrinfo' not found.))
+AC_CHECK_FUNC([getrpcbynumber], , ,
+ [AC_MSG_ERROR([Function 'getrpcbynumber' not found.])])
-AC_CHECK_FUNC(getrpcbynumber, , ,
- AC_MSG_ERROR(Function 'getrpcbynumber' not found.))
+AC_CHECK_FUNC([getservbyname], , ,
+ [AC_MSG_ERROR([Function 'getservbyname' not found.])])
-AC_CHECK_FUNC(getservbyname, , ,
- AC_MSG_ERROR(Function 'getservbyname' not found.))
+AC_CHECK_LIB([crypt], [crypt], [LIBCRYPT="-lcrypt"])
-AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"])
if test "$enable_nfsv4" = yes; then
AC_CHECK_LIB(event, event_dispatch, [libevent=1], AC_MSG_ERROR([libevent needed for nfsv4 support]))
AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
^ permalink raw reply related
* [PATCH 0/9] Address type width mismatches between TI-RPC and glibc
From: Chuck Lever @ 2009-03-05 17:41 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Steve-
Now that the clean up is finished, here are the patches that actually
fix the type width mismatch problem between glibc headers and the
TI-RPC run-time.
This patch set implements a full switch between TI-RPC run-time and
headers and legacy glibc RPC run-time and headers via --enable-tirpc.
In addition there are a number of configure.ac clean ups.
These are the final patches needed to support TI-RPC and IPv6 properly
in mount.nfs, umount.nfs, and showmount.
---
Chuck Lever (7):
nfs-utils: Include legacy or TI-RPC headers, not both
configure: move IPv6 feature checks into aclocal/
configure: Move rpcsecgss checking into aclocal
configure: pull common nfsidmap and event checks into aclocal/
nfs-utils: replace function-specific switches with HAVE_LIBTIRPC
configure: move TI-RPC checks into aclocal/
configure: add defensive quoting in some function checks
Jeff Layton (2):
nfs-utils: clean up handling of libgssglue in gssd Makefile
nfs-utils: don't need extra libs to do AC_CHECK_LIBS for librpcsecgss
Makefile.am | 7 +++
aclocal/ipv6.m4 | 29 ++++++++++++
aclocal/libevent.m4 | 11 +++++
aclocal/libnfsidmap.m4 | 17 +++++++
aclocal/librpcsecgss.m4 | 19 ++++++++
aclocal/libtirpc.m4 | 28 ++++++++++++
aclocal/rpcsec_vers.m4 | 12 +++++
configure.ac | 107 +++++++++++++++++-----------------------------
support/nfs/getport.c | 40 +++++++++--------
support/nfs/rpc_socket.c | 95 ++++++++++++-----------------------------
utils/gssd/Makefile.am | 10 ++--
utils/gssd/gssd_proc.c | 3 +
utils/gssd/krb5_util.c | 1
utils/gssd/krb5_util.h | 6 +++
utils/mountd/svc_run.c | 4 ++
15 files changed, 226 insertions(+), 163 deletions(-)
create mode 100644 aclocal/ipv6.m4
create mode 100644 aclocal/libevent.m4
create mode 100644 aclocal/libnfsidmap.m4
create mode 100644 aclocal/librpcsecgss.m4
create mode 100644 aclocal/libtirpc.m4
create mode 100644 aclocal/rpcsec_vers.m4
--
Chuck Lever
^ permalink raw reply
* Re: [PATCH 01/13] PM: Add wake lock api.
From: Uli Luckas @ 2009-03-05 17:42 UTC (permalink / raw)
To: Pavel Machek; +Cc: swetland@google.com, linux-pm, ncunningham@crca.org.au
In-Reply-To: <20090304171058.GE18675@elf.ucw.cz>
On Wednesday, 4. March 2009, Pavel Machek wrote:
> Hi!
>
> > > > here is network packets. You just don't want to open/close a fd for
> > > > every network packet that you process. Neither for serial data,
> > > > bluetooth packets, ...
> > >
> > > You mix userland and kernel users.
> >
> > No. I don't.
> > The idea of wake locks was to hand locks over from a driver's interrupt
> > all the way to userspace.
> > This is done in an interlocked way to ensure that the device does not
> > suspend from the time of interrupt until userspace has handled the event
> > that caused the interrupt (e.g. A modem sending "RING" on the serial
> > line).
> > Basically, in a timerless wake lock implementation userspace has to take
> > a wake lock every time select returns.
>
> Well... in case it is really performance critical, we may want new
> syscalls.
>
> Actually, given how deep change of semantics this is, new syscalls may
> be good idea.
>
> Or better yet eliminate polling from userspace apps and just avoid
> suspending whenever userspace is running (like sleepy patches do).
> Pavel
I don't know the details of sleepy linux so I'd appreciate if someone can
eluminate if the following scenarios could be handled efficiently with sleepy
linux:
1) You wake up through RTC, read the battery, update the color of your
fancy 'battery good' LED and go back to sleep imediately. The real work
takes milliseconds.
2) You send a request to the internet and go idle by selecting for an answer.
You probably don't want to go to sleep as you know, the answer will be
there shortly.
Uli
--
------- ROAD ...the handyPC Company - - - ) ) )
Uli Luckas
Head of Software Development
ROAD GmbH
Bennigsenstr. 14 | 12159 Berlin | Germany
fon: +49 (30) 230069 - 62 | fax: +49 (30) 230069 - 69
url: www.road.de
Amtsgericht Charlottenburg: HRB 96688 B
Managing director: Hans-Peter Constien
^ permalink raw reply
* [Buildroot] iptables without IPV6
From: Bernhard Reutner-Fischer @ 2009-03-05 17:41 UTC (permalink / raw)
To: buildroot
In-Reply-To: <c88e466f0903050920o60b62f7ft3f221960eb865ab@mail.gmail.com>
On Thu, Mar 05, 2009 at 06:20:42PM +0100, Michel Benoit wrote:
>Hej,
>
>Has anyone been able to build iptables 1.4.1 when BR2_INET_IPV6 is not set?
>I'm performing a clean build of buildroot-2009.02 for an AT91SAM9260 target.
>
>It worked fine with an older version of buildroot and iptables (1.3.8).
http://bugzilla.netfilter.org/show_bug.cgi?id=569
^ permalink raw reply
* [U-Boot] Help on getting the AT91 u-boot patch
From: John Parten @ 2009-03-05 17:40 UTC (permalink / raw)
To: u-boot
Hello Mailling List,
I am trying to build U-Boot 1.3.4 from source, for the AT91SAM9260EK development board.
I am following the instructions at http://www.linux4sam.org/twiki/bin/view/Linux4SAM/U-Boot
I get to the point where it says take the AT91 u-boot patch set
However, when I try to use ...
wget http://www.linux4sam.org/twiki/pub/Linux4SAM/U-Boot/u-boot-1.3.4-exp.diff
I get error "404 file not found"
Also I tried ...
wget http://www.linux4sam.org/pub/uboot/u-boot-1.3.4-exp/u-boot-1.3.4-exp.diff as per the table a bit further down on the page - this does not work either.
Can anyone tell me how to get the AT91 u-boot patch file please ?
... many thanks
... kind regards
... John Parten
^ permalink raw reply
* [PATCH] Unify rescue and normal commands
From: Bean @ 2009-03-05 17:40 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]
Hi,
This patch unify the two command set, make them available in both
rescue and normal mode.
The basic command is registered using grub_register_command:
grub_command_t
grub_register_command (const char *name,
grub_command_func_t func,
const char *summary,
const char *description);
The command function looks like this:
grub_err_t grub_cmd_func (grub_command_t cmd, int argc, char **args);
The extended command is built on top on basic command, it provides
argument parsing function. Extended command only depends on
extcmd.mod, which is much smaller than normal.mod.
grub_extcmd_t grub_register_extcmd (const char *name,
grub_extcmd_func_t func,
unsigned flags,
const char *summary,
const char *description,
const struct grub_arg_option *parser);
static grub_err_t
grub_cmd_func (grub_extcmd_t ext, int argc, char **args);
The option state is in ext->state, to access the underlying command
structure, use ext->cmd.
There is another special command: dynamic command, which is used by
normal module to insert commands in command.lst. The module would only
be loaded when the dynamic command is invoked.
The command.lst now contains both basic and extended commands, the
extended command is prefixed by *.
The command structure has a priority parameter, for basic command, its
value is 0, for extended command, it's 1. When the command list is
search, it uses the priority value to decide which command to use.
I also move the rescue commands out of kernel to module minicmd. Only
set, unset, export, ls and insmod remains, as they're critical for
further modules loading.
--
Bean
[-- Attachment #2: command.zip --]
[-- Type: application/zip, Size: 40244 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.