diff options
author | Tim 'timtim' Ellis <tim.ellis@foonas.org> | 2009-02-14 00:29:21 +0000 |
---|---|---|
committer | Tim 'timtim' Ellis <tim.ellis@foonas.org> | 2009-02-14 00:29:21 +0000 |
commit | 09c243f95c891b7f482c9ddb17fe296d944024a0 (patch) | |
tree | 14aa8e945c03f2a4e755fa66e74d539434524f50 | |
parent | 2b62c62028bd80a2261b02e91a8e488a4b5f28bc (diff) |
iscsi-target: Fix for 2.6.29 too
-rw-r--r-- | packages/iscsi-target/files/2.6.29.patch | 72 | ||||
-rw-r--r-- | packages/iscsi-target/iscsi-target_0.4.17.bb | 3 |
2 files changed, 74 insertions, 1 deletions
diff --git a/packages/iscsi-target/files/2.6.29.patch b/packages/iscsi-target/files/2.6.29.patch new file mode 100644 index 0000000000..24c1afbdd1 --- /dev/null +++ b/packages/iscsi-target/files/2.6.29.patch @@ -0,0 +1,72 @@ +Index: iscsitarget-0.4.17/kernel/block-io.c +=================================================================== +--- iscsitarget-0.4.17/kernel/block-io.c (revision 198) ++++ iscsitarget-0.4.17/kernel/block-io.c (working copy) +@@ -13,6 +13,7 @@ + #include <linux/blkdev.h> + #include <linux/parser.h> + #include <linux/buffer_head.h> ++#include <linux/version.h> + + #include "iscsi.h" + #include "iscsi_dbg.h" +@@ -154,14 +155,22 @@ + { + struct blockio_data *bio_data = volume->private; + struct block_device *bdev; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) + int flags = LUReadonly(volume) ? MS_RDONLY : 0; ++#else ++ fmode_t flags = LUReadonly(volume) ? FMODE_READ : (FMODE_READ | FMODE_WRITE); ++#endif + int err = 0; + + bio_data->path = kstrdup(path, GFP_KERNEL); + if (!bio_data->path) + return -ENOMEM; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) + bdev = open_bdev_excl(path, flags, THIS_MODULE); ++#else ++ bdev = open_bdev_exclusive(path, flags, THIS_MODULE); ++#endif + if (IS_ERR(bdev)) { + err = PTR_ERR(bdev); + eprintk("Can't open device %s, error %d\n", path, err); +@@ -324,8 +333,17 @@ + { + struct blockio_data *bio_data = volume->private; + +- if (bio_data->bdev) ++ if (bio_data->bdev) { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) + close_bdev_excl(bio_data->bdev); ++#else ++ if (LUReadonly(volume)) { ++ close_bdev_exclusive(bio_data->bdev, FMODE_READ); ++ } else { ++ close_bdev_exclusive(bio_data->bdev, FMODE_READ|FMODE_WRITE); ++ } ++#endif ++ } + kfree(bio_data->path); + + kfree(volume->private); +Index: iscsitarget-0.4.17/kernel/conn.c +=================================================================== +--- iscsitarget-0.4.17/kernel/conn.c (revision 198) ++++ iscsitarget-0.4.17/kernel/conn.c (working copy) +@@ -46,9 +46,13 @@ + "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr)); + break; + case AF_INET6: ++#ifdef NIP6 + snprintf(buf, sizeof(buf), + "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]", + NIP6(inet6_sk(sk)->daddr)); ++#else ++ snprintf(buf, sizeof(buf), "[%p6]", &inet6_sk(sk)->daddr); ++#endif + break; + default: + break; diff --git a/packages/iscsi-target/iscsi-target_0.4.17.bb b/packages/iscsi-target/iscsi-target_0.4.17.bb index deb09022d4..07cbee90df 100644 --- a/packages/iscsi-target/iscsi-target_0.4.17.bb +++ b/packages/iscsi-target/iscsi-target_0.4.17.bb @@ -1,10 +1,11 @@ DESCRIPTION = "iSCSI Enterprise Target is for building an iSCSI storage system on Linux" HOMEPAGE = "http://iscsitarget.sourceforge.net/" LICENSE = "GPL" -PR = "r1" +PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/iscsitarget/iscsitarget-${PV}.tar.gz \ file://libs.patch;patch=1 \ + file://2.6.29.patch;patch=1 \ file://ietd.conf \ file://init" S = "${WORKDIR}/iscsitarget-${PV}" |