The 4.13 kernel renames wait_queue_t to wait_queue_entry_t.
Add a probe and handle rename across the code base and have
a define to translate to the new name when indicated.
Test-Parameters: trivial
Change-Id: I8f0f5ec4d02ccb270acb72ccffe13f0ecf6bd2f7
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-on: https://review.whamcloud.com/31153
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
f_dentry||f_path.dentry
= seq_printf||seq_printf
return seq_printf||seq_printf
+wait_queue_t|wait_queue_entry_t
DN_MAX_BONUSLEN||DN_BONUS_SIZE(dnodesize)
DN_OLD_MAX_BONUSLEN||DN_BONUS_SIZE(DNODE_MIN_SIZE)
]) # LIBCFS_SCHED_HEADERS
#
+# LIBCFS_WAIT_QUEUE_ENTRY
+#
+# Kernel version 4.13 ac6424b981bce1c4bc55675c6ce11bfe1bbfa64f
+# Rename wait_queue_t => wait_queue_entry_t
+#
+AC_DEFUN([LIBCFS_WAIT_QUEUE_ENTRY], [
+LB_CHECK_COMPILE([if 'wait_queue_entry_t' exists],
+wait_queue_entry, [
+ #include <linux/wait.h>
+],[
+ wait_queue_entry_t e;
+],[
+ AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY, 1,
+ ['wait_queue_entry_t' is available])
+])
+]) # LIBCFS_WAIT_QUEUE_ENTRY
+
+#
# LIBCFS_PROG_LINUX
#
# LibCFS linux kernel checks
LIBCFS_HOTPLUG_STATE_MACHINE
# 4.11
LIBCFS_SCHED_HEADERS
+# 4.13
+LIBCFS_WAIT_QUEUE_ENTRY
]) # LIBCFS_PROG_LINUX
#
int cfs_get_environ(const char *key, char *value, int *val_len);
+#ifndef HAVE_WAIT_QUEUE_ENTRY
+#define wait_queue_entry_t wait_queue_t
+#endif
+
/*
* For RHEL6 struct kernel_parm_ops doesn't exist. Also
* the arguments for .set and .get take different
void libcfs_debug_dumplog(void)
{
- wait_queue_t wait;
- struct task_struct *dumper;
+ wait_queue_entry_t wait;
+ struct task_struct *dumper;
ENTRY;
/* we're being careful to ensure that the kernel thread is
#include <linux/pagemap.h>
#include <linux/uaccess.h>
#include <libcfs/linux/linux-fs.h>
+#include <libcfs/linux/linux-misc.h>
#include <libcfs/libcfs.h>
/* XXX move things up to the top, comment */
complete(&tctl->tctl_start);
while (1) {
- wait_queue_t __wait;
+ wait_queue_entry_t __wait;
pc.pc_want_daemon_pages = 0;
collect_pages(&pc);
# error This include is only for kernel use.
#endif
+#include <libcfs/linux/linux-misc.h>
#include <libcfs/libcfs.h>
#include <lnet/api.h>
#include <lnet/lib-types.h>
kiblnd_connd (void *arg)
{
spinlock_t *lock= &kiblnd_data.kib_connd_lock;
- wait_queue_t wait;
+ wait_queue_entry_t wait;
unsigned long flags;
kib_conn_t *conn;
int timeout;
long id = (long)arg;
struct kib_sched_info *sched;
kib_conn_t *conn;
- wait_queue_t wait;
+ wait_queue_entry_t wait;
unsigned long flags;
struct ib_wc wc;
int did_something;
{
rwlock_t *glock = &kiblnd_data.kib_global_lock;
kib_dev_t *dev;
- wait_queue_t wait;
+ wait_queue_entry_t wait;
unsigned long flags;
int rc;
{
spinlock_t *connd_lock = &ksocknal_data.ksnd_connd_lock;
struct ksock_connreq *cr;
- wait_queue_t wait;
+ wait_queue_entry_t wait;
int nloops = 0;
int cons_retry = 0;
int ksocknal_reaper(void *arg)
{
- wait_queue_t wait;
+ wait_queue_entry_t wait;
struct ksock_conn *conn;
struct ksock_sched *sched;
struct list_head enomem_conns;
__must_hold(&the_lnet.ln_eq_wait_lock)
{
signed long tms = *timeout;
- wait_queue_t wl;
+ wait_queue_entry_t wl;
int wait;
if (tms == 0)
int
lnet_sock_accept(struct socket **newsockp, struct socket *sock)
{
- wait_queue_t wait;
+ wait_queue_entry_t wait;
struct socket *newsock;
int rc;
#include <linux/wait.h>
],[
wait_queue_head_t queue;
- wait_queue_t wait;
+ wait_queue_t wait;
+
__add_wait_queue_exclusive(&queue, &wait);
],[
AC_DEFINE(HAVE___ADD_WAIT_QUEUE_EXCLUSIVE, 1,
}
static int seq_fid_alloc_prep(struct lu_client_seq *seq,
- wait_queue_t *link)
+ wait_queue_entry_t *link)
{
if (seq->lcs_update) {
add_wait_queue(&seq->lcs_waitq, link);
int seq_client_get_seq(const struct lu_env *env,
struct lu_client_seq *seq, u64 *seqnr)
{
- wait_queue_t link;
+ wait_queue_entry_t link;
int rc;
LASSERT(seqnr != NULL);
int seq_client_alloc_fid(const struct lu_env *env,
struct lu_client_seq *seq, struct lu_fid *fid)
{
- wait_queue_t link;
+ wait_queue_entry_t link;
int rc;
ENTRY;
*/
void seq_client_flush(struct lu_client_seq *seq)
{
- wait_queue_t link;
+ wait_queue_entry_t link;
LASSERT(seq != NULL);
init_waitqueue_entry(&link, current);
#include <linux/sched/mm.h>
#endif
+#include <libcfs/linux/linux-misc.h>
#include <libcfs/libcfs.h>
#include <uapi/linux/lustre/lustre_idl.h>
#include <uapi/linux/lustre/lustre_ver.h>
/*
* Wait Queue
*/
-#ifndef HAVE___ADD_WAIT_QUEUE_EXCLUSIVE
+#if !defined(HAVE___ADD_WAIT_QUEUE_EXCLUSIVE) && !defined(HAVE_WAIT_QUEUE_ENTRY)
static inline void __add_wait_queue_exclusive(wait_queue_head_t *q,
wait_queue_t *wait)
{
*/
#define __l_wait_event(wq, condition, info, ret, l_add_wait) \
do { \
- wait_queue_t __wait; \
+ wait_queue_entry_t __wait; \
cfs_duration_t __timeout = info->lwi_timeout; \
sigset_t __blocked; \
int __allow_intr = info->lwi_allow_intr; \
static void cl_object_put_last(struct lu_env *env, struct cl_object *obj)
{
struct lu_object_header *header = obj->co_lu.lo_header;
- wait_queue_t waiter;
+ wait_queue_entry_t waiter;
if (unlikely(atomic_read(&header->loh_ref) != 1)) {
struct lu_site *site = obj->co_lu.lo_dev->ld_site;
struct ost_lvb lti_lvb;
struct cl_2queue lti_cl2q;
struct cl_page_list lti_plist;
- wait_queue_t lti_waiter;
+ wait_queue_entry_t lti_waiter;
};
/**
struct cl_object *sub;
struct lu_site *site;
struct lu_site_bkt_data *bkt;
- wait_queue_t *waiter;
+ wait_queue_entry_t *waiter;
LASSERT(r0->lo_sub[idx] == los);
*/
#define DEBUG_SUBSYSTEM S_SEC
+#include <libcfs/linux/linux-misc.h>
#include <libcfs/libcfs.h>
#include <uapi/linux/lnet/lnet-types.h>
#include <upcall_cache.h>
{
struct upcall_cache_entry *entry = NULL, *new = NULL, *next;
struct list_head *head;
- wait_queue_t wait;
+ wait_queue_entry_t wait;
int rc, found;
ENTRY;
struct ptlrpc_reply_state *rs;
struct rsc *rsci = NULL;
struct rsi *rsip = NULL, rsikey;
- wait_queue_t wait;
+ wait_queue_entry_t wait;
int replen = sizeof(struct ptlrpc_body);
struct gss_rep_header *rephdr;
int first_check = 1;
*/
int sptlrpc_enc_pool_get_pages(struct ptlrpc_bulk_desc *desc)
{
- wait_queue_t waitlink;
+ wait_queue_entry_t waitlink;
unsigned long this_idle = -1;
u64 tick_ns = 0;
time64_t now;