Skip to content

Add FUSE3 support and TANDBERG LTO-6 HH drive#590

Open
mhorimoto wants to merge 1 commit into
LinearTapeFileSystem:mainfrom
mhorimoto:fuse3-support-and-tandberg-lto6
Open

Add FUSE3 support and TANDBERG LTO-6 HH drive#590
mhorimoto wants to merge 1 commit into
LinearTapeFileSystem:mainfrom
mhorimoto:fuse3-support-and-tandberg-lto6

Conversation

@mhorimoto
Copy link
Copy Markdown

Summary of changes

  • Add FUSE3 support for AlmaLinux9/RHEL9 (FUSE 3.x)
  • Add TANDBERG LTO-6 HH drive support

Description

FUSE3 support (AlmaLinux9 / RHEL9)

The original code was written for FUSE2 and fails to build on systems
with FUSE3 (AlmaLinux 9.7, RHEL 9.x).

  • Update FUSE_USE_VERSION from 26 to 30
  • Fix filler() calls to use 5 arguments (FUSE3 API)
  • Remove deprecated fuse_operations members: fgetattr, ftruncate, flag_nullpath_ok
  • Update fuse_parse_cmdline() to use struct fuse_cmdline_opts (FUSE3 API)
  • Add fuse_lowlevel.h include in main.c
  • Remove deprecated FUSE2 options: hard_remove, sync_read, big_writes, use_ino

TANDBERG LTO-6 HH drive support

TANDBERG LTO-6 HH drives were not in the supported device table,
causing a segfault in _raw_open().

  • Add VENDOR_TANDBERG to vendor enum in tape_drivers.h
  • Add TANDBERG_VENDOR_ID definition in hp_tape.h
  • Add TANDBERG LTO-6 HH drive entry in hp_tape.c
  • Add TANDBERG vendor handling in vendor_compat.c
  • Use LogPage 0x31 for TANDBERG capacity reading in sg_tape.c

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Test environment

  • OS: AlmaLinux 9.7 (kernel 5.14.0-611.54.6.el9_7.x86_64)
  • FUSE: 3.10.2-9.el9
  • Drive: TANDBERG LTO-6 HH (firmware 3319, serial HUJ430176D)
  • Result: Successfully mounted LTFS volume read-only

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have confirmed my fix is effective or that my feature works

FUSE3 support (for AlmaLinux9/RHEL9 with FUSE 3.x):
- Update FUSE_USE_VERSION from 26 to 30
- Fix filler() calls to use 5 arguments (FUSE3 API)
- Remove deprecated fuse_operations members: fgetattr, ftruncate, flag_nullpath_ok
- Update fuse_parse_cmdline() to use struct fuse_cmdline_opts (FUSE3 API)
- Add fuse_lowlevel.h include in main.c
- Remove deprecated FUSE2 options: hard_remove, sync_read, big_writes, use_ino

TANDBERG LTO-6 HH support:
- Add VENDOR_TANDBERG to vendor enum in tape_drivers.h
- Add TANDBERG_VENDOR_ID definition in hp_tape.h
- Add TANDBERG LTO-6 HH drive entry in hp_tape.c
- Add TANDBERG vendor handling in vendor_compat.c
  (get_vendor_id, get_supported_devs, init_error_table, init_timeout)
- Use LogPage 0x31 for TANDBERG capacity reading in sg_tape.c

Tested with:
  TANDBERG LTO-6 HH (firmware 3319, serial HUJ430176D)
  AlmaLinux 9.7 (kernel 5.14.0-611.54.6.el9_7.x86_64)
  FUSE 3.10.2-9.el9
Copy link
Copy Markdown
Member

@Piloalucard Piloalucard May 18, 2026

Choose a reason for hiding this comment

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

Hello @mhorimoto ! Thank you for opening this PR! Seems good so far, I will continue reviewing, but I think we may need to also add from LTO-5 to LTO-9, within the same format you used.
https://ltoworld.com/ I used this page as a source to see which LTO drives exists for Tandberg, renamed to Overland. One constraint is that we do not have Tandberg/Overland hardware to test them.
What do you think?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hello @Piloalucard san.
Thank you for your review!
I will research the Tandberg/Overland LTO-5 to LTO-9 drive entries using ltoworld.com and add them in the same format.
However, I only have a Tandberg LTO-6 drive, so I can only verify the LTO-6 entry with actual hardware. The other entries (LTO-5, LTO-7 to LTO-9) will be based on research only, without real device testing.
I'll update this PR once the investigation is complete.

Comment thread src/main.c
Comment on lines -758 to +759
ret = fuse_opt_add_arg(&args, "-osync_read");
/* FUSE3: removed deprecated option: ret = fuse_opt_add_arg(&args, "-osync_read"); */
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is the sync_read really deprecated? It seems that it was changed for FUSE_CAP_ASYNC_READ but the option is still there.

The async_read field in struct fuse_conn_info has been removed. To determine if the kernel supports asynchronous reads, file systems should check the FUSE_CAP_ASYNC_READ bit of the capable field. To enable/disable asynchronous reads, file systems should set the flag in the wanted field.

FROM: https://github.com/libfuse/libfuse/blob/d999bd63afee30949443dc237e3a1f210d0c43e0/ChangeLog.rst#L706

Also I think the read operations should remain synchronous and not OS defined, because it can cause unnecessary rewinding. I will check if the async read operations are a problem

Comment thread src/main.c
Comment on lines -750 to +751
ret = fuse_opt_add_arg(&args, "-ohard_remove");
/* FUSE3: removed deprecated option: ret = fuse_opt_add_arg(&args, "-ohard_remove"); */
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hard remove also does not seem deprecated but discouraged.
TBD if this is an issue

Comment thread src/main.c
Comment on lines -977 to +978
ret = fuse_opt_add_arg(args, "-ouse_ino");
/* FUSE3: removed deprecated option: ret = fuse_opt_add_arg(args, "-ouse_ino"); */
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

use_ino is also not deprecated, the changelog states that the option should be documented better.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you for your review!

I have restored-ouse_inoand confirmed it compiles without errors.
However, I have not been able to test it with actual hardware yet.
I will push the changes once I have completed testing along with the other fixes.

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.

3 participants