* [gentoo-commits] gentoo-x86 commit in sys-block/iscsitarget/files: ietd-init.d iscsitarget-0.4.15-isns-set-scn-flag.patch iscsitarget-0.4.15-kmem.patch iscsitarget-0.4.15-scatter.patch iscsitarget-0.4.15-build.patch
@ 2008-02-22 3:38 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2008-02-22 3:38 UTC (permalink / raw
To: gentoo-commits
vapier 08/02/22 03:38:51
Modified: ietd-init.d
Added: iscsitarget-0.4.15-isns-set-scn-flag.patch
iscsitarget-0.4.15-kmem.patch
iscsitarget-0.4.15-scatter.patch
iscsitarget-0.4.15-build.patch
Log:
Respect user LDFLAGS. Fix building with gcc-3.4/-O0 #180619 by Natanael Copa. Add some kernel updates from upstream #191313.
(Portage version: 2.2_pre2)
Revision Changes Path
1.2 sys-block/iscsitarget/files/ietd-init.d
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d?r1=1.1&r2=1.2
Index: ietd-init.d
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ietd-init.d 20 Feb 2006 08:33:40 -0000 1.1
+++ ietd-init.d 22 Feb 2008 03:38:51 -0000 1.2
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Technologies, Inc.
+# Copyright 1999-2008 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d,v 1.1 2006/02/20 08:33:40 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/files/ietd-init.d,v 1.2 2008/02/22 03:38:51 vapier Exp $
MEM_SIZE=1048576
DAEMON=/usr/sbin/ietd
@@ -79,7 +79,7 @@
# ugly, but ietadm does not allways provides correct exit values
RETURN="$(ietadm --op delete 2>&1)"
RETVAL=$?
- if [ $RETVAL == "0" ] && [[ $RETURN != "something wrong" ]]; then
+ if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] ; then
eend 0
else
eend 1
1.1 sys-block/iscsitarget/files/iscsitarget-0.4.15-isns-set-scn-flag.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-isns-set-scn-flag.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-isns-set-scn-flag.patch?rev=1.1&content-type=text/plain
Index: iscsitarget-0.4.15-isns-set-scn-flag.patch
===================================================================
http://bugs.gentoo.org/180619
--- usr/isns.c
+++ usr/isns.c
@@ -215,13 +215,13 @@
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define set_scn_flag(x) \
-{ \
+({ \
x = (x & 0x55555555) << 1 | (x & 0xaaaaaaaa) >> 1; \
x = (x & 0x33333333) << 2 | (x & 0xcccccccc) >> 2; \
x = (x & 0x0f0f0f0f) << 4 | (x & 0xf0f0f0f0) >> 4; \
x = (x & 0x00ff00ff) << 8 | (x & 0xff00ff00) >> 8; \
x = (x & 0x0000ffff) << 16 | (x & 0xffff0000) >> 16; \
-}
+})
#else
#define set_scn_flag(x) (x)
#endif
1.1 sys-block/iscsitarget/files/iscsitarget-0.4.15-kmem.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-kmem.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-kmem.patch?rev=1.1&content-type=text/plain
Index: iscsitarget-0.4.15-kmem.patch
===================================================================
------------------------------------------------------------------------
r138 | tomo | 2007-09-20 19:26:20 -0400 (Thu, 20 Sep 2007) | 12 lines
From: Arne Redlich <agr@powerkom-dd.de>
Subject: 2.6.23 compile fix
Date: Thu, 20 Sep 2007 23:30:19 +0200
kmem_cache_create()'s arguments will change with 2.6.23.
Note that instead of simply modifying the kmem_cache_create() calls to
match the new interface, they're replaced with KMEM_CACHE(), which was
introduced with 2.6.22 to simplify slab cache creation.
Merely compile tested.
------------------------------------------------------------------------
Index: kernel/iscsi.c
===================================================================
--- kernel/iscsi.c (revision 137)
+++ kernel/iscsi.c (revision 138)
@@ -1757,8 +1757,7 @@ static int iscsi_init(void)
if ((err = event_init()) < 0)
goto err;
- iscsi_cmnd_cache = kmem_cache_create("iscsi_cmnd", sizeof(struct iscsi_cmnd),
- 0, 0, NULL, NULL);
+ iscsi_cmnd_cache = KMEM_CACHE(iscsi_cmnd, 0);
if (!iscsi_cmnd_cache)
goto err;
Index: kernel/tio.c
===================================================================
--- kernel/tio.c (revision 137)
+++ kernel/tio.c (revision 138)
@@ -110,8 +110,7 @@ int tio_sync(struct iet_volume *lu, stru
int tio_init(void)
{
- tio_cache = kmem_cache_create("tio", sizeof(struct tio),
- 0, 0, NULL, NULL);
+ tio_cache = KMEM_CACHE(tio, 0);
return tio_cache ? 0 : -ENOMEM;
}
1.1 sys-block/iscsitarget/files/iscsitarget-0.4.15-scatter.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-scatter.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-scatter.patch?rev=1.1&content-type=text/plain
Index: iscsitarget-0.4.15-scatter.patch
===================================================================
------------------------------------------------------------------------
r146 | tomo | 2008-02-11 07:26:38 -0500 (Mon, 11 Feb 2008) | 5 lines
From: Arne Redlich <agr@powerkom-dd.de>
Subject: fix compilation on 2.6.24
Date: Sun, 10 Feb 2008 22:26:28 +0100
------------------------------------------------------------------------
Index: kernel/block-io.c
===================================================================
--- kernel/block-io.c (revision 145)
+++ kernel/block-io.c (revision 146)
@@ -28,15 +28,10 @@ struct tio_work {
struct completion tio_complete;
};
-static int
-blockio_bio_endio(struct bio *bio, unsigned int bytes_done, int error)
+static void blockio_bio_endio(struct bio *bio, int error)
{
struct tio_work *tio_work = bio->bi_private;
- /* Ignore partials */
- if (bio->bi_size)
- return 1;
-
error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? error : -EIO;
if (error)
@@ -47,8 +42,6 @@ blockio_bio_endio(struct bio *bio, unsig
complete(&tio_work->tio_complete);
bio_put(bio);
-
- return 0;
}
/*
Index: kernel/config.c
===================================================================
--- kernel/config.c (revision 145)
+++ kernel/config.c (revision 146)
@@ -40,7 +40,7 @@ int iet_procfs_init(void)
int i;
struct proc_dir_entry *ent;
- if (!(proc_iet_dir = proc_mkdir("net/iet", 0)))
+ if (!(proc_iet_dir = proc_mkdir("iet", init_net.proc_net)))
goto err;
proc_iet_dir->owner = THIS_MODULE;
Index: kernel/digest.c
===================================================================
--- kernel/digest.c (revision 145)
+++ kernel/digest.c (revision 146)
@@ -161,22 +161,17 @@ static inline void __dbg_simulate_data_d
}
}
-/* Copied from linux-iscsi initiator and slightly adjusted */
-#define SETSG(sg, p, l) do { \
- (sg).page = virt_to_page((p)); \
- (sg).offset = ((unsigned long)(p) & ~PAGE_CACHE_MASK); \
- (sg).length = (l); \
-} while (0)
-
static void digest_header(struct hash_desc *hash, struct iscsi_pdu *pdu,
u8 *crc)
{
struct scatterlist sg[2];
unsigned int nbytes = sizeof(struct iscsi_hdr);
- SETSG(sg[0], &pdu->bhs, nbytes);
+ sg_init_table(sg, pdu->ahssize ? 2 : 1);
+
+ sg_set_buf(&sg[0], &pdu->bhs, nbytes);
if (pdu->ahssize) {
- SETSG(sg[1], pdu->ahs, pdu->ahssize);
+ sg_set_buf(&sg[1], pdu->ahs, pdu->ahssize);
nbytes += pdu->ahssize;
}
@@ -220,6 +215,7 @@ static void digest_data(struct hash_desc
assert(count <= ISCSI_CONN_IOV_MAX);
+ sg_init_table(sg, ARRAY_SIZE(cmnd->conn->hash_sg));
crypto_hash_init(hash);
for (i = 0; size; i++) {
@@ -228,13 +224,13 @@ static void digest_data(struct hash_desc
else
length = size;
- sg[i].page = tio->pvec[idx + i];
- sg[i].offset = offset;
- sg[i].length = length;
+ sg_set_page(&sg[i], tio->pvec[idx + i], length, offset);
size -= length;
offset = 0;
}
+ sg_mark_end(&sg[i - 1]);
+
crypto_hash_update(hash, sg, nbytes);
crypto_hash_final(hash, crc);
}
Index: kernel/event.c
===================================================================
--- kernel/event.c (revision 145)
+++ kernel/event.c (revision 146)
@@ -28,7 +28,7 @@ static int event_recv_msg(struct sk_buff
return 0;
}
-static int event_recv_skb(struct sk_buff *skb)
+static void event_recv_skb(struct sk_buff *skb)
{
int err;
struct nlmsghdr *nlh;
@@ -37,7 +37,7 @@ static int event_recv_skb(struct sk_buff
while (skb->len >= NLMSG_SPACE(0)) {
nlh = (struct nlmsghdr *)skb->data;
if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
- return 0;
+ break;
rlen = NLMSG_ALIGN(nlh->nlmsg_len);
if (rlen > skb->len)
rlen = skb->len;
@@ -47,19 +47,6 @@ static int event_recv_skb(struct sk_buff
netlink_ack(skb, nlh, 0);
skb_pull(skb, rlen);
}
- return 0;
-}
-
-static void event_recv(struct sock *sk, int length)
-{
- struct sk_buff *skb;
-
- while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
- if (event_recv_skb(skb) && skb->len)
- skb_queue_head(&sk->sk_receive_queue, skb);
- else
- kfree_skb(skb);
- }
}
static int notify(void *data, int len, int gfp_mask)
@@ -95,7 +82,8 @@ int event_send(u32 tid, u64 sid, u32 cid
int event_init(void)
{
- nl = netlink_kernel_create(NETLINK_IET, 1, event_recv, THIS_MODULE);
+ nl = netlink_kernel_create(&init_net, NETLINK_IET, 1, event_recv_skb,
+ NULL, THIS_MODULE);
if (!nl)
return -ENOMEM;
else
1.1 sys-block/iscsitarget/files/iscsitarget-0.4.15-build.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-build.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/iscsitarget/files/iscsitarget-0.4.15-build.patch?rev=1.1&content-type=text/plain
Index: iscsitarget-0.4.15-build.patch
===================================================================
--- usr/Makefile
+++ usr/Makefile
@@ -1,15 +1,14 @@
-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
+CFLAGS ?= -O2 -fno-inline -g
+WARNFLAGS = -Wall -Wstrict-prototypes
+CFLAGS += $(WARNFLAGS) -I../include
PROGRAMS = ietd ietadm
-LIBS = -lcrypto
+LDLIBS = -lcrypto
all: $(PROGRAMS)
ietd: ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o
- $(CC) $^ -o $@ $(LIBS)
-
ietadm: ietadm.o param.o
- $(CC) $^ -o $@
clean:
rm -f *.o $(PROGRAMS)
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-22 3:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22 3:38 [gentoo-commits] gentoo-x86 commit in sys-block/iscsitarget/files: ietd-init.d iscsitarget-0.4.15-isns-set-scn-flag.patch iscsitarget-0.4.15-kmem.patch iscsitarget-0.4.15-scatter.patch iscsitarget-0.4.15-build.patch Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox