diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-01-02 23:46:10 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-01-02 23:46:10 +0000 |
commit | 627b186ed08690f692611596557574e51e383e4d (patch) | |
tree | f5d89cdeab04e01a6df5731daa07aa919d0cefa9 /sys-block | |
parent | Removed old revision. (diff) | |
download | historical-627b186ed08690f692611596557574e51e383e4d.tar.gz historical-627b186ed08690f692611596557574e51e383e4d.tar.bz2 historical-627b186ed08690f692611596557574e51e383e4d.zip |
Remove old versions and patches.
Package-Manager: portage-2.2_rc20/cvs/Linux 2.6.28-gentoo x86_64
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/iscsitarget/ChangeLog | 10 | ||||
-rw-r--r-- | sys-block/iscsitarget/Manifest | 17 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/ietd-init.d | 102 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-0.4.15-build.patch | 22 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-0.4.15-kmem.patch | 44 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-0.4.15-scatter.patch | 160 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch | 432 | ||||
-rw-r--r-- | sys-block/iscsitarget/iscsitarget-0.4.15-r1.ebuild | 59 | ||||
-rw-r--r-- | sys-block/iscsitarget/iscsitarget-0.4.16.ebuild | 61 |
9 files changed, 13 insertions, 894 deletions
diff --git a/sys-block/iscsitarget/ChangeLog b/sys-block/iscsitarget/ChangeLog index 98f81a1d7b26..163b874b8d2d 100644 --- a/sys-block/iscsitarget/ChangeLog +++ b/sys-block/iscsitarget/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-block/iscsitarget # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.19 2009/01/02 23:21:17 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.20 2009/01/02 23:46:09 flameeyes Exp $ + + 02 Jan 2009; Diego E. Pettenò <flameeyes@gentoo.org> + -files/iscsitarget-0.4.15-build.patch, + -files/iscsitarget-0.4.15-kmem.patch, + -files/iscsitarget-0.4.15-scatter.patch, + -files/iscsitarget-0.4.16+glibc-2.8-lists.patch, -files/ietd-init.d, + -iscsitarget-0.4.15-r1.ebuild, -iscsitarget-0.4.16.ebuild: + Remove old versions and patches. 02 Jan 2009; Diego E. Pettenò <flameeyes@gentoo.org> +files/iscsitarget-0.4.17+linux-2.6.28.patch, iscsitarget-0.4.17.ebuild: diff --git a/sys-block/iscsitarget/Manifest b/sys-block/iscsitarget/Manifest index 4903b6533f95..d90fd9cfef1f 100644 --- a/sys-block/iscsitarget/Manifest +++ b/sys-block/iscsitarget/Manifest @@ -2,29 +2,20 @@ Hash: SHA1 AUX ietd-conf.d 1073 RMD160 ade5301c8e2eb8cbc16dfae4bfa80e22393e2953 SHA1 1bb990e26b847169d4937e5d2fc28a5f86d55003 SHA256 28c4a6ddfe555d9f400513de04e2e44473263c4505434fc6e926d2b2fe89c414 -AUX ietd-init.d 2490 RMD160 f8236e27db076f93308a627d20f6bf11eef0cdac SHA1 731b4ba2e0a60cd8ce3892988e6248501ec6c91b SHA256 efe61cefe96571dd5ef3c38d0f692f40f66ad9dc30db436471ef998c0491a9a2 AUX ietd-init.d-2 2492 RMD160 5ab62e5b1f0edd17bb296d4f61c8c7ff562b3d02 SHA1 d91acd801928673e7d03639f8c9e4bf7008ebe43 SHA256 403884a4a90c475689d0fd6deb3bffa402cf4b7a0b215cc0cad219ebf9c00ee2 -AUX iscsitarget-0.4.15-build.patch 527 RMD160 2199754d3e8befbe12fb4e12b25cd9ca0974cb15 SHA1 4bce3d74e723fd4d8ddbf2ca3623651eea684f63 SHA256 508535914bac15c14ce727ddc9f3962478afe38fbb53bfe1392fc031611bfef1 AUX iscsitarget-0.4.15-isns-set-scn-flag.patch 507 RMD160 9a3b091eafb3d213a0c830a691684e0dc1f04b9c SHA1 9d80a8d1b5069e6ec5252ed8b1636023288bada2 SHA256 dc99ad8fa1cc10f6c6af4c99374dd0da14d3a56aebee2c48dd02cd8e156f9996 -AUX iscsitarget-0.4.15-kmem.patch 1459 RMD160 9bff8127a865fe6ca86616966f092344de24c240 SHA1 8af2830595558373c0e9e5be0e673ea840fed0ee SHA256 f65e20f1bf5c7823056d0760b43841c4e2a4b1280c923bc91fbda951cf72dd91 -AUX iscsitarget-0.4.15-scatter.patch 4388 RMD160 f41ad197a2b27e34595a4bf1be743eaed2e7cd12 SHA1 b0bbfb2b088d8f18792c4ce44b65557dccabaa0a SHA256 277607b25d32e73846e2dde0bfdd0393b5c804e93c3a1eb93d9daae0e4101b20 -AUX iscsitarget-0.4.16+glibc-2.8-lists.patch 12736 RMD160 e6b4d39d4e2ae88db8f9fd8661759181200de219 SHA1 921d48ce83031610223b88ed3f0aa944bd1499a3 SHA256 8476001e2ea14e92f3c46467dc17284b38b9a73d4cd54400c6a92869793e0175 AUX iscsitarget-0.4.17+linux-2.6.28.patch 2286 RMD160 f8fabf25a73a838d709bdf1ae836680a7fbb0606 SHA1 8bf1d12312a7fdfef274330a7b1bb5847d94795b SHA256 8080c3a5c5892d640ad1caa0a6cefe6e5b755ed291050a0b8dc604188cf53910 AUX iscsitarget-0.4.17-build.patch 580 RMD160 a770b10dfc4f7c16daefa3e5e0827d1a2164e470 SHA1 81d46f22fd9ff73dbe7baa1792706c79c5ed7a2a SHA256 f1a29431674e4e185d3565df045ad575800c48f49de3a2a53d5723c7b2b7383d -DIST iscsitarget-0.4.15.tar.gz 102922 RMD160 d7d787f1fcbdb124d17eaaa62eaa47c21b6e5dd2 SHA1 c4802e208077bc0249518555c7eace6808de1878 SHA256 da8eb570f9abb6e50c515321747407e9945f5a83bab774c42ed41809234505cb -DIST iscsitarget-0.4.16.tar.gz 103196 RMD160 e0a68f04523191d6116646566fa9132e5aebdb58 SHA1 a7ddbd15767764bad221f59cff4b5e9f0bf57d7b SHA256 e6605ae5f9ed2e2fdbe84df967236678579a4fbe536b75a93277cbb607bead7d DIST iscsitarget-0.4.16_p162.tar.bz2 84559 RMD160 df48d9f8b0416cd47f926257801c8357ea1ea7b6 SHA1 163d3272f859b7f04900d5a56856140c083b90c1 SHA256 306f98bd2d1847f97cd079f31239cfb72640606e560b8e1d6e01b263fda501b7 DIST iscsitarget-0.4.17.tar.gz 107884 RMD160 2f0413d8bb242d09593f07eb35846c0f9dd2934c SHA1 9c287b76a5bc50995d86d351968368302e70b224 SHA256 bc554508174f2657c93ddb0501adad0256d1c6801a3c1ee54ff721bc92ff8778 -EBUILD iscsitarget-0.4.15-r1.ebuild 1848 RMD160 7294286c00a5f59b13a01fd7da2e8aca3a694585 SHA1 949d43f991de676b676714213dfea02626d31217 SHA256 fcd6fd854e27a10e93442956fab35833ac94b3b831a39b36b2257c3e881bd1f7 -EBUILD iscsitarget-0.4.16.ebuild 1902 RMD160 69b66c9c8fb1a49a4fab49c02630444c64024f56 SHA1 02ec71d4172269e14ea680339f52f6bf43290228 SHA256 f1309cda1d1eedf776032010300142b35bbfbca94c5eedb62ea6cb82fd50d1e0 EBUILD iscsitarget-0.4.16_p162.ebuild 1752 RMD160 a4d2ffbfebb7f63199d845bc0d2ce6147e3b8e7b SHA1 c885ebb14c17e0f9e38aaeb864cbfb1d24cc77eb SHA256 44694ee74025415c16c30f8914e6fe0863dcdcafe2e9932aafbdf12e9212c961 EBUILD iscsitarget-0.4.17.ebuild 1825 RMD160 ec43614157a659422528c2004ff28dc8519d689a SHA1 33a2a50c37b7a451aaecc61cf9489ee79c88c0de SHA256 3ab35eb071f882678b7cdb27c8a86f34eec754866bbc678cebb65ab84f629625 -MISC ChangeLog 3885 RMD160 c91713d446a588e3eadc47b4ef4fa0ca1db5ae6d SHA1 686babac34ca68f69374566372a4a29c403f72b8 SHA256 996112eeef6e3df831b506d1e6dbb36d6049ef3dfe23cb58ddd4025db61c04c5 +MISC ChangeLog 4233 RMD160 4195173cb112e1775f6f2bc26ef282d00b032849 SHA1 1780019fbc0b20f85430420a97c18ff9e315b5de SHA256 f5de8f42edb2b1a072e75bd28ef34e98b4efce41d2789e766d5553b0e860db22 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkleoXkACgkQAiZjviIA2XipKACePW+tZQkbTv134UE5sB7SI5Ps -HPwAoJrsypwssiFzuyV2GU6zihkUAh3Z -=DjUy +iEYEARECAAYFAklep00ACgkQAiZjviIA2XirmwCfSRPvhSIbatx0R+j2PEgNUDJc +KtYAnibRHCsEbObazPvZeNpjuB42g7jN +=TS4G -----END PGP SIGNATURE----- diff --git a/sys-block/iscsitarget/files/ietd-init.d b/sys-block/iscsitarget/files/ietd-init.d deleted file mode 100644 index 27d67bf92485..000000000000 --- a/sys-block/iscsitarget/files/ietd-init.d +++ /dev/null @@ -1,102 +0,0 @@ -#!/sbin/runscript -# 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.2 2008/02/22 03:38:51 vapier Exp $ - -MEM_SIZE=1048576 -DAEMON=/usr/sbin/ietd -CONFIG_FILE=/etc/ietd.conf -PID_FILE=/var/run/iscsi_trgt.pid -NAME="iSCSI Enterprise Target" - -ARGS="" -[ -n "$USER" ] && ARGS="${ARGS} --uid=${USER}" -[ -n "$GROUP" ] && ARGS="${ARGS} --gid=${GROUP}" -[ -n "$ISNS" ] && ARGS="${ARGS} --isns=${ISNS}" -[ -n "$PORT" ] && ARGS="${ARGS} --port=${PORT}" -[ -n "$ADDRESS" ] && ARGS="${ARGS} --address=${ADDRESS}" -[ -n "$DEBUGLEVEL" ] && ARGS="${ARGS} --debug=${DEBUGLEVEL}" - -depend() { - use net - after modules -} -checkconfig() { - if [ ! -f $CONFIG_FILE ]; then - eerror "Config file $CONFIG_FILE does not exist!" - return 1 - fi - if [ -z "$DISABLE_MEMORY_WARNINGS" ]; then - check_memsize - fi -} - -check_memsize() { - for sysctl_key in net.core.{w,r}mem_{max,default}; do - v="$(sysctl -n ${sysctl_key})" - if [ "${v}" -lt "${MEM_SIZE}" ]; then - ewarn "$sysctl_key is lower than recommended ${MEM_SIZE}" - fi - done - for sysctl_key in net.ipv4.tcp_{,r,w}mem ; do - v="$(sysctl -n ${sysctl_key} | xargs)" - v1="${v/ *}" v2="${v#* }" v3="${v2/* }" v2="${v2/ *}" - min="${v1}" default="${v2}" max="${v3}" - for k in min default max ; do - if [ "${!k}" -lt "${MEM_SIZE}" ]; then - ewarn "$sysctl_key:$k is lower than recommended ${MEM_SIZE}" - fi - done - done -} - -do_modules() { - msg="$1" - shift - modules="$1" - shift - opts="$@" - for m in ${modules}; do - ebegin "${msg} - ${m}" - modprobe ${opts} $m - ret=$? - eend $ret - [ $ret -ne 0 ] && return $ret - done - return 0 -} - -start() { - checkconfig || return 1 - do_modules 'Loading iSCSI-Target modules' 'iscsi_trgt' - ebegin "Starting ${NAME}" - start-stop-daemon --start --exec $DAEMON --quiet -- ${ARGS} - eend $? -} - -stop() { - ebegin "Removing ${NAME} devices" - # ugly, but ietadm does not allways provides correct exit values - RETURN="$(ietadm --op delete 2>&1)" - RETVAL=$? - if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] ; then - eend 0 - else - eend 1 - eerror "ietadm failed - $RETURN" - return 1 - fi - - ebegin "Stopping ${NAME}" - start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE - ret=$? - eend $ret - [ $ret -ne 0 ] && return 1 - - # ugly, but pid file is not removed by ietd - rm -f $PID_FILE - do_modules 'Removing iSCSI-Target modules' 'iscsi_trgt' '-r' - return $? -} - -# vim: tw=72: diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.15-build.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.15-build.patch deleted file mode 100644 index 44f830d18e88..000000000000 --- a/sys-block/iscsitarget/files/iscsitarget-0.4.15-build.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- 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) diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.15-kmem.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.15-kmem.patch deleted file mode 100644 index 55e96f3f72a2..000000000000 --- a/sys-block/iscsitarget/files/iscsitarget-0.4.15-kmem.patch +++ /dev/null @@ -1,44 +0,0 @@ ------------------------------------------------------------------------- -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; - } - diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.15-scatter.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.15-scatter.patch deleted file mode 100644 index 0d41d1538097..000000000000 --- a/sys-block/iscsitarget/files/iscsitarget-0.4.15-scatter.patch +++ /dev/null @@ -1,160 +0,0 @@ ------------------------------------------------------------------------- -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 diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch deleted file mode 100644 index e02ce18c0f4f..000000000000 --- a/sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch +++ /dev/null @@ -1,432 +0,0 @@ -From: Arne Redlich <agr@powerkom-dd.de> -Subject: [PATCH 1/6] Replace qelem based lists with list_head based ones -Newsgroups: gmane.linux.iscsi.iscsi-target.devel -To: fujita.tomonori@lab.ntt.co.jp -Cc: iscsitarget-devel@lists.sourceforge.net, - Vladislav Bolkhovitin <vst@vlnb.net> -Date: Sat, 31 May 2008 16:09:08 +0200 - -When building against glibc >= 2.8, __USE_GNU has to be #define'd, which -in turn leads to our struct qelem conflicting with the version provided by -glibc (also enabled by this #define). So let's get rid of struct qelem and -use the familiar list_head-based lists. - -This patch also fixes a few issues: -- list_length_is_one(list) also returned true if list is actually empty -- plain_account_add(): if the outgoing account is to be overwritten, the - retrieval of the old account presently only works due to "black magic" - (i.e., because the struct qelem is the first member of struct user). - -Merely compile tested! ---- - usr/iscsid.h | 11 +++---- - usr/isns.c | 22 +++++++------- - usr/misc.h | 92 ++++++++++++++++++++++++++++++++++++++++++-------------- - usr/plain.c | 24 +++++++------- - usr/session.c | 4 +- - usr/target.c | 6 ++-- - 6 files changed, 102 insertions(+), 57 deletions(-) - -diff --git a/usr/iscsid.h b/usr/iscsid.h -index ba13ecf..a664b0d 100644 ---- a/usr/iscsid.h -+++ b/usr/iscsid.h -@@ -7,7 +7,6 @@ - #ifndef ISCSID_H - #define ISCSID_H - --#include <search.h> - #include <sys/types.h> - - #include "types.h" -@@ -32,7 +31,7 @@ struct PDU { - #define KEY_STATE_DONE 2 - - struct session { -- struct qelem slist; -+ struct list_head slist; - - char *initiator; - struct target *target; -@@ -122,9 +121,9 @@ struct connection { - #define INCOMING_BUFSIZE 8192 - - struct target { -- struct qelem tlist; -+ struct list_head tlist; - -- struct qelem sessions_list; -+ struct list_head sessions_list; - - u32 tid; - char name[ISCSI_NAME_LEN]; -@@ -133,7 +132,7 @@ struct target { - int max_nr_sessions; - int nr_sessions; - -- struct qelem isns_head; -+ struct list_head isns_head; - }; - - /* chap.c */ -@@ -180,7 +179,7 @@ extern void session_create(struct connection *conn); - extern void session_remove(struct session *session); - - /* target.c */ --extern struct qelem targets_list; -+extern struct list_head targets_list; - extern int target_add(u32 *, char *); - extern int target_del(u32); - extern u32 target_find_by_name(const char *name); -diff --git a/usr/isns.c b/usr/isns.c -index 08c72de..30ac8d2 100644 ---- a/usr/isns.c -+++ b/usr/isns.c -@@ -44,12 +44,12 @@ struct isns_io { - struct isns_qry_mgmt { - char name[ISCSI_NAME_LEN]; - uint16_t transaction; -- struct qelem qlist; -+ struct list_head qlist; - }; - - struct isns_initiator { - char name[ISCSI_NAME_LEN]; -- struct qelem ilist; -+ struct list_head ilist; - }; - - static LIST_HEAD(qry_list); -@@ -246,7 +246,7 @@ static int isns_scn_register(void) - memset(buf, 0, sizeof(buf)); - tlv = (struct isns_tlv *) hdr->pdu; - -- target = list_entry(targets_list.q_forw, struct target, tlist); -+ target = list_entry(targets_list.next, struct target, tlist); - - length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_NAME, - strlen(target->name), target->name); -@@ -293,7 +293,7 @@ static int isns_attr_query(char *name) - mgmt = malloc(sizeof(*mgmt)); - if (!mgmt) - return 0; -- insque(&mgmt->qlist, &qry_list); -+ list_add(&mgmt->qlist, &qry_list); - - memset(buf, 0, sizeof(buf)); - tlv = (struct isns_tlv *) hdr->pdu; -@@ -302,7 +302,7 @@ static int isns_attr_query(char *name) - snprintf(mgmt->name, sizeof(mgmt->name), name); - else { - mgmt->name[0] = '\0'; -- target = list_entry(targets_list.q_forw, struct target, tlist); -+ target = list_entry(targets_list.next, struct target, tlist); - name = target->name; - } - -@@ -345,7 +345,7 @@ static int isns_deregister(void) - memset(buf, 0, sizeof(buf)); - tlv = (struct isns_tlv *) hdr->pdu; - -- target = list_entry(targets_list.q_forw, struct target, tlist); -+ target = list_entry(targets_list.next, struct target, tlist); - - length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_NAME, - strlen(target->name), target->name); -@@ -385,7 +385,7 @@ int isns_target_register(char *name) - memset(buf, 0, sizeof(buf)); - tlv = (struct isns_tlv *) hdr->pdu; - -- target = list_entry(targets_list.q_back, struct target, tlist); -+ target = list_entry(targets_list.prev, struct target, tlist); - length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_NAME, - strlen(target->name), target->name); - -@@ -436,8 +436,8 @@ static void free_all_acl(struct target *target) - struct isns_initiator *ini; - - while (!list_empty(&target->isns_head)) { -- ini = list_entry(target->isns_head.q_forw, typeof(*ini), ilist); -- remque(&ini->ilist); -+ ini = list_entry(target->isns_head.next, typeof(*ini), ilist); -+ list_del(&ini->ilist); - } - } - -@@ -636,7 +636,7 @@ static void qry_rsp_handle(struct isns_hdr *hdr) - - list_for_each_entry_safe(mgmt, n, &qry_list, qlist) { - if (mgmt->transaction == transaction) { -- remque(&mgmt->qlist); -+ list_del(&mgmt->qlist); - goto found; - } - } -@@ -688,7 +688,7 @@ found: - if (!ini) - goto free_qry_mgmt; - snprintf(ini->name, sizeof(ini->name), name); -- insque(&ini->ilist, &target->isns_head); -+ list_add(&ini->ilist, &target->isns_head); - } else - name = NULL; - break; -diff --git a/usr/misc.h b/usr/misc.h -index c467aab..71e69d6 100644 ---- a/usr/misc.h -+++ b/usr/misc.h -@@ -5,11 +5,6 @@ - #ifndef MISC_H - #define MISC_H - --struct qelem { -- struct qelem *q_forw; -- struct qelem *q_back; --}; -- - /* stolen list stuff from Linux kernel */ - - #undef offsetof -@@ -19,41 +14,92 @@ struct qelem { - #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - #endif - -+#define container_of(ptr, type, member) ({ \ -+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ -+ (type *)( (char *)__mptr - offsetof(type,member) );}) -+ -+struct list_head { -+ struct list_head *next, *prev; -+}; -+ - #define LIST_HEAD_INIT(name) { &(name), &(name) } --#define LIST_HEAD(name) \ -- struct qelem name = LIST_HEAD_INIT(name) - --#define INIT_LIST_HEAD(ptr) do { \ -- (ptr)->q_forw = (ptr); (ptr)->q_back = (ptr); \ --} while (0) -+#define LIST_HEAD(name) \ -+ struct list_head name = LIST_HEAD_INIT(name) - --static inline int list_empty(const struct qelem *head) -+static inline void INIT_LIST_HEAD(struct list_head *list) - { -- return head->q_forw == head; -+ list->next = list; -+ list->prev = list; - } - --static inline int list_length_is_one(const struct qelem *head) -+#define list_first_entry(ptr, type, member) \ -+ list_entry((ptr)->next, type, member) -+ -+static inline int list_empty(const struct list_head *head) - { -- return head->q_forw == head->q_back; -+ return head->next == head; - } - --#define container_of(ptr, type, member) ({ \ -- const typeof( ((type *)0)->member ) *__mptr = (ptr); \ -- (type *)( (char *)__mptr - offsetof(type,member) );}) -+static inline int list_length_is_one(const struct list_head *head) -+{ -+ return (head->next == head->prev && !list_empty(head)); -+} - - #define list_entry(ptr, type, member) \ - container_of(ptr, type, member) - -+#define list_for_each(pos, head) \ -+ for (pos = (head)->next; pos != (head); pos = pos->next) -+ - #define list_for_each_entry(pos, head, member) \ -- for (pos = list_entry((head)->q_forw, typeof(*pos), member); \ -- &pos->member != (head); \ -- pos = list_entry(pos->member.q_forw, typeof(*pos), member)) -+ for (pos = list_entry((head)->next, typeof(*pos), member); \ -+ &pos->member != (head); \ -+ pos = list_entry(pos->member.next, typeof(*pos), member)) - - #define list_for_each_entry_safe(pos, n, head, member) \ -- for (pos = list_entry((head)->q_forw, typeof(*pos), member), \ -- n = list_entry(pos->member.q_forw, typeof(*pos), member); \ -+ for (pos = list_entry((head)->next, typeof(*pos), member), \ -+ n = list_entry(pos->member.next, typeof(*pos), member); \ - &pos->member != (head); \ -- pos = n, n = list_entry(n->member.q_forw, typeof(*n), member)) -+ pos = n, n = list_entry(n->member.next, typeof(*n), member)) -+ -+static inline void __list_add(struct list_head *new, -+ struct list_head *prev, -+ struct list_head *next) -+{ -+ next->prev = new; -+ new->next = next; -+ new->prev = prev; -+ prev->next = new; -+} -+ -+static inline void list_add(struct list_head *new, struct list_head *head) -+{ -+ __list_add(new, head, head->next); -+} -+ -+static inline void list_add_tail(struct list_head *new, struct list_head *head) -+{ -+ __list_add(new, head->prev, head); -+} -+ -+static inline void __list_del(struct list_head * prev, struct list_head * next) -+{ -+ next->prev = prev; -+ prev->next = next; -+} -+ -+static inline void list_del(struct list_head *entry) -+{ -+ __list_del(entry->prev, entry->next); -+ entry->next = entry->prev = NULL; -+} -+ -+static inline void list_del_init(struct list_head *entry) -+{ -+ __list_del(entry->prev, entry->next); -+ INIT_LIST_HEAD(entry); -+} - - #ifndef IPV6_V6ONLY - #define IPV6_V6ONLY 26 -diff --git a/usr/plain.c b/usr/plain.c -index e653fbf..4210e11 100644 ---- a/usr/plain.c -+++ b/usr/plain.c -@@ -31,7 +31,7 @@ - */ - - struct user { -- struct qelem ulist; -+ struct list_head ulist; - - u32 tid; - char *name; -@@ -62,18 +62,18 @@ static struct iscsi_key user_keys[] = { - {NULL,}, - }; - --static struct qelem discovery_users_in = LIST_HEAD_INIT(discovery_users_in); --static struct qelem discovery_users_out = LIST_HEAD_INIT(discovery_users_out); -+static LIST_HEAD(discovery_users_in); -+static LIST_HEAD(discovery_users_out); - - #define HASH_ORDER 4 - #define acct_hash(x) ((x) & ((1 << HASH_ORDER) - 1)) - --static struct qelem trgt_acct_in[1 << HASH_ORDER]; --static struct qelem trgt_acct_out[1 << HASH_ORDER]; -+static struct list_head trgt_acct_in[1 << HASH_ORDER]; -+static struct list_head trgt_acct_out[1 << HASH_ORDER]; - --static struct qelem *account_list_get(u32 tid, int dir) -+static struct list_head *account_list_get(u32 tid, int dir) - { -- struct qelem *list = NULL; -+ struct list_head *list = NULL; - - if (tid) { - list = (dir == AUTH_DIR_INCOMING) ? -@@ -125,7 +125,7 @@ static int plain_account_init(char *filename) - /* Return the first account if the length of name is zero */ - static struct user *account_lookup_by_name(u32 tid, int dir, char *name) - { -- struct qelem *list = account_list_get(tid, dir); -+ struct list_head *list = account_list_get(tid, dir); - struct user *user = NULL; - - list_for_each_entry(user, list, ulist) { -@@ -160,7 +160,7 @@ static void account_destroy(struct user *user) - { - if (!user) - return; -- remque(&user->ulist); -+ list_del(&user->ulist); - free(user->name); - free(user->password); - free(user); -@@ -196,7 +196,7 @@ static int plain_account_add(u32 tid, int dir, char *name, char *pass) - { - int err = -ENOMEM; - struct user *user; -- struct qelem *list; -+ struct list_head *list; - - if (!name || !pass) - return -EINVAL; -@@ -220,11 +220,11 @@ static int plain_account_add(u32 tid, int dir, char *name, char *pass) - " Replacing the old one.\n", - tid ? "target" : "discovery"); - -- old = (struct user *) list->q_forw; -+ old = list_first_entry(list, struct user, ulist); - account_destroy(old); - } - -- insque(user, list); -+ list_add(&user->ulist, list); - - /* update the file here. */ - return 0; -diff --git a/usr/session.c b/usr/session.c -index cbd681c..0a9714e 100644 ---- a/usr/session.c -+++ b/usr/session.c -@@ -29,7 +29,7 @@ static struct session *session_alloc(u32 tid) - - session->target = target; - INIT_LIST_HEAD(&session->slist); -- insque(&session->slist, &target->sessions_list); -+ list_add(&session->slist, &target->sessions_list); - - return session; - } -@@ -157,7 +157,7 @@ void session_remove(struct session *session) - ki->session_destroy(session->target->tid, session->sid.id64); - - if (session->target) { -- remque(&session->slist); -+ list_del(&session->slist); - /* session->target->nr_sessions--; */ - } - -diff --git a/usr/target.c b/usr/target.c -index 467cbc4..ad94e6d 100644 ---- a/usr/target.c -+++ b/usr/target.c -@@ -14,7 +14,7 @@ - - #include "iscsid.h" - --struct qelem targets_list = LIST_HEAD_INIT(targets_list); -+LIST_HEAD(targets_list); - - void target_list_build(struct connection *conn, char *addr, char *name) - { -@@ -83,7 +83,7 @@ int target_del(u32 tid) - if ((err = ki->target_destroy(tid)) < 0) - return err; - -- remque(&target->tlist); -+ list_del(&target->tlist); - - if (!list_empty(&target->sessions_list)) { - fprintf(stderr, "%s still have sessions %d\n", __FUNCTION__, tid); -@@ -122,7 +122,7 @@ int target_add(u32 *tid, char *name) - INIT_LIST_HEAD(&target->sessions_list); - INIT_LIST_HEAD(&target->isns_head); - target->tid = *tid; -- insque(&target->tlist, &targets_list); -+ list_add(&target->tlist, &targets_list); - - isns_target_register(name); - diff --git a/sys-block/iscsitarget/iscsitarget-0.4.15-r1.ebuild b/sys-block/iscsitarget/iscsitarget-0.4.15-r1.ebuild deleted file mode 100644 index ed76e58c2ca7..000000000000 --- a/sys-block/iscsitarget/iscsitarget-0.4.15-r1.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-0.4.15-r1.ebuild,v 1.6 2008/04/12 14:04:51 nixnut Exp $ - -inherit linux-mod eutils - -DESCRIPTION="Open Source iSCSI target with professional features" -HOMEPAGE="http://iscsitarget.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ppc x86" -IUSE="" - -DEPEND="dev-libs/openssl" - -MODULE_NAMES="iscsi_trgt(kernel/iscsi:${S}/kernel)" -CONFIG_CHECK="CRYPTO_CRC32C" -ERROR_CFG="iscsitarget needs support for CRC32C in your kernel." - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619 - epatch "${FILESDIR}"/${PN}-0.4.15-build.patch - epatch "${FILESDIR}"/${PN}-0.4.15-kmem.patch - epatch "${FILESDIR}"/${PN}-0.4.15-scatter.patch - convert_to_m "${S}"/Makefile -} - -src_compile() { - emake usr || die "failed to build userspace" - - unset ARCH - emake KSRC="${KERNEL_DIR}" kernel || die "failed to build module" -} - -src_install() { - einfo "Installing userspace" - dosbin usr/ietd usr/ietadm || die "dosbin failed" - insinto /etc - doins etc/ietd.conf etc/initiators.{allow,deny} || die "doins failed" - # Upstream's provided Gentoo init script is out of date compared to - # their Debian init script. And isn't that nice. - #newinitd etc/initd/initd.gentoo ietd || die - newinitd "${FILESDIR}"/ietd-init.d ietd || die "newinitd failed" - newconfd "${FILESDIR}"/ietd-conf.d ietd || die "newconfd failed" - - # Lock down perms, per bug 198209 - fperms 0640 /etc/ietd.conf /etc/initiators.{allow,deny} - - doman doc/manpages/*.[1-9] || die "manpages failed" - dodoc ChangeLog README || die "docs failed" - - einfo "Installing kernel module" - unset ARCH - linux-mod_src_install || die "modules failed" -} diff --git a/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild b/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild deleted file mode 100644 index 4e774b99465d..000000000000 --- a/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild,v 1.1 2008/06/14 08:18:53 flameeyes Exp $ - -inherit linux-mod eutils flag-o-matic - -DESCRIPTION="Open Source iSCSI target with professional features" -HOMEPAGE="http://iscsitarget.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="" - -DEPEND="dev-libs/openssl" - -MODULE_NAMES="iscsi_trgt(kernel/iscsi:${S}/kernel)" -CONFIG_CHECK="CRYPTO_CRC32C" -ERROR_CFG="iscsitarget needs support for CRC32C in your kernel." - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619 - epatch "${FILESDIR}"/${PN}-0.4.15-build.patch - epatch "${FILESDIR}"/${P}+glibc-2.8-lists.patch - convert_to_m "${S}"/Makefile -} - -src_compile() { - local save_CFLAGS="${CFLAGS}" - append-flags -D_GNU_SOURCE - emake usr || die "failed to build userspace" - CFLAGS="${save_CFLAGS}" - - unset ARCH - emake KSRC="${KERNEL_DIR}" kernel || die "failed to build module" -} - -src_install() { - einfo "Installing userspace" - dosbin usr/ietd usr/ietadm || die "dosbin failed" - insinto /etc - doins etc/ietd.conf etc/initiators.{allow,deny} || die "doins failed" - # Upstream's provided Gentoo init script is out of date compared to - # their Debian init script. And isn't that nice. - #newinitd etc/initd/initd.gentoo ietd || die - newinitd "${FILESDIR}"/ietd-init.d ietd || die "newinitd failed" - newconfd "${FILESDIR}"/ietd-conf.d ietd || die "newconfd failed" - - # Lock down perms, per bug 198209 - fperms 0640 /etc/ietd.conf /etc/initiators.{allow,deny} - - doman doc/manpages/*.[1-9] || die "manpages failed" - dodoc ChangeLog README || die "docs failed" - - einfo "Installing kernel module" - unset ARCH - linux-mod_src_install || die "modules failed" -} |