Priority:
================
-Tom Ivar Helbekkmo <tih@hamartun.priv.no>
-> There's definitely something fishy in the recording of start and
-> end blocks in the JOBMEDIA table.
-> - If several jobs start spooling at the same time, they will all get the
-> current tape position noted as the StartFile/StartBlock for the job.
-> If they end up despooling to the file that was current when they
-> started spooling, this is what will end up in the JOBMEDIA table. If
-> there is a file change before they despool, the setting of NewFile in
-> the dcr structure will fix this up later, but the "start of session"
-> label is already in the spool file, of course, so it holds the wrong
-> information anyway.
->
-> - If the job is longer than the maximum spool size, it will get its
-> first spool session despooled, and then start spooling again after the
-> first despooling is over. The last blocks despooled to tape from the
-> first session will not have been recorded, but they will be flushed
-> later, when the next session despools. However, if another job has
-> been despooling while this one is spooling its second round, the
-> session label written to the spool file at its close will cause the
-> EndFile/Endblock to be set to wherever the tape is at that time. When
-> the dangling record is flushed to JOBMEDIA, it gets this wrong
-> information. Both session labels in the spool file will be wrong,
-> too, of course, because they reflect the state of the tape during
-> spooling, not during despooling.
->
-> I would have to study the code much more closely to work out what's the
-> proper fix -- but it seems clear that it should involve creating the
-> session labels only when something is actually written to the archive
-> device, not during spooling. I'm tempted to try making do_append_data()
-> not create session labels if we're spooling, and add the making of them
-> to despool_data() in stored/spool.c. Sound reasonable?
-===========
-
-
- Re-check new dcr->reserved_volume
- Softlinks that point to non-existent file are not restored in restore all,
but are restored if the file is individually selected. BUG!
- Implement unmount of USB volumes.
- Use "./config no-idea no-mdc2 no-rc5" on building OpenSSL for
Win32 to avoid patent problems.
+- Implement multiple jobid specification for the cancel command,
+ similar to what is permitted on the update slots command.
- Implement Bacula plugins -- design API
- modify pruning to keep a fixed number of versions of a file,
if requested.
i.e. cd /foo/bar/foo/bar
-> if a customer mails me the path to a certain file,
its faster to enter the specified directory
-- Fix bpipe.c so that it does not modify results pointer.
- ***FIXME*** calling sequence should be changed.
- Make tree walk routines like cd, ls, ... more user friendly
by handling spaces better.
=== rate design
in only one catalog -- currently Pools are "global".
- Add TLS to bat (should be done).
=== Duplicate jobs ===
+- Done, but implemented somewhat differently than described below!!!
+
hese apply only to backup jobs.
1. Allow Duplicate Jobs = Yes | No | Higher (Yes)
}
===
+- Fix bpipe.c so that it does not modify results pointer.
+ ***FIXME*** calling sequence should be changed.
+
static bool unload_other_drive(DCR *dcr, int slot)
{
DEVICE *dev = NULL;
- DEVICE *save_dev;
- JCR *jcr = dcr->jcr;
- int save_slot;
- uint32_t timeout = dcr->device->max_changer_wait;
- bool ok = true;
+ bool found = false;
AUTOCHANGER *changer = dcr->dev->device->changer_res;
DEVRES *device;
- bool found = false;
int retries = 0; /* wait for device retries */
if (!changer) {
}
break;
}
+ return unload_dev(dcr, dev);
+}
+
+bool unload_dev(DCR *dcr, DEVICE *dev)
+{
+ JCR *jcr = dcr->jcr;
+ bool ok = true;
+ uint32_t timeout = dcr->device->max_changer_wait;
+ AUTOCHANGER *changer = dcr->dev->device->changer_res;
+ DEVICE *save_dev;
+ int save_slot;
+
+ if (!changer) {
+ return false;
+ }
dev->dlock();
if (dev->is_busy()) {
Jmsg(jcr, M_WARNING, 0, _("Volume \"%s\" is in use by device %s\n"),
dcr->VolumeName, dev->print_name());
Dmsg4(100, "Vol %s for dev=%s is busy dev=%s slot=%d\n",
- dcr->VolumeName, dcr->dev->print_name(), dev->print_name(), slot);
+ dcr->VolumeName, dcr->dev->print_name(), dev->print_name(), dev->Slot);
Dmsg2(100, "num_writ=%d reserv=%d\n", dev->num_writers, dev->reserved_device);
dev->dunlock();
return false;
lock_changer(dcr);
Jmsg(jcr, M_INFO, 0,
_("3307 Issuing autochanger \"unload slot %d, drive %d\" command.\n"),
- slot, dev->drive_index);
+ dev->Slot, dev->drive_index);
Dmsg2(100, "Issuing autochanger \"unload slot %d, drive %d\" command.\n",
- slot, dev->drive_index);
+ dev->Slot, dev->drive_index);
save_dev = dcr->dev;
dcr->dev = dev;
save_slot = dcr->VolCatInfo.Slot;
- dcr->VolCatInfo.Slot = slot;
+ dcr->VolCatInfo.Slot = dev->Slot;
changer_cmd = edit_device_codes(dcr, changer_cmd,
dcr->device->changer_command, "unload");
dev->close();
berrno be;
be.set_errno(stat);
Jmsg(jcr, M_INFO, 0, _("3995 Bad autochanger \"unload slot %d, drive %d\": ERR=%s.\n"),
- slot, dev->drive_index, be.bstrerror());
+ dev->Slot, dev->drive_index, be.bstrerror());
Dmsg3(100, "Bad autochanger \"unload slot %d, drive %d\": ERR=%s.\n",
- slot, dev->drive_index, be.bstrerror());
+ dev->Slot, dev->drive_index, be.bstrerror());
ok = false;
dev->Slot = -1; /* unknown */
} else {
int autoload_device(DCR *dcr, int writing, BSOCK *dir);
bool autochanger_cmd(DCR *dcr, BSOCK *dir, const char *cmd);
bool unload_autochanger(DCR *dcr, int loaded);
+bool unload_dev(DCR *dcr, DEVICE *dev);
char *edit_device_codes(DCR *dcr, char *omsg, const char *imsg, const char *cmd);
int get_autochanger_loaded_slot(DCR *dcr);
General:
+03Apr08
+kes Separate unload_dev() from unload_other_device() in autochanger.c
02Apr08
kes Apply patch from bug #1069 that corrects spurious error messages
when ACLs enabled on SGI but no ACL exists.
28Mar08
kes Fix handling of JobMedia records during spooling and when a
Volume is changed without actually writing data to the Volume.
+27Mar08
+kes Rework certain SD locking based on gdb tracebacks of deadlocks
+ sent by Eric. This code now uses only the volume_lock() rather
+ than the reservations lock when at EOM and acquiring a new
+ volume.
+kes Ensure only one exit point in several subroutines.
26Mar08
kes Implement bsock code to permit locking. Use the new code in Verify
in the FD to prevent the heartbeat thread from disrupting the Verify