LinearTapeFileSystem / ltfs

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

Have the total file size of a volume into `struct ltfs_index` #416

Open piste-jp opened 1 year ago

piste-jp commented 1 year ago

Is your feature request related to a problem? Please describe. I would like to know how the total file size in a LTFS tape (accumulated logical size without tape drive compression and size of indexes).

Describe the solution you'd like Add a field into struct ltfs_index.

mrichmon commented 11 months ago

How would this be a benefit over using standard filesystem tools such as du or df to calculate the file sizes on the volume?

The concern with having a filesystem-wide value that holds the sum of the file sizes on the volume is that maintaining the accuracy of the total is fairly complex and will likely require both a global lock, and some interpolation of the seek and write operations per open file.