2 ===================================================================
3 --- fd_cmds.c (.../tags/Release-2.2.2/bacula/src/stored) (revision 5508)
4 +++ fd_cmds.c (.../branches/Branch-2.2/bacula/src/stored) (revision 5508)
7 - * This file handles commands from the File daemon.
11 - * We get here because the Director has initiated a Job with
12 - * the Storage daemon, then done the same with the File daemon,
13 - * then when the Storage daemon receives a proper connection from
14 - * the File daemon, control is passed here to handle the
15 - * subsequent File daemon commands.
21 Bacula® - The Network Backup Solution
23 Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
25 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26 Switzerland, email:ftf@fsfeurope.org.
29 + * This file handles commands from the File daemon.
33 + * We get here because the Director has initiated a Job with
34 + * the Storage daemon, then done the same with the File daemon,
35 + * then when the Storage daemon receives a proper connection from
36 + * the File daemon, control is passed here to handle the
37 + * subsequent File daemon commands.
46 ===================================================================
47 --- bscan.c (.../tags/Release-2.2.2/bacula/src/stored) (revision 5508)
48 +++ bscan.c (.../branches/Branch-2.2/bacula/src/stored) (revision 5508)
50 mdcr->StartFile = dcr->StartFile;
51 mdcr->EndBlock = dcr->EndBlock;
52 mdcr->EndFile = dcr->EndFile;
53 + mdcr->VolMediaId = dcr->VolMediaId;
54 mjcr->read_dcr->VolLastIndex = dcr->VolLastIndex;
55 if (!create_jobmedia_record(db, mjcr)) {
56 Pmsg2(000, _("Could not create JobMedia record for Volume=%s Job=%s\n"),
58 dcr->VolFirstIndex = dcr->FileIndex = 0;
59 dcr->StartBlock = dcr->EndBlock = 0;
60 dcr->StartFile = dcr->EndFile = 0;
61 + dcr->VolMediaId = 0;
64 Pmsg1(000, _("VOL_LABEL: OK for Volume: %s\n"), mr.VolumeName);
67 dcr->EndBlock = dev->EndBlock;
68 dcr->EndFile = dev->EndFile;
69 + dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
71 memset(&jmr, 0, sizeof(jmr));
72 jmr.JobId = mjcr->JobId;
74 ===================================================================
75 --- askdir.c (.../tags/Release-2.2.2/bacula/src/stored) (revision 5508)
76 +++ askdir.c (.../branches/Branch-2.2/bacula/src/stored) (revision 5508)
78 dcr->StartFile, dcr->EndFile,
79 dcr->StartBlock, dcr->EndBlock,
80 dcr->Copy, dcr->Stripe,
81 - edit_uint64(dcr->dev->VolCatInfo.VolMediaId, ed1));
82 + edit_uint64(dcr->VolMediaId, ed1));
83 Dmsg1(100, ">dird: %s", dir->msg);
84 if (bnet_recv(dir) <= 0) {
85 Dmsg0(190, "create_jobmedia error bnet_recv\n");
87 ===================================================================
88 --- dev.h (.../tags/Release-2.2.2/bacula/src/stored) (revision 5508)
89 +++ dev.h (.../branches/Branch-2.2/bacula/src/stored) (revision 5508)
91 uint32_t StartFile; /* Start write file */
92 uint32_t StartBlock; /* Start write block */
93 uint32_t EndBlock; /* Ending block written */
94 + int64_t VolMediaId; /* MediaId */
95 int64_t job_spool_size; /* Current job spool size */
96 int64_t max_job_spool_size; /* Max job spool size */
97 char VolumeName[MAX_NAME_LENGTH]; /* Volume name */
99 ===================================================================
100 --- block.c (.../tags/Release-2.2.2/bacula/src/stored) (revision 5508)
101 +++ block.c (.../branches/Branch-2.2/bacula/src/stored) (revision 5508)
103 dev->block_num = dcr->EndBlock;
104 dev->file = dcr->EndFile;
106 + dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
107 if (dcr->VolFirstIndex == 0 && block->FirstIndex > 0) {
108 dcr->VolFirstIndex = block->FirstIndex;
110 @@ -1098,6 +1099,7 @@
111 dev->block_num = dcr->EndBlock;
112 dev->file = dcr->EndFile;
114 + dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
115 dev->file_addr += block->read_len;
116 dev->file_size += block->read_len;