LinearTapeFileSystem / ltfs

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

ltfs_write_index() does not let the caller know that the volume's tc_coherency structs are stale #66

Closed linnemannr closed 6 years ago

linnemannr commented 6 years ago

After writing the index XML to the tape, failure to read the VCR MAM attribute or write the VCI MAM attribute prevents the ip_coh and dp_coh from being updated, but the errors are not propagated up so the caller has no idea that the these structs are stale and should not be trusted. Inside the LTFS fuse application this isn't a large problem, but for libltfs users it can be. It would be better if the return value for ltfs_write_index() could contain a flag indicating the coherency structs are stale or communicate through the coherency struct or some other channel that the data is stale and should not be used.

piste-jp commented 6 years ago

I need to know what kind of large problem happens in "libltfs" applications.

I believe the "fuse" application in this tree is one of "libltfs" applications. So the "libltfs" application you said have a large problem, the "fuse" application could have a same large problem.

On the other hand, the LTFS format spec 2.4 said the VCI is optional (See section 10.3). It means we need to take care about this field is not updated by other implementations at mount time (and current code does so).

piste-jp commented 6 years ago

Could you explain what kind of large problem happens?

Honestly I can't understand this feature is really needed or not.

piste-jp commented 6 years ago

Close this issue at this time.

Feel free to reopen this with additional explanation.