Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 278615 Details for
Bug 365735
sys-block/iscsitarget-1.4.20.2 does not compile against kernel 2.6.38
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for iscsitarget 1.4.20.2 and kernel 2.6.38
iscsitarget-1.4.20.2-kernel-2.6.38-r6.patch (text/plain), 5.97 KB, created by
Iván Escrivá
on 2011-06-29 10:55:21 UTC
(
hide
)
Description:
patch for iscsitarget 1.4.20.2 and kernel 2.6.38
Filename:
MIME Type:
Creator:
Iván Escrivá
Created:
2011-06-29 10:55:21 UTC
Size:
5.97 KB
patch
obsolete
>--- kernel/block-io.c 2011-06-29 01:52:07.000000000 +0200 >+++ kernel/block-io.c 2011-06-29 10:53:41.000000000 +0200 >@@ -162,7 +162,7 @@ > if (!bio_data->path) > return -ENOMEM; > >- bdev = open_bdev_exclusive(path, flags, THIS_MODULE); >+ bdev = blkdev_get_by_path(path, flags, THIS_MODULE); > if (IS_ERR(bdev)) { > err = PTR_ERR(bdev); > eprintk("Can't open device %s, error %d\n", path, err); >@@ -253,7 +253,7 @@ > int flags = FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); > > if (bio_data->bdev) >- close_bdev_exclusive(bio_data->bdev, flags); >+ blkdev_put(bio_data->bdev, flags); > kfree(bio_data->path); > > kfree(volume->private); >--- kernel/config.c 2011-06-29 01:52:07.000000000 +0200 >+++ kernel/config.c 2011-06-29 02:07:46.000000000 +0200 >@@ -9,7 +9,7 @@ > #include "iscsi.h" > #include "iscsi_dbg.h" > >-static DECLARE_MUTEX(ioctl_sem); >+static DEFINE_MUTEX(ioctl_mutex); > > struct proc_entries { > const char *name; >@@ -258,7 +258,7 @@ > long err; > u32 id; > >- err = down_interruptible(&ioctl_sem); >+ err = mutex_lock_interruptible(&ioctl_mutex); > if (err < 0) > return err; > >@@ -339,7 +339,7 @@ > > target_unlock(target); > done: >- up(&ioctl_sem); >+ mutex_unlock(&ioctl_mutex); > > return err; > } >@@ -347,9 +347,9 @@ > static int release(struct inode *i __attribute__((unused)), > struct file *f __attribute__((unused))) > { >- down(&ioctl_sem); >+ mutex_lock(&ioctl_mutex); > target_del_all(); >- up(&ioctl_sem); >+ mutex_unlock(&ioctl_mutex); > > return 0; > } >--- kernel/conn.c 2011-06-29 01:52:07.000000000 +0200 >+++ kernel/conn.c 2011-06-29 12:39:31.000000000 +0200 >@@ -44,7 +44,7 @@ > switch (sk->sk_family) { > case AF_INET: > snprintf(buf, sizeof(buf), >- "%pI4", inet_sk(sk)->inet_daddr); >+ "%pI4", (void *)inet_sk(sk)->inet_daddr); > break; > case AF_INET6: > snprintf(buf, sizeof(buf), "[%pI6]", >--- kernel/iscsi.h 2011-06-29 01:52:07.000000000 +0200 >+++ kernel/iscsi.h 2011-06-29 02:07:46.000000000 +0200 >@@ -130,7 +130,7 @@ > /* Points either to own list or global pool */ > struct worker_thread_info * wthread_info; > >- struct semaphore target_sem; >+ struct mutex target_mutex; > }; > > struct iscsi_queue { >--- kernel/target.c 2011-06-29 01:52:07.000000000 +0200 >+++ kernel/target.c 2011-06-29 02:07:46.000000000 +0200 >@@ -4,6 +4,8 @@ > * Released under the terms of the GNU GPL v2.0. > */ > >+#include <linux/mutex.h> >+ > #include "iscsi.h" > #include "digest.h" > #include "iscsi_dbg.h" >@@ -11,7 +13,7 @@ > #define MAX_NR_TARGETS (1UL << 30) > > static LIST_HEAD(target_list); >-static DECLARE_MUTEX(target_list_sem); >+static DEFINE_MUTEX(target_list_mutex); > static u32 next_target_id; > static u32 nr_targets; > >@@ -48,16 +50,16 @@ > int err = 0; > > if (interruptible) >- err = down_interruptible(&target->target_sem); >+ err = mutex_lock_interruptible(&target->target_mutex); > else >- down(&target->target_sem); >+ mutex_lock(&target->target_mutex); > > return err; > } > > inline void target_unlock(struct iscsi_target *target) > { >- up(&target->target_sem); >+ mutex_unlock(&target->target_mutex); > } > > static struct iscsi_target *__target_lookup_by_id(u32 id) >@@ -86,9 +88,9 @@ > { > struct iscsi_target *target; > >- down(&target_list_sem); >+ mutex_lock(&target_list_mutex); > target = __target_lookup_by_id(id); >- up(&target_list_sem); >+ mutex_unlock(&target_list_mutex); > > return target; > } >@@ -157,7 +159,7 @@ > > strncpy(target->name, name, sizeof(target->name) - 1); > >- init_MUTEX(&target->target_sem); >+ mutex_init(&target->target_mutex); > spin_lock_init(&target->session_list_lock); > > INIT_LIST_HEAD(&target->session_list); >@@ -195,7 +197,7 @@ > u32 tid = info->tid; > int err; > >- err = down_interruptible(&target_list_sem); >+ err = mutex_lock_interruptible(&target_list_mutex); > if (err < 0) > return err; > >@@ -204,7 +206,7 @@ > goto out; > } > >- if (__target_lookup_by_name(info->name) || >+ if (__target_lookup_by_name(info->name) || > (tid && __target_lookup_by_id(tid))) { > err = -EEXIST; > goto out; >@@ -223,7 +225,7 @@ > if (!err) > nr_targets++; > out: >- up(&target_list_sem); >+ mutex_unlock(&target_list_mutex); > > return err; > } >@@ -248,7 +250,7 @@ > module_put(THIS_MODULE); > } > >-/* @locking: target_list_sem must be locked */ >+/* @locking: target_list_mutex must be locked */ > static int __target_del(struct iscsi_target *target) > { > int err; >@@ -283,7 +285,7 @@ > struct iscsi_target *target; > int err; > >- err = down_interruptible(&target_list_sem); >+ err = mutex_lock_interruptible(&target_list_mutex); > if (err < 0) > return err; > >@@ -295,7 +297,7 @@ > > err = __target_del(target); > out: >- up(&target_list_sem); >+ mutex_unlock(&target_list_mutex); > > return err; > } >@@ -305,7 +307,7 @@ > struct iscsi_target *target, *tmp; > int err; > >- down(&target_list_sem); >+ mutex_lock(&target_list_mutex); > > if (!list_empty(&target_list)) > iprintk("Removing all connections, sessions and targets\n"); >@@ -319,7 +321,7 @@ > > next_target_id = 0; > >- up(&target_list_sem); >+ mutex_unlock(&target_list_mutex); > } > > static void *iet_seq_start(struct seq_file *m, loff_t *pos) >@@ -327,7 +329,7 @@ > int err; > > /* are you sure this is to be interruptible? */ >- err = down_interruptible(&target_list_sem); >+ err = mutex_lock_interruptible(&target_list_mutex); > if (err < 0) > return ERR_PTR(err); > >@@ -341,7 +343,7 @@ > > static void iet_seq_stop(struct seq_file *m, void *v) > { >- up(&target_list_sem); >+ mutex_unlock(&target_list_mutex); > } > > static int iet_seq_show(struct seq_file *m, void *p) >--- kernel/wthread.c 2011-06-29 01:52:07.000000000 +0200 >+++ kernel/wthread.c 2011-06-29 02:07:46.000000000 +0200 >@@ -71,9 +71,12 @@ > > if (!current->io_context) > eprintk("%s\n", "Failed to get IO context"); >- else if (info->wthread_ioc) >- copy_io_context(¤t->io_context, &info->wthread_ioc); >- else >+ else if (info->wthread_ioc && >+ atomic_long_read(&info->wthread_ioc->refcount)) { >+ atomic_long_inc(&info->wthread_ioc->refcount); >+ put_io_context(current->io_context); >+ current->io_context = info->wthread_ioc; >+ } else > info->wthread_ioc = current->io_context; > > add_wait_queue(&info->wthread_sleep, &wait);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 365735
:
272011
|
272021
|
272023
|
278615
|
278785
|
307421
|
314239