Skip to content

stored: fix support for non-tape block-addressed devices#1554

Merged
BareosBot merged 9 commits intobareos:masterfrom
sebsura:dev/ssura/master/small-changes
Oct 18, 2023
Merged

stored: fix support for non-tape block-addressed devices#1554
BareosBot merged 9 commits intobareos:masterfrom
sebsura:dev/ssura/master/small-changes

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Sep 14, 2023

Thank you for contributing to the Bareos Project!

Currently bareos does some things differently if the target device is a tape. But in some of those cases it should consider all block based devices instead.

This PR also reverses the changes to ctime on windows, since after the change bareos did not pick up copied files correctly.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@sebsura sebsura changed the title fix support for non-tape blockdevices stored: fix support for non-tape blockdevices Sep 14, 2023
@sebsura sebsura force-pushed the dev/ssura/master/small-changes branch from 8177240 to 07661e2 Compare September 18, 2023 09:08
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed I would love to have the network_order replaced with the super-naive implementation I made up.

@bruno-at-bareos
Copy link
Contributor

I'm proposing to add also the following patch to fix OP#5563

diff --git i/core/src/stored/butil.cc w/core/src/stored/butil.cc
index b71fca85c..ec5488439 100644
--- i/core/src/stored/butil.cc
+++ w/core/src/stored/butil.cc
@@ -145,7 +145,7 @@ static bool setup_to_access_device(DeviceControlRecord* dcr,
   if (!VolumeName.empty()) {
     bstrncpy(VolName, VolumeName.c_str(), sizeof(VolName));
     if (VolumeName.size() >= MAX_NAME_LENGTH) {
-      Jmsg0(jcr, M_ERROR, 0,
+      Jmsg0(jcr, M_FATAL, 0,
             _("Volume name or names is too long. Please use a .bsr file.\n"));
     }
   } else {

Comment is :

  • exit with M_FATAL instead M_ERROR in case volume name(s) are too long

@arogge arogge changed the title stored: fix support for non-tape blockdevices stored: fix support for non-tape block-addressed devices Oct 10, 2023
@sebsura sebsura force-pushed the dev/ssura/master/small-changes branch 3 times, most recently from be8dee2 to d064044 Compare October 17, 2023 11:27
sebsura and others added 9 commits October 18, 2023 09:52
When a file is copied windows will only update the Creation time on
the new file; it leaves the ChangeTime how it was.  As such we need to
take the CreationTime into account; otherwise newly copied files will
not get backed up by incremental backups.
If a device wants to seek with the help of blocks/files, we should
honor that and save the block/file numbers instead of the byte offsets.
network<T> is a wrapper for integral types that stores its contents in
network byte order such that you can use memcpy to write to sockets in
the correct byte order while offering ergonomic access to the actual
number in the code itself.
@BareosBot BareosBot force-pushed the dev/ssura/master/small-changes branch from 9a8c8c8 to e46871d Compare October 18, 2023 09:52
@BareosBot BareosBot merged commit 9c7f9cd into bareos:master Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants