Skip to content

Commit

Permalink
stored: remove vtl, rados and cephfs backends
Browse files Browse the repository at this point in the history
This patch removes the remaining traces of these three removed backends
from the codebase.
  • Loading branch information
arogge committed Nov 7, 2022
1 parent cacce99 commit bab181f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 84 deletions.
61 changes: 0 additions & 61 deletions core/src/stored/backends/cephfs_device.h

This file was deleted.

9 changes: 3 additions & 6 deletions core/src/stored/dev.cc
Expand Up @@ -721,7 +721,7 @@ bool Device::rewind(DeviceControlRecord* dcr)

if (fd < 0) { return false; }

if (IsFifo() || IsVtl()) { return true; }
if (IsFifo()) { return true; }

if (d_lseek(dcr, (boffset_t)0, SEEK_SET) < 0) {
BErrNo be;
Expand Down Expand Up @@ -771,8 +771,6 @@ bool Device::eod(DeviceControlRecord* dcr)
return false;
}

if (IsVtl()) { return true; }

Dmsg0(100, "Enter eod\n");
if (AtEot()) { return true; }

Expand Down Expand Up @@ -818,7 +816,7 @@ bool Device::UpdatePos(DeviceControlRecord* dcr)
return false;
}

if (IsFifo() || IsVtl()) { return true; }
if (IsFifo()) { return true; }

file = 0;
file_addr = 0;
Expand Down Expand Up @@ -909,7 +907,7 @@ bool Device::Reposition(DeviceControlRecord* dcr,
return false;
}

if (IsFifo() || IsVtl()) { return true; }
if (IsFifo()) { return true; }

boffset_t pos = (((boffset_t)rfile) << 32) | rblock;
Dmsg1(100, "===== lseek to %d\n", (int)pos);
Expand Down Expand Up @@ -961,7 +959,6 @@ bool Device::close(DeviceControlRecord* dcr)
if (!norewindonclose) { OfflineOrRewind(); }

switch (dev_type) {
case DeviceType::B_VTL_DEV:
case DeviceType::B_TAPE_DEV:
UnlockDoor();
[[fallthrough]];
Expand Down
20 changes: 9 additions & 11 deletions core/src/stored/dev.h
Expand Up @@ -88,15 +88,15 @@ enum class DeviceMode : int

enum class DeviceType : int
{
B_UNKNOWN_DEV = 0,
B_FILE_DEV = 1,
B_TAPE_DEV,
B_FIFO_DEV,
B_VTL_DEV,
B_GFAPI_DEV,
B_DROPLET_DEV,
B_RADOS_DEV,
B_CEPHFS_DEV
B_TAPE_DEV = 2,
B_FIFO_DEV = 3,
// B_VTL_DEV = 4,
B_GFAPI_DEV = 5,
B_DROPLET_DEV = 6,
// B_RADOS_DEV = 7,
// B_CEPHFS_DEV = 8
B_UNKNOWN_DEV = 0
};

// Generic status bits returned from StatusDev()
Expand Down Expand Up @@ -295,11 +295,9 @@ class Device {
bool IsFile() const
{
return (dev_type == DeviceType::B_FILE_DEV || dev_type == DeviceType::B_GFAPI_DEV ||
dev_type == DeviceType::B_DROPLET_DEV || dev_type == DeviceType::B_RADOS_DEV ||
dev_type == DeviceType::B_CEPHFS_DEV);
dev_type == DeviceType::B_DROPLET_DEV);
}
bool IsFifo() const { return dev_type == DeviceType::B_FIFO_DEV; }
bool IsVtl() const { return dev_type == DeviceType::B_VTL_DEV; }
bool IsOpen() const { return fd >= 0; }
bool IsOffline() const { return BitIsSet(ST_OFFLINE, state); }
bool IsLabeled() const { return BitIsSet(ST_LABEL, state); }
Expand Down
5 changes: 1 addition & 4 deletions core/src/stored/device_resource.cc
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2000-2011 Free Software Foundation Europe e.V.
Copyright (C) 2011-2012 Planets Communications B.V.
Copyright (C) 2013-2021 Bareos GmbH & Co. KG
Copyright (C) 2013-2022 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -278,9 +278,6 @@ bool DeviceResource::Validate()
my_config->AddWarning(
"Setting 'Maximum Block Size' on a non-tape device is unsupported");
}
if (dev_type == DeviceType::B_RADOS_DEV) {
my_config->AddWarning("The Rados Storage Backend Device is deprecated");
}
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/stored/mount.cc
Expand Up @@ -721,7 +721,7 @@ bool DeviceControlRecord::is_eod_valid()
MarkVolumeInError();
return false;
}
} else if (dev->IsFifo() || dev->IsVtl()) {
} else if (dev->IsFifo()) {
return true;
} else {
Mmsg1(
Expand Down
1 change: 0 additions & 1 deletion core/src/stored/stored_conf.cc
Expand Up @@ -256,7 +256,6 @@ static s_dvt_kw device_types[]
= {{"file", DeviceType::B_FILE_DEV},
{"tape", DeviceType::B_TAPE_DEV},
{"fifo", DeviceType::B_FIFO_DEV},
{"vtl", DeviceType::B_VTL_DEV},
{"gfapi", DeviceType::B_GFAPI_DEV},
/* compatibility: object have been renamed to droplet */
{"object", DeviceType::B_DROPLET_DEV},
Expand Down

0 comments on commit bab181f

Please sign in to comment.