This commit is contained in:
parent
d6234f0aab
commit
ddec0c491e
1909
tgt-0.9.0-update
Normal file
1909
tgt-0.9.0-update
Normal file
File diff suppressed because it is too large
Load Diff
204
tgt-fix-build
204
tgt-fix-build
@ -18,7 +18,7 @@ index 1e214ee..2ae9193 100755
|
|||||||
{
|
{
|
||||||
name=$(basename $0)
|
name=$(basename $0)
|
||||||
diff --git a/usr/Makefile b/usr/Makefile
|
diff --git a/usr/Makefile b/usr/Makefile
|
||||||
index 4245709..1720d89 100644
|
index a59364b..bf264f4 100644
|
||||||
--- a/usr/Makefile
|
--- a/usr/Makefile
|
||||||
+++ b/usr/Makefile
|
+++ b/usr/Makefile
|
||||||
@@ -50,7 +50,7 @@ INCLUDES += -I. -I../include -I$(KERNELSRC)/include
|
@@ -50,7 +50,7 @@ INCLUDES += -I. -I../include -I$(KERNELSRC)/include
|
||||||
@ -43,6 +43,208 @@ index febb1e9..59f7573 100644
|
|||||||
#include <scsi/scsi.h>
|
#include <scsi/scsi.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
diff --git a/usr/iscsi/iscsi_rdma.c b/usr/iscsi/iscsi_rdma.c
|
||||||
|
index d3b5147..c155b48 100644
|
||||||
|
--- a/usr/iscsi/iscsi_rdma.c
|
||||||
|
+++ b/usr/iscsi/iscsi_rdma.c
|
||||||
|
@@ -144,7 +144,7 @@ struct conn_info {
|
||||||
|
/* but count so we can drain CQ on close */
|
||||||
|
int recvl_posted;
|
||||||
|
|
||||||
|
- struct tgt_event tx_sched;
|
||||||
|
+ struct tgtd_event tx_sched;
|
||||||
|
|
||||||
|
/* login phase resources, freed at full-feature */
|
||||||
|
void *srbuf_login;
|
||||||
|
@@ -196,7 +196,7 @@ struct iser_device {
|
||||||
|
void *mempool_listbuf;
|
||||||
|
struct ibv_mr *mempool_mr;
|
||||||
|
|
||||||
|
- struct tgt_event poll_sched;
|
||||||
|
+ struct tgtd_event poll_sched;
|
||||||
|
|
||||||
|
/* free and allocated mempool entries */
|
||||||
|
struct list_head mempool_free, mempool_alloc;
|
||||||
|
@@ -281,9 +281,9 @@ static void iscsi_rdma_release(struct iscsi_connection *conn);
|
||||||
|
static int iscsi_rdma_show(struct iscsi_connection *conn, char *buf,
|
||||||
|
int rest);
|
||||||
|
static void iscsi_rdma_event_modify(struct iscsi_connection *conn, int events);
|
||||||
|
-static void iser_sched_poll_cq(struct tgt_event *tev);
|
||||||
|
-static void iser_sched_consume_cq(struct tgt_event *tev);
|
||||||
|
-static void iser_sched_tx(struct tgt_event *evt);
|
||||||
|
+static void iser_sched_poll_cq(struct tgtd_event *tev);
|
||||||
|
+static void iser_sched_consume_cq(struct tgtd_event *tev);
|
||||||
|
+static void iser_sched_tx(struct tgtd_event *evt);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called when ready for full feature, builds resources.
|
||||||
|
@@ -1058,7 +1058,7 @@ static void iser_poll_cq_armable(struct iser_device *dev)
|
||||||
|
/* Scheduled to poll cq after a completion event has been
|
||||||
|
received and acknowledged, if no more completions are found
|
||||||
|
the interrupts are re-armed */
|
||||||
|
-static void iser_sched_poll_cq(struct tgt_event *tev)
|
||||||
|
+static void iser_sched_poll_cq(struct tgtd_event *tev)
|
||||||
|
{
|
||||||
|
struct iser_device *dev = tev->data;
|
||||||
|
iser_poll_cq_armable(dev);
|
||||||
|
@@ -1069,7 +1069,7 @@ static void iser_sched_poll_cq(struct tgt_event *tev)
|
||||||
|
the notification interrupts were re-armed.
|
||||||
|
Intended to consume those remaining completions only,
|
||||||
|
this function does not re-arm interrupts. */
|
||||||
|
-static void iser_sched_consume_cq(struct tgt_event *tev)
|
||||||
|
+static void iser_sched_consume_cq(struct tgtd_event *tev)
|
||||||
|
{
|
||||||
|
struct iser_device *dev = tev->data;
|
||||||
|
int ret;
|
||||||
|
@@ -1112,7 +1112,7 @@ static void iser_cqe_handler(int fd __attribute__((unused)),
|
||||||
|
* tries to push tx on a connection, until nothing
|
||||||
|
* is ready anymore. No progress limit here.
|
||||||
|
*/
|
||||||
|
-static void iser_sched_tx(struct tgt_event *evt)
|
||||||
|
+static void iser_sched_tx(struct tgtd_event *evt)
|
||||||
|
{
|
||||||
|
struct conn_info *ci = evt->data;
|
||||||
|
struct iscsi_connection *conn = &ci->iscsi_conn;
|
||||||
|
diff --git a/usr/tgtd.c b/usr/tgtd.c
|
||||||
|
index 62aaa04..a226906 100644
|
||||||
|
--- a/usr/tgtd.c
|
||||||
|
+++ b/usr/tgtd.c
|
||||||
|
@@ -99,7 +99,7 @@ static int oom_adjust(void)
|
||||||
|
int tgt_event_add(int fd, int events, event_handler_t handler, void *data)
|
||||||
|
{
|
||||||
|
struct epoll_event ev;
|
||||||
|
- struct tgt_event *tev;
|
||||||
|
+ struct tgtd_event *tev;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
tev = zalloc(sizeof(*tev));
|
||||||
|
@@ -123,9 +123,9 @@ int tgt_event_add(int fd, int events, event_handler_t handler, void *data)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static struct tgt_event *tgt_event_lookup(int fd)
|
||||||
|
+static struct tgtd_event *tgt_event_lookup(int fd)
|
||||||
|
{
|
||||||
|
- struct tgt_event *tev;
|
||||||
|
+ struct tgtd_event *tev;
|
||||||
|
|
||||||
|
list_for_each_entry(tev, &tgt_events_list, e_list) {
|
||||||
|
if (tev->fd == fd)
|
||||||
|
@@ -136,7 +136,7 @@ static struct tgt_event *tgt_event_lookup(int fd)
|
||||||
|
|
||||||
|
void tgt_event_del(int fd)
|
||||||
|
{
|
||||||
|
- struct tgt_event *tev;
|
||||||
|
+ struct tgtd_event *tev;
|
||||||
|
|
||||||
|
tev = tgt_event_lookup(fd);
|
||||||
|
if (!tev) {
|
||||||
|
@@ -152,7 +152,7 @@ void tgt_event_del(int fd)
|
||||||
|
int tgt_event_modify(int fd, int events)
|
||||||
|
{
|
||||||
|
struct epoll_event ev;
|
||||||
|
- struct tgt_event *tev;
|
||||||
|
+ struct tgtd_event *tev;
|
||||||
|
|
||||||
|
tev = tgt_event_lookup(fd);
|
||||||
|
if (!tev) {
|
||||||
|
@@ -167,7 +167,7 @@ int tgt_event_modify(int fd, int events)
|
||||||
|
return epoll_ctl(ep_fd, EPOLL_CTL_MOD, fd, &ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void tgt_init_sched_event(struct tgt_event *evt,
|
||||||
|
+void tgt_init_sched_event(struct tgtd_event *evt,
|
||||||
|
sched_event_handler_t sched_handler, void *data)
|
||||||
|
{
|
||||||
|
evt->sched_handler = sched_handler;
|
||||||
|
@@ -176,7 +176,7 @@ void tgt_init_sched_event(struct tgt_event *evt,
|
||||||
|
INIT_LIST_HEAD(&evt->e_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void tgt_add_sched_event(struct tgt_event *evt)
|
||||||
|
+void tgt_add_sched_event(struct tgtd_event *evt)
|
||||||
|
{
|
||||||
|
if (!evt->scheduled) {
|
||||||
|
evt->scheduled = 1;
|
||||||
|
@@ -184,7 +184,7 @@ void tgt_add_sched_event(struct tgt_event *evt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-void tgt_remove_sched_event(struct tgt_event *evt)
|
||||||
|
+void tgt_remove_sched_event(struct tgtd_event *evt)
|
||||||
|
{
|
||||||
|
if (evt->scheduled) {
|
||||||
|
evt->scheduled = 0;
|
||||||
|
@@ -195,7 +195,7 @@ void tgt_remove_sched_event(struct tgt_event *evt)
|
||||||
|
static int tgt_exec_scheduled(void)
|
||||||
|
{
|
||||||
|
struct list_head *last_sched;
|
||||||
|
- struct tgt_event *tev, *tevn;
|
||||||
|
+ struct tgtd_event *tev, *tevn;
|
||||||
|
int work_remains = 0;
|
||||||
|
|
||||||
|
if (!list_empty(&tgt_sched_events_list)) {
|
||||||
|
@@ -218,7 +218,7 @@ static void event_loop(void)
|
||||||
|
{
|
||||||
|
int nevent, i, sched_remains, timeout;
|
||||||
|
struct epoll_event events[1024];
|
||||||
|
- struct tgt_event *tev;
|
||||||
|
+ struct tgtd_event *tev;
|
||||||
|
|
||||||
|
retry:
|
||||||
|
sched_remains = tgt_exec_scheduled();
|
||||||
|
@@ -232,7 +232,7 @@ retry:
|
||||||
|
}
|
||||||
|
} else if (nevent) {
|
||||||
|
for (i = 0; i < nevent; i++) {
|
||||||
|
- tev = (struct tgt_event *) events[i].data.ptr;
|
||||||
|
+ tev = (struct tgtd_event *) events[i].data.ptr;
|
||||||
|
tev->handler(tev->fd, events[i].events, tev->data);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
diff --git a/usr/tgtd.h b/usr/tgtd.h
|
||||||
|
index da751c8..207c167 100644
|
||||||
|
--- a/usr/tgtd.h
|
||||||
|
+++ b/usr/tgtd.h
|
||||||
|
@@ -206,21 +206,21 @@ extern int tgt_bind_host_to_target(int tid, int host_no);
|
||||||
|
extern int tgt_unbind_host_to_target(int tid, int host_no);
|
||||||
|
extern int tgt_bound_target_lookup(int host_no);
|
||||||
|
|
||||||
|
-struct tgt_event;
|
||||||
|
-typedef void (*sched_event_handler_t)(struct tgt_event *tev);
|
||||||
|
+struct tgtd_event;
|
||||||
|
+typedef void (*sched_event_handler_t)(struct tgtd_event *tev);
|
||||||
|
|
||||||
|
-extern void tgt_init_sched_event(struct tgt_event *evt,
|
||||||
|
+extern void tgt_init_sched_event(struct tgtd_event *evt,
|
||||||
|
sched_event_handler_t sched_handler, void *data);
|
||||||
|
|
||||||
|
typedef void (*event_handler_t)(int fd, int events, void *data);
|
||||||
|
|
||||||
|
-extern int tgt_event_add(int fd, int events, event_handler_t handler, void *data);
|
||||||
|
-extern void tgt_event_del(int fd);
|
||||||
|
+extern int tgtd_event_add(int fd, int events, event_handler_t handler, void *data);
|
||||||
|
+extern void tgtd_event_del(int fd);
|
||||||
|
|
||||||
|
-extern void tgt_add_sched_event(struct tgt_event *evt);
|
||||||
|
-extern void tgt_remove_sched_event(struct tgt_event *evt);
|
||||||
|
+extern void tgt_add_sched_event(struct tgtd_event *evt);
|
||||||
|
+extern void tgt_remove_sched_event(struct tgtd_event *evt);
|
||||||
|
|
||||||
|
-extern int tgt_event_modify(int fd, int events);
|
||||||
|
+extern int tgtd_event_modify(int fd, int events);
|
||||||
|
extern int target_cmd_queue(int tid, struct scsi_cmd *cmd);
|
||||||
|
extern void target_cmd_done(struct scsi_cmd *cmd);
|
||||||
|
struct scsi_cmd *target_cmd_lookup(int tid, uint64_t itn_id, uint64_t tag);
|
||||||
|
@@ -269,7 +269,7 @@ extern int dtd_load_unload(int tid, uint64_t lun, int load, char *file);
|
||||||
|
extern int register_backingstore_template(struct backingstore_template *bst);
|
||||||
|
extern struct backingstore_template *get_backingstore_template(const char *name);
|
||||||
|
|
||||||
|
-struct tgt_event {
|
||||||
|
+struct tgtd_event {
|
||||||
|
union {
|
||||||
|
event_handler_t handler;
|
||||||
|
sched_event_handler_t sched_handler;
|
||||||
diff --git a/usr/tgtif.c b/usr/tgtif.c
|
diff --git a/usr/tgtif.c b/usr/tgtif.c
|
||||||
index fd5ad5b..9b87b13 100644
|
index fd5ad5b..9b87b13 100644
|
||||||
--- a/usr/tgtif.c
|
--- a/usr/tgtif.c
|
||||||
|
2339
tgt-git-update
2339
tgt-git-update
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 9 13:53:39 CEST 2008 - hare@suse.de
|
||||||
|
|
||||||
|
- Update to latest upstream release 0.9.0
|
||||||
|
* tgt-admin fixes
|
||||||
|
* add null backing store
|
||||||
|
* Improve iSER scheduling
|
||||||
|
* Various small fixes
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 15 08:20:24 CEST 2008 - hare@suse.de
|
Mon Sep 15 08:20:24 CEST 2008 - hare@suse.de
|
||||||
|
|
||||||
|
20
tgt.spec
20
tgt.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package tgt (Version 20080805)
|
# spec file for package tgt (Version 0.9.0)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -27,14 +27,15 @@ License: GPL v2 or later
|
|||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
PreReq: %fillup_prereq %insserv_prereq
|
PreReq: %fillup_prereq %insserv_prereq
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 20080805
|
Version: 0.9.0
|
||||||
Release: 11
|
Release: 1
|
||||||
Summary: Generic Linux target framework (tgt)
|
Summary: Generic Linux target framework (tgt)
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-20080805.tar.bz2
|
||||||
Source1: %{name}.init
|
Source1: %{name}.init
|
||||||
Source2: scsi_tgt_if.h
|
Source2: scsi_tgt_if.h
|
||||||
Source3: %{name}.services
|
Source3: %{name}.services
|
||||||
Patch1: %{name}-git-update
|
Patch1: %{name}-0.9.0-update
|
||||||
|
Patch2: %{name}-git-update
|
||||||
Patch11: %{name}-fix-build
|
Patch11: %{name}-fix-build
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -54,8 +55,9 @@ Authors:
|
|||||||
Mike Christie <michaelc@cs.wisc.edu>
|
Mike Christie <michaelc@cs.wisc.edu>
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n %{name}-%{version}
|
%setup -n %{name}-20080805
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
cp %{S:2} usr
|
cp %{S:2} usr
|
||||||
|
|
||||||
@ -98,6 +100,12 @@ rm -f filelist
|
|||||||
%doc %{_mandir}/man8/*
|
%doc %{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 09 2008 hare@suse.de
|
||||||
|
- Update to latest upstream release 0.9.0
|
||||||
|
* tgt-admin fixes
|
||||||
|
* add null backing store
|
||||||
|
* Improve iSER scheduling
|
||||||
|
* Various small fixes
|
||||||
* Mon Sep 15 2008 hare@suse.de
|
* Mon Sep 15 2008 hare@suse.de
|
||||||
- Include fixes from upstream:
|
- Include fixes from upstream:
|
||||||
* Add support to update targets
|
* Add support to update targets
|
||||||
|
Loading…
x
Reference in New Issue
Block a user