LinearTapeFileSystem / ltfs

Reference implementation of the LTFS format Spec for stand alone tape drive
BSD 3-Clause "New" or "Revised" License
256 stars 77 forks source link

Format time enhancement on the LTO9 drive #335

Closed piste-jp closed 2 years ago

piste-jp commented 2 years ago

Summary of changes

Improve the format/unformat time of mkltfs on the LTO9 (or later) drive

Description

Currently, mkltfs uses FORMAT_MEDIUM command with format_type = 2h (format as default and then format to specified partition setting). But this setting triggers the media optimization procedure on the LTO9 (or later) drives.

Basically the media optimization procedure is done at the first mount of a tape. So the media optimization procedure would trigger twice if user tries to format a brand new medium.

In this PR, the code is changed to use format_type = 1h for format/unformat.

In addition to this, I introduce a new option --destructive. This option enforce to use format_type = 2h in format and format_type = 0h for unformat, origibal behavior.

Type of change

Checklist:

piste-jp commented 2 years ago

Merged to the master by cherry-pick