diff --git a/core/src/stored/backends/cephfs_device.h b/core/src/stored/backends/cephfs_device.h deleted file mode 100644 index ff3ff5bc978..00000000000 --- a/core/src/stored/backends/cephfs_device.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - BAREOSĀ® - Backup Archiving REcovery Open Sourced - - Copyright (C) 2014-2014 Planets Communications B.V. - Copyright (C) 2014-2021 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 - License as published by the Free Software Foundation, which is - listed in the file LICENSE. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ -/* - * CEPHFS API device abstraction. - * - * Marco van Wieringen, May 2014 - */ - -#ifndef BAREOS_STORED_BACKENDS_CEPHFS_DEVICE_H_ -#define BAREOS_STORED_BACKENDS_CEPHFS_DEVICE_H_ - -#include - -namespace storagedaemon { - -class cephfs_device : public Device { - private: - char* cephfs_configstring_; - char* cephfs_conffile_; - char* basedir_; - struct ceph_mount_info* cmount_; - POOLMEM* virtual_filename_; - - public: - cephfs_device(); - ~cephfs_device(); - - // Interface from Device - int d_close(int) override; - int d_open(const char* pathname, int flags, int mode) override; - int d_ioctl(int fd, ioctl_req_t request, char* mt = NULL) override; - boffset_t d_lseek(DeviceControlRecord* dcr, - boffset_t offset, - int whence) override; - ssize_t d_read(int fd, void* buffer, size_t count) override; - ssize_t d_write(int fd, const void* buffer, size_t count) override; - bool d_truncate(DeviceControlRecord* dcr) override; -}; - -} /* namespace storagedaemon */ - -#endif // BAREOS_STORED_BACKENDS_CEPHFS_DEVICE_H_ diff --git a/core/src/stored/dev.cc b/core/src/stored/dev.cc index 28b1ee2ef43..705755c17bb 100644 --- a/core/src/stored/dev.cc +++ b/core/src/stored/dev.cc @@ -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; @@ -771,8 +771,6 @@ bool Device::eod(DeviceControlRecord* dcr) return false; } - if (IsVtl()) { return true; } - Dmsg0(100, "Enter eod\n"); if (AtEot()) { return true; } @@ -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; @@ -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); @@ -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]]; diff --git a/core/src/stored/dev.h b/core/src/stored/dev.h index 4aca812ad5a..9be47b5dec0 100644 --- a/core/src/stored/dev.h +++ b/core/src/stored/dev.h @@ -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() @@ -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); } diff --git a/core/src/stored/device_resource.cc b/core/src/stored/device_resource.cc index 35e1e861e25..6cdd29c48b2 100644 --- a/core/src/stored/device_resource.cc +++ b/core/src/stored/device_resource.cc @@ -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 @@ -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; } diff --git a/core/src/stored/mount.cc b/core/src/stored/mount.cc index 73d2de8b414..0091d714b8a 100644 --- a/core/src/stored/mount.cc +++ b/core/src/stored/mount.cc @@ -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( diff --git a/core/src/stored/stored_conf.cc b/core/src/stored/stored_conf.cc index 736cf00f43d..c183a6fd22a 100644 --- a/core/src/stored/stored_conf.cc +++ b/core/src/stored/stored_conf.cc @@ -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},