]> git.pld-linux.org Git - packages/bacula.git/blob - bacula-2.4.4-sd-deadlock.patch
- 3.0.0, NFY
[packages/bacula.git] / bacula-2.4.4-sd-deadlock.patch
1
2  This patch is backported from the development SVN and should fix
3  bug #1213, which is a deadlock in the SD when a volume is on the
4  wrong drive.
5
6  Apply it to version 2.4.4 with:
7
8  cd <bacula-source>
9  patch -p0 <2.4.4-sd-deadlock.patch
10  ./configure <your options>
11  make
12  ...
13  make install
14
15
16 Index: src/stored/reserve.c
17 ===================================================================
18 --- src/stored/reserve.c        (revision 8426)
19 +++ src/stored/reserve.c        (working copy)
20 @@ -1,7 +1,7 @@
21  /*
22     Bacula® - The Network Backup Solution
23  
24 -   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
25 +   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
26  
27     The main author of Bacula is Kern Sibbald, with contributions from
28     many others, a complete list can be found in the file AUTHORS.
29 @@ -498,7 +498,6 @@
30  void DCR::unreserve_device()
31  {
32     lock_volumes();
33 -   dev->dlock();
34     if (is_reserved()) {
35        clear_reserved();
36        reserved_volume = false;
37 @@ -514,7 +513,6 @@
38           volume_unused(this);
39        }
40     }
41 -   dev->dunlock();
42     unlock_volumes();
43  }
44  
45 Index: src/stored/acquire.c
46 ===================================================================
47 --- src/stored/acquire.c        (revision 8426)
48 +++ src/stored/acquire.c        (working copy)
49 @@ -1,7 +1,7 @@
50  /*
51     Bacula® - The Network Backup Solution
52  
53 -   Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
54 +   Copyright (C) 2002-2009 Free Software Foundation Europe e.V.
55  
56     The main author of Bacula is Kern Sibbald, with contributions from
57     many others, a complete list can be found in the file AUTHORS.
58 @@ -647,8 +647,8 @@
59  
60     /* Detach this dcr only if attached */
61     if (dcr->attached_to_dev && dev) {
62 +      dev->dlock();
63        dcr->unreserve_device();
64 -      dev->dlock();
65        dcr->dev->attached_dcrs->remove(dcr);  /* detach dcr from device */
66        dcr->attached_to_dev = false;
67  //    remove_dcr_from_dcrs(dcr);      /* remove dcr from jcr list */
This page took 0.085893 seconds and 3 git commands to generate.