LinearTapeFileSystem / ltfs

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

Changed flags for _ltfs_search_index_wp #480

Open amissael95 opened 3 months ago

amissael95 commented 3 months ago

Summary of changes

This pull request includes following changes or fixes.

Description

When a tape cartridge with a write permanent error is trying to be mounted and the MAM (cartridge memory) attribute of the Index Partion (IP) stores a generation number different than the MAM attribute of the Data Partition (DP), the mount process fails even when ltfs can still search for the index in the other partition.

The code that belongs to the logic that handles WP happens on IP, defined "can_skip_ip" flag as false and it shall be true. On the other hand, the code that handles WP happens on DP, defined the "can_skip_ip" as true and it should be false. The logic is not adjusted accordingly.

Fixes #issue_no

Type of change

Checklist:

piste-jp commented 3 months ago

I would like to ask you the things below.

  1. Please test your code on your bench. File backend might be helpful for this kind of issue
  2. Please clarify this PR shall be merged to v2.4-stable branch or not
  3. Please set reviewer(s) for having review comments
  4. Please set the issue to fix by this PR (I already set this. Please do this on the next PR)
piste-jp commented 3 months ago

@amissael95 ,

Could you take care about my previous comment about PR #480 ?

piste-jp commented 2 months ago

@juliocelon , @perezle ,

Could you handle this?

It looks issue #479 and it's fix (this PR) come from a customer. I don't know I just push this only on master branch.

perezle commented 2 months ago

Nice to hear from you Abe-san.

Thanks!

Leonel Perez

Modern Data Protection, Physical Tapes & Spectrum Archive Manager

e-mail: @.**@.>

México, Guadalajara Campus.


From: Atsushi Abe @.> Sent: Monday, September 9, 2024 8:33 PM To: LinearTapeFileSystem/ltfs @.> Cc: LEONEL PEREZ PELAYO @.>; Mention @.> Subject: [EXTERNAL] Re: [LinearTapeFileSystem/ltfs] Changed flags for _ltfs_search_index_wp (PR #480)

@ juliocelon , @perezle , Could you handle this? It looks issue #479 and it's fix (this PR) come from a customer. I don't know I just push this only on master branch. — Reply to this email directly, view it on GitHub, or unsubscribe. You

@juliocelonhttps://github.com/juliocelon , @perezlehttps://github.com/perezle ,

Could you handle this?

It looks issue #479https://github.com/LinearTapeFileSystem/ltfs/issues/479 and it's fix (this PR) come from a customer. I don't know I just push this only on master branch.

— Reply to this email directly, view it on GitHubhttps://github.com/LinearTapeFileSystem/ltfs/pull/480#issuecomment-2339489902, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABX53RVHQWEH4BZRNTAASTTZVZK65AVCNFSM6AAAAABNFESV7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZZGQ4DSOJQGI. You are receiving this because you were mentioned.Message ID: @.***>

amissael95 commented 2 months ago

Hello @piste-jp,

This PR should be merged to v2.4-stable branch.

You mentioned that the file backend might be helpful to the test this kind of issue. Did you mean to use "ltfs.vendor.IBM.forceErrorWrite" extended attribute ? I was planning to use ITDT to test this change, but could you provide me more details in case I use a file backend?

Sorry for the delay of this answer, I have been working in other tasks.

Regards

piste-jp commented 2 months ago

You mentioned that the file backend might be helpful to the test this kind of issue. Did you mean to use "ltfs.vendor.IBM.forceErrorWrite" extended attribute ? I was planning to use ITDT to test this change, but could you provide me more details in case I use a file backend?

I believe a tape which has following condition is needed for your test.

  1. The tape has a write perm while LTFS was writing an index on IP
    • this write perm handling shall be successfully done and the tape is closed cleanly
  2. VCR value returned from a tape drive is different from which is stored on MAM

I'm not sure how you can create a tape both condition was met. But you can use ITDT if you know how to do it obviously.

My intention is the file backend manages MAM and VCR on its file, so you can create those condition with editing file backend files (while ltfs is not running).

amissael95 commented 2 months ago

@juliocelon , @perezle ,

Both of you MUST NOT merge this PR to the stable branch!!!! This PR ruins the stable branch completely.

@amissael95 ,

Did you merge v2.4-stable branch to your dev branch (and push)?

It is completely wrong operation. Please fix your PR.

@piste-jp,

My branch was created from master branch so all these conflicts are because the differences between master and v2.4-stable branch, I did not merge or push it with v2.4-stable . I will solve this problem by making the fix change based on/from the v2.4-stable branch.

Regards