Hello community,

here is the log from the commit of package tgt for openSUSE:Factory checked in 
at 2012-10-27 07:56:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tgt (Old)
 and      /work/SRC/openSUSE:Factory/.tgt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tgt", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/tgt/tgt.changes  2012-07-10 13:42:43.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.tgt.new/tgt.changes     2012-10-27 
07:56:50.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Oct 26 01:14:03 UTC 2012 - [email protected]
+
+- Add tgt-mgmt-fixed-m-system-o-delete-handling.patch: Fixes
+  shutdown hang (bnc#767438)
+- Removed PIDFILE completely from init file, as it is not used
+
+-------------------------------------------------------------------

New:
----
  tgt-mgmt-fixed-m-system-o-delete-handling.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tgt.spec ++++++
--- /var/tmp/diff_new_pack.YRajZp/_old  2012-10-27 07:56:52.000000000 +0200
+++ /var/tmp/diff_new_pack.YRajZp/_new  2012-10-27 07:56:52.000000000 +0200
@@ -35,7 +35,9 @@
 Source1:        %{name}.init
 Source3:        %{name}.services
 Patch1:         %{name}-git-update
-Patch11:        %{name}-fix-build
+Patch2:         %{name}-fix-build
+# PATCH-FIX-UPSTREAM tgt-mgmt-fixed-m-system-o-delete-handling.patch 
[bnc#767438] - [email protected]
+Patch3:         %{name}-mgmt-fixed-m-system-o-delete-handling.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -56,7 +58,8 @@
 %prep
 %setup -n %{name}-%{version}
 %patch1 -p1
-%patch11 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %ifarch ppc ppc64

++++++ tgt-mgmt-fixed-m-system-o-delete-handling.patch ++++++
>From 0b88336c4b188f48e6bd2e8c94e0467dc805cc38 Mon Sep 17 00:00:00 2001
From: Roi Dayan <[email protected]>
Date: Thu, 28 Jun 2012 19:56:04 +0300
Subject: mgmt: fixed -m system -o delete handling
Git-commit: 0b88336c4b188f48e6bd2e8c94e0467dc805cc38
Patch-mainline: v1.0.29

system_active was reset only in case when mgmt response was carrying data.
In case of deleting system, response code was returned in err field of the 
header
therefore system was not shut down.

Signed-off-by: Alexander Nezhinsky <[email protected]>
Signed-off-by: Roi Dayan <[email protected]>
Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: Lee Duncan <[email protected]>
---
 usr/mgmt.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/usr/mgmt.c b/usr/mgmt.c
index ef1b265..56f89bb 100644
--- a/usr/mgmt.c
+++ b/usr/mgmt.c
@@ -585,13 +585,8 @@ static void mtask_recv_send_handler(int fd, int events, 
void *data)
                err = concat_write(&mtask->rsp_concat, fd, mtask->done);
                if (err >= 0) {
                        mtask->done += err;
-                       if (mtask->done == (rsp->len - sizeof(*rsp))) {
-                               if (req->mode == MODE_SYSTEM &&
-                                   req->op == OP_DELETE &&
-                                   !rsp->err)
-                                       system_active = 0;
+                       if (mtask->done == (rsp->len - sizeof(*rsp)))
                                goto out;
-                       }
                } else
                        if (errno != EAGAIN)
                                goto out;
@@ -603,6 +598,8 @@ static void mtask_recv_send_handler(int fd, int events, 
void *data)
 
        return;
 out:
+       if (req->mode == MODE_SYSTEM && req->op == OP_DELETE && !rsp->err)
+               system_active = 0;
        tgt_event_del(fd);
        close(fd);
        mtask_free(mtask);

++++++ tgt.init ++++++
--- /var/tmp/diff_new_pack.YRajZp/_old  2012-10-27 07:56:52.000000000 +0200
+++ /var/tmp/diff_new_pack.YRajZp/_new  2012-10-27 07:56:52.000000000 +0200
@@ -18,7 +18,6 @@
 #
 
 DAEMON=/usr/sbin/tgtd
-PIDFILE=/var/run/tgtd.pid
 TGTD_CONFIG=/etc/tgt/targets.conf
 
 # Source LSB init functions
@@ -158,7 +157,7 @@
         ;;
   status)
        echo -n "Checking for SCSI target service"
-       checkproc -p $PIDFILE $DAEMON
+       checkproc $DAEMON
        rc_status -v
         ;;
   *)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to