Bug 679565
Summary: | gfs2_edit savemeta doesn't save all leaf blocks for large dirs | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Robert Peterson <rpeterso> | ||||||
Component: | gfs2-utils | Assignee: | Robert Peterson <rpeterso> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 5.7 | CC: | adas, djansa, edamato, fnadge, mjuricek | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | gfs2-utils-0.1.62-30.el5 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause
A user performs the command "gfs2_edit savemeta" to save off the metadata for a target GFS2 file system. However, not all of the directory information is saved for large directories. If the metadata is restored to another device, fsck.gfs2 will find directory corruption due to missing leaf blocks.
Consequence
The bug was caused because gfs2_edit was treating the directory leaf index (known as the directory hash table) like it did a normal data file. In other words, a collection of metadata blocks. For a normal data file gfs2_edit needs to save only the metadata blocks, but not the user's data blocks. For a directory, gfs2_edit needs to save the "data" because the "data" blocks are the actual
directory hash table, and the blocks beneath it are the directory leaf blocks that also need to be saved.
Fix
The fix was to change gfs2_edit's savemeta function to actually read all the data (i.e. the directory hash table) for large directories and traverse the hash table, saving all the leaf blocks.
Result
With the directory hash table processed properly, all leaf blocks are saved properly.
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 679566 (view as bug list) | Environment: | |||||||
Last Closed: | 2011-07-21 11:10:17 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: | 679566 | ||||||||
Attachments: |
|
Description
Robert Peterson
2011-02-22 21:20:43 UTC
Requesting ack flags for 5.7. Created attachment 480259 [details]
Patch to fix the problem
Tested on roth-01
The patch was pushed upstream to the master branch of the gfs2-utils git repo. It was tested on my F14 desktop. Created attachment 485801 [details]
Better version of the patch
The latest patch has been pushed to the RHEL57 branch of the cluster.git repository for inclusion into 5.7. Changing status to POST until this gets built. Verified with package gfs2-utils-0.1.62-30.el5, kernel 2.6.18-261.el5 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: This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the bug doesn’t present anymore. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,13 +1,12 @@ -This field is the basis of the errata or release note for this bug. It can also be used for change logs. - -The Technical Note template, known as CCFR, is as follows: - Cause - What actions or circumstances cause this bug to present. +A user performs the command "gfs2_edit savemeta" to save off the metadata for a target GFS2 file system. However, not all of the directory information is saved for large directories. If the metadata is restored to another device, fsck.gfs2 will find directory corruption due to missing leaf blocks. + Consequence - What happens when the bug presents. +The bug was caused because gfs2_edit was treating the directory leaf index (known as the directory hash table) like it did a normal data file. In other words, a collection of metadata blocks. For a normal data file gfs2_edit needs to save only the metadata blocks, but not the user's data blocks. For a directory, gfs2_edit needs to save the "data" because the "data" blocks are the actual +directory hash table, and the blocks beneath it are the directory leaf blocks that also need to be saved. + Fix - What was done to fix the bug. +The fix was to change gfs2_edit's savemeta function to actually read all the data (i.e. the directory hash table) for large directories and traverse the hash table, saving all the leaf blocks. + Result - What now happens when the actions or circumstances above occur. +With the directory hash table processed properly, all leaf blocks are saved properly.- Note: this is not the same as the bug doesn’t present anymore. 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-2011-1042.html |