Linux 4.13 compat: wait queues

Commit torvalds/linux@ac6424b9
- Renamed struct wait_queue -> struct wait_queue_entry.

Commit torvalds/linux@2055da97
- Renamed wait_queue_head::task_list -> wait_queue_head::head
- Renamed wait_queue_entry::task_list -> wait_queue_entry::entry

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #629
This commit is contained in:
Brian Behlendorf
2017-07-23 19:32:14 -07:00
committed by GitHub
parent ae42190b79
commit 944117514d
10 changed files with 91 additions and 14 deletions
+9
View File
@@ -26,6 +26,7 @@
#define _SPL_WAIT_COMPAT_H
#include <linux/sched.h>
#include <linux/wait.h>
#ifndef HAVE_WAIT_ON_BIT_ACTION
# define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode)
@@ -43,4 +44,12 @@ spl_bit_wait(void *word)
#endif /* HAVE_WAIT_ON_BIT_ACTION */
#ifdef HAVE_WAIT_QUEUE_ENTRY_T
typedef wait_queue_head_t spl_wait_queue_head_t;
typedef wait_queue_entry_t spl_wait_queue_entry_t;
#else
typedef wait_queue_head_t spl_wait_queue_head_t;
typedef wait_queue_t spl_wait_queue_entry_t;
#endif
#endif /* SPL_WAIT_COMPAT_H */
+3 -3
View File
@@ -26,7 +26,7 @@
#define _SPL_CONDVAR_H
#include <linux/module.h>
#include <linux/wait.h>
#include <linux/wait_compat.h>
#include <linux/delay_compat.h>
#include <sys/kmem.h>
#include <sys/mutex.h>
@@ -41,8 +41,8 @@
typedef struct {
int cv_magic;
wait_queue_head_t cv_event;
wait_queue_head_t cv_destroy;
spl_wait_queue_head_t cv_event;
spl_wait_queue_head_t cv_destroy;
atomic_t cv_refs;
atomic_t cv_waiters;
kmutex_t *cv_mutex;
+1 -1
View File
@@ -193,7 +193,7 @@ typedef struct spl_kmem_cache {
struct list_head skc_partial_list; /* Partially alloc'ed */
struct rb_root skc_emergency_tree; /* Min sized objects */
spinlock_t skc_lock; /* Cache lock */
wait_queue_head_t skc_waitq; /* Allocation waiters */
spl_wait_queue_head_t skc_waitq; /* Allocation waiters */
uint64_t skc_slab_fail; /* Slab alloc failures */
uint64_t skc_slab_create; /* Slab creates */
uint64_t skc_slab_destroy; /* Slab destroys */
+4 -3
View File
@@ -30,6 +30,7 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/kthread.h>
#include <linux/wait_compat.h>
#include <sys/types.h>
#include <sys/thread.h>
#include <sys/rwlock.h>
@@ -96,14 +97,14 @@ typedef struct taskq {
struct list_head tq_prio_list; /* priority pending taskq_ent_t's */
struct list_head tq_delay_list; /* delayed taskq_ent_t's */
struct list_head tq_taskqs; /* all taskq_t's */
wait_queue_head_t tq_work_waitq; /* new work waitq */
wait_queue_head_t tq_wait_waitq; /* wait waitq */
spl_wait_queue_head_t tq_work_waitq; /* new work waitq */
spl_wait_queue_head_t tq_wait_waitq; /* wait waitq */
tq_lock_role_t tq_lock_class; /* class when taking tq_lock */
} taskq_t;
typedef struct taskq_ent {
spinlock_t tqent_lock;
wait_queue_head_t tqent_waitq;
spl_wait_queue_head_t tqent_waitq;
struct timer_list tqent_timer;
struct list_head tqent_list;
taskqid_t tqent_id;