Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed flags for _ltfs_search_index_wp #480

Open
wants to merge 123 commits into
base: v2.4-stable
Choose a base branch
from

Conversation

amissael95
Copy link
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)

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

Atsushi Abe and others added 30 commits November 6, 2020 17:43
This work will be moved forward on `bringup-25` branch for a while. And
teh branch will be merged to master in the future.
- Use Debian10 on check build correctly (LinearTapeFileSystem#235)
- Fix build checker break on macOS
- Remove Ubuntu19(Eoan) because it is no more supported
- Add a description to refresh shared library cache by ldconfig -v
Treat errno 95 on ltfs_ordered_copy to support destination file system which doesn't support xattr.

Fix LinearTapeFileSystem#236, LinearTapeFileSystem#243
This change also includes following changes.
  - Remove warning on RHEL8
  - Enhance message checker to support RHEL8
  - Improve auto build checker in macOS and RHEL8 (use message checker)
  - Fix unknown messages
- Introduce generic logselect issue I/F via EA by ltfs.vendor.IBM.logPage.XX.YY
- XX shall be a hex value like A0 as page code. YY XX shall be a hex value like 60 as subpage code
- Once LTFS receives a correct VEA, XX and YY can be converted by strroul() with base=16, LTFS always issues logsense to the drive and return the specified page by binary
- Introduce generic MAM fields capture I/F via ltfs.vendor.IBM.mediaMAM.XX
- XX shall be one of 00, 01 , IP or DP
- The new introduced VEA returns the MAM value by binary. You need to parse it by yourself
…em#276)

* Handle copy 0-byte file correctly
* Fix the problem when only one file are specified as a source and `--keep-tree` is specified
* Fix the destination path for copying EAs
* Modify .gitignore
@piste-jp
Copy link
Member

piste-jp commented Aug 27, 2024

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
Copy link
Member

@amissael95 ,

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

@piste-jp
Copy link
Member

@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
Copy link

perezle commented Sep 10, 2024 via email

Copy link

@perezle perezle left a comment

Choose a reason for hiding this comment

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

I approve. The skip flag is set to true to try again on the next index search. Thanks for this catch.

@amissael95
Copy link
Contributor Author

amissael95 commented Sep 23, 2024

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

@amissael95 amissael95 changed the base branch from master to v2.4-stable September 23, 2024 17:15
Copy link
Member

@piste-jp piste-jp left a comment

Choose a reason for hiding this comment

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

@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
Copy link
Member

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
Copy link
Contributor Author

amissael95 commented Sep 24, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet