From 74e8dbb58b5528d636b4b52eedc56896e90df9a8 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 16 Oct 2003 11:36:15 +0000 Subject: [PATCH] - minor changes to let lustre build on 2.6.0-test7 --- lnet/klnds/socklnd/socklnd.h | 4 ++++ lnet/klnds/socklnd/socklnd_cb.c | 4 ++-- lnet/libcfs/debug.c | 4 ++++ lustre/portals/knals/socknal/socknal.h | 4 ++++ lustre/portals/knals/socknal/socknal_cb.c | 4 ++-- lustre/portals/libcfs/debug.c | 4 ++++ 6 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lnet/klnds/socklnd/socklnd.h b/lnet/klnds/socklnd/socklnd.h index a345ff7..1c73ae8 100644 --- a/lnet/klnds/socklnd/socklnd.h +++ b/lnet/klnds/socklnd/socklnd.h @@ -108,6 +108,10 @@ # define sk_socket socket #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) +# define sk_wmem_queued wmem_queued +#endif + typedef struct /* pool of forwarding buffers */ { spinlock_t fmp_lock; /* serialise */ diff --git a/lnet/klnds/socklnd/socklnd_cb.c b/lnet/klnds/socklnd/socklnd_cb.c index 65db867..a654694 100644 --- a/lnet/klnds/socklnd/socklnd_cb.c +++ b/lnet/klnds/socklnd/socklnd_cb.c @@ -2363,7 +2363,7 @@ ksocknal_find_timed_out_conn (ksock_peer_t *peer) } if ((!list_empty (&conn->ksnc_tx_queue) || - conn->ksnc_sock->sk->wmem_queued != 0) && + conn->ksnc_sock->sk->sk_wmem_queued != 0) && time_after_eq (jiffies, conn->ksnc_tx_deadline)) { /* Timed out messages queued for sending, or * messages buffered in the socket's send buffer */ @@ -2371,7 +2371,7 @@ ksocknal_find_timed_out_conn (ksock_peer_t *peer) CERROR ("Timed out TX to "LPX64" %s%d %p\n", peer->ksnp_nid, list_empty (&conn->ksnc_tx_queue) ? "" : "Q ", - conn->ksnc_sock->sk->wmem_queued, conn); + conn->ksnc_sock->sk->sk_wmem_queued, conn); return (conn); } } diff --git a/lnet/libcfs/debug.c b/lnet/libcfs/debug.c index e411c0a..61229f5 100644 --- a/lnet/libcfs/debug.c +++ b/lnet/libcfs/debug.c @@ -879,7 +879,11 @@ void portals_run_upcall(char **argv) LASSERT(argc >= 2); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) rc = call_usermodehelper(argv[0], argv, envp); +#else + rc = call_usermodehelper(argv[0], argv, envp, 1); +#endif if (rc < 0) { CERROR("Error %d invoking portals upcall %s %s%s%s%s%s%s%s%s; " "check /proc/sys/portals/upcall\n", diff --git a/lustre/portals/knals/socknal/socknal.h b/lustre/portals/knals/socknal/socknal.h index a345ff7..1c73ae8 100644 --- a/lustre/portals/knals/socknal/socknal.h +++ b/lustre/portals/knals/socknal/socknal.h @@ -108,6 +108,10 @@ # define sk_socket socket #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) +# define sk_wmem_queued wmem_queued +#endif + typedef struct /* pool of forwarding buffers */ { spinlock_t fmp_lock; /* serialise */ diff --git a/lustre/portals/knals/socknal/socknal_cb.c b/lustre/portals/knals/socknal/socknal_cb.c index 65db867..a654694 100644 --- a/lustre/portals/knals/socknal/socknal_cb.c +++ b/lustre/portals/knals/socknal/socknal_cb.c @@ -2363,7 +2363,7 @@ ksocknal_find_timed_out_conn (ksock_peer_t *peer) } if ((!list_empty (&conn->ksnc_tx_queue) || - conn->ksnc_sock->sk->wmem_queued != 0) && + conn->ksnc_sock->sk->sk_wmem_queued != 0) && time_after_eq (jiffies, conn->ksnc_tx_deadline)) { /* Timed out messages queued for sending, or * messages buffered in the socket's send buffer */ @@ -2371,7 +2371,7 @@ ksocknal_find_timed_out_conn (ksock_peer_t *peer) CERROR ("Timed out TX to "LPX64" %s%d %p\n", peer->ksnp_nid, list_empty (&conn->ksnc_tx_queue) ? "" : "Q ", - conn->ksnc_sock->sk->wmem_queued, conn); + conn->ksnc_sock->sk->sk_wmem_queued, conn); return (conn); } } diff --git a/lustre/portals/libcfs/debug.c b/lustre/portals/libcfs/debug.c index e411c0a..61229f5 100644 --- a/lustre/portals/libcfs/debug.c +++ b/lustre/portals/libcfs/debug.c @@ -879,7 +879,11 @@ void portals_run_upcall(char **argv) LASSERT(argc >= 2); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) rc = call_usermodehelper(argv[0], argv, envp); +#else + rc = call_usermodehelper(argv[0], argv, envp, 1); +#endif if (rc < 0) { CERROR("Error %d invoking portals upcall %s %s%s%s%s%s%s%s%s; " "check /proc/sys/portals/upcall\n", -- 1.8.3.1