Bug 545602
| Summary: | gfs2_convert doesn't convert jdata files correctly | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Abhijith Das <adas> | ||||||
| Component: | gfs2-utils | Assignee: | Abhijith Das <adas> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 5.6 | CC: | bmarzins, edamato, jkortus, rlerch, rpeterso, rwheeler, swhiteho, syeghiay | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | gfs2-utils-0.1.62-18.el5 | Doc Type: | Bug Fix | ||||||
| Doc Text: |
The jdata file conversion is not as efficient as it could be. If the gfs1 fs you're trying to convert has large (or a large number of) jdata files or the machine running gfs2_convert doesn't have enough memory, gfs2_convert will fail with a memory allocation error.
|
Story Points: | --- | ||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2010-03-30 08:53:35 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 541103 | ||||||||
| Attachments: |
|
||||||||
|
Description
Abhijith Das
2009-12-08 22:23:34 UTC
Created attachment 377031 [details]
First attempt at a patch
This patch duplicates a fair bit of code from the code-path that adjust indirect blocks of inodes. The difference being that it operates at the highest (data block) level and the metaheaders and data sizes per block are different at different heights.
This is not the most efficient way of doing this, but it works. It reads all the blocks of a file in memory while it operates and speed of execution depends on block size of the original fs, how much RAM is on the machine running gfs2_convert and the number of files and their sizes.
Abhi, are you happy with this patch? If so then we should get this in sooner rather than later I think. Created attachment 390590 [details]
Fixes an error I spotted in the previous version of this patch
The earlier patch was attempting to convert the indirect blocks of exhash directories as well as regular jdata files. ExHash directories are of a different format than regular jdata files. This false conversion was causing gfs2_convert to fail later on with a "Error reading leaf 0" when it was trying to fix file and directory information. Although gfs2_convert reports a successful conversion, the resulting gfs2 fs is corrupt and will throw I/O errors and withdraw.
This updated patch leaves directories alone when trying to fix jdata indirect blocks.
verified with ~18k files from kernel tarball + md5sum, 4k BS. None of the tested files was damaged. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The jdata file conversion is not as efficient as it could be. If the gfs1 fs you're trying to convert has large (or a large number of) jdata files or the machine running gfs2_convert doesn't have enough memory, gfs2_convert will fail with a memory allocation error. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0287.html |