From: Kern Sibbald Date: Tue, 12 May 2020 19:23:24 +0000 (+0200) Subject: BEE Backport bacula/src/stored/tape_dev.c X-Git-Tag: Release-11.3.2~1614 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24f71da9238584ffd17ff5a72dfdf9f4965da25b;p=thirdparty%2Fbacula.git BEE Backport bacula/src/stored/tape_dev.c This commit is the result of the squash of the following main commits: --- diff --git a/bacula/src/stored/tape_dev.c b/bacula/src/stored/tape_dev.c index 58e728db5d..7b323cc1a7 100644 --- a/bacula/src/stored/tape_dev.c +++ b/bacula/src/stored/tape_dev.c @@ -838,6 +838,10 @@ bool DEVICE::bsr(int num) void tape_dev::lock_door() { #ifdef MTLOCK + /* ***BEEF ***/ + if (device->lock_command && device->control_name) { + return; /* Locked using SCSI persistent locks */ + } struct mtop mt_com; if (!is_tape()) return; mt_com.mt_op = MTLOCK; @@ -849,6 +853,10 @@ void tape_dev::lock_door() void tape_dev::unlock_door() { #ifdef MTUNLOCK + /* ***BEEF ***/ + if (device->lock_command && device->control_name) { + return; /* Locked using SCSI persistent locks */ + } struct mtop mt_com; if (!is_tape()) return; mt_com.mt_op = MTUNLOCK;