From: Bob Peterson rpete...@redhat.com
This is a small performance improvement. Rather than having function
dir_split_leaf read in the leaf to be split, this patch lets the
buffer_head to be passed in from the calling function, which has it
read in anyway.
rhbz#902920
---
gfs2/libgfs2/fs_ops.c
From: Bob Peterson rpete...@redhat.com
This patch extracts a section of code from the lost+found functions
and makes a new make_sure_lf_exists function that can be called
from more places.
---
gfs2/fsck/lost_n_found.c | 130 +++
From: Bob Peterson rpete...@redhat.com
In a future patch to fsck, function find_free_blk will be called in
order to correctly report blocks that will need to be allocated for
things such as leaf splits. This patch moves function find_free_blk
to a more centralized place, util.c, to that end.
Hi,
Here is a set of patches I wrote for fsck.gfs2. These are mostly bug fixes,
but there are some cleanups as well. The two biggest bug fixes are:
(1) Directory hash tables and leaf blocks are now properly checked and fixed,
rather than patched up.
(2) Handling of duplicate block references
From: Bob Peterson rpete...@redhat.com
Now that fsck.gfs2 can validate the hash table is relatively sane
without actually reading the leaf blocks, when it does need to read
in those leaf blocks, we need to check the leaf depth is
appropriate for the (now sane) number of pointers we encountered in
From: Bob Peterson rpete...@redhat.com
This patch adds a check to the code that adds inodes to lost+found
so that dinodes with formal inode mismatches are logged, but not added.
rhbz#902920
---
gfs2/fsck/lost_n_found.c | 44
1 file changed, 28
From: Bob Peterson rpete...@redhat.com
This patch adds a message to the fsck output that indicates which
block reference is acceptable. That helps to determine if fsck made
the right decision when a duplicate is resolved.
rhbz#902920
---
gfs2/fsck/pass1b.c | 9 +
1 file changed, 9
From: Bob Peterson rpete...@redhat.com
This patch contains some trivial cleanups.
---
gfs2/fsck/metawalk.c | 6 ++
gfs2/fsck/pass1.c| 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index 5a13c6f..ce6bdbe 100644
---
From: Bob Peterson rpete...@redhat.com
This patch moves function get_dir_hash from metawalk.c to util.c.
This was done because a future patch will need access to the function.
---
gfs2/fsck/metawalk.c | 18 --
gfs2/fsck/util.c | 19 +++
gfs2/fsck/util.h |
From: Bob Peterson rpete...@redhat.com
This patch checks to make sure all the dirents on a leaf block have
hash values that are actually appropriate to the leaf block.
With extended hashing, the file name is used to generate a hash value.
Today's fsck checks that the hash value is proper to the
From: Bob Peterson rpete...@redhat.com
This patch adds another check for interrupts while resolving duplicate
block references in pass1b.
rhbz#902920
---
gfs2/fsck/pass1b.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c
index 56b77f5..7108bb4
From: Bob Peterson rpete...@redhat.com
This patch just fixes some messages that were wrong, adds comments,
and so forth.
rhbz#902920
---
gfs2/fsck/metawalk.c | 24 +---
gfs2/fsck/pass2.c| 9 +++--
gfs2/fsck/util.h | 2 +-
3 files changed, 17 insertions(+), 18
From: Bob Peterson rpete...@redhat.com
This patch changes the debug output of lost+found such that it
only prints the block number in hexadecimal. This shortens the output
and makes debug output easier to read.
rhbz#902920
---
gfs2/fsck/lost_n_found.c | 12
1 file changed, 4
From: Bob Peterson rpete...@redhat.com
Before this patch, block counts were fixed, but it didn't log what
the new value was changed to. That made it very difficult to track
down block count problems. This patch changes the logging so that
it prints the new block count, and a breakdown of how many
From: Bob Peterson rpete...@redhat.com
The job of pass1b is to resolve duplicate references to the same block.
Eventually it does a fair job of determining the rightful owner of the
block, and then it has to deal with the other dinode(s) that referenced
the block improperly. If another dinode
From: Bob Peterson rpete...@redhat.com
When fsck.gfs2 discovered a duplicate reference to the same block,
it was not properly incrementing the block counters for data and
metadata. Therefore, when the duplicate situation is resolved, the
resulting dinode is likely to have the wrong block count.
From: Bob Peterson rpete...@redhat.com
Before this patch, when we detected a bad leaf block, fsck.gfs2 would
try to patch the hash table. That's very wrong, because the hash table
needs to be on nice power-of-two boundaries. This patch changes the
code so that the hash table is actually repaired.
From: Bob Peterson rpete...@redhat.com
It's very important that fsck.gfs2 checks for a valid directory hash
table before operating further on the directory. Before this patch,
we were doing some incomplete testing, after we had already operated
on the directory, with function check_num_ptrs. This
From: Bob Peterson rpete...@redhat.com
There may be times when fsck.gfs2 wants to move things around. For
example, if it finds dirents entries on the wrong leaf block, it
may want to move them to a different leaf. If it does, it may need
to split the leaf, which means we're adding another block.
From: Bob Peterson rpete...@redhat.com
For ordinary leaf blocks, the hash table must follow the rules,
which means it needs to follow a power-of-two boundary. In other
words, it needs to enforce that: start = (lindex ~(len - 1));
But when doing repairs, fsck will need to detect when hash tables
From: Bob Peterson rpete...@redhat.com
Before this patch, whenever pass1 encountered a duplicated data block
pointer, it would mark the file as invalid. But if reason the block
was duplicated was due to a different bad inode, the inode with the
valid data block reference was still punished and
From: Bob Peterson rpete...@redhat.com
In pass1, it traverses the metadata free, processing each dinode and
marking which blocks are used by that dinode. If a dinode is found
to have unrecoverable errors, it does a bunch of work to undo the
things it did. This is especially important for the
From: Bob Peterson rpete...@redhat.com
This patch adds several calls to reprocess_inode when functions
may have potentially added blocks to a dinode. This happens, for
example, when leaf blocks are split or new leaf blocks are added.
The purpose of reprocessing the inode is to properly mark the
From: Bob Peterson rpete...@redhat.com
A previous patch changed the way we check leaf block depth.
This patch removes the redundant check from pass1.
rhbz#902920
---
gfs2/fsck/pass1.c | 16
1 file changed, 16 deletions(-)
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
From: Bob Peterson rpete...@redhat.com
Before this patch, if an error was encountered while marking the
data blocks, the blocks would be removed from the linked list.
Now that we've got undo functions, we need to be able to undo
the designations of those blocks, which means we need to keep those
From: Bob Peterson rpete...@redhat.com
This patch makes metawalk function check_leaf external so that it
may be called in a future patch for fixing hash tables.
rhbz#902920
---
gfs2/fsck/metawalk.c | 5 ++---
gfs2/fsck/metawalk.h | 3 +++
gfs2/fsck/pass1.c| 6 +++---
gfs2/fsck/pass1b.c |
From: Bob Peterson rpete...@redhat.com
Before this patch, fsck.gfs2 would cite data block errors, but it
wouldn't tell you which metadata block referenced the bad data block.
That's fine, but it makes it very difficult to backtrack problems.
This patch prints out which metadata block referenced
From: Bob Peterson rpete...@redhat.com
Before this patch, fsck.gfs2 could get into situations where it's
in pass1b searching for the first reference to a block that it knows
has been referenced twice. However, for one reason or another, the
first reference has been deleted. It may seem unlikely
From: Bob Peterson rpete...@redhat.com
This patch creates a new function hdr_size that calculates the size
of a GFS2 metadata header depending on the height and type of block.
rhbz#902920
---
gfs2/fsck/metawalk.c | 44 +++-
1 file changed, 23
From: Bob Peterson rpete...@redhat.com
This patch adds a log message whenever unrecoverable data block errors
are found. Otherwise the output doesn't say why it stopped processing
data, and which block had the problem.
rhbz#902920
---
gfs2/fsck/metawalk.c | 9 +++--
1 file changed, 7
From: Bob Peterson rpete...@redhat.com
Before this patch, fsck.gfs2 could get into problems when processing
a GFS1 file system. The issue goes back to the fact that all GFS1
metadata is marked as Meta in the bitmap, whereas that bitmap
designation is reserved for dinodes in GFS2. For example,
From: Bob Peterson rpete...@redhat.com
Before this patch, pass2 would attempt to fix the hash table without
first checking the basic integrity of the leaf blocks it was checking.
A misplaced leaf might have its entries relocated as a matter of course.
But if that leaf block had a problem, it
From: Bob Peterson rpete...@redhat.com
This patch moves a huge chunk of code from bloated function
check_dentry. The moved section of code performs basic directory entry
checks. The code is basically unchanged, but I made clear_eattrs
metawalk functions global.
rhbz#902920
---
gfs2/fsck/pass2.c
From: Bob Peterson rpete...@redhat.com
This patch removes a variable that wasn't being used.
---
gfs2/fsck/pass1b.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c
index b6f03bd..47c4694 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fsck/pass1b.c
@@
From: Bob Peterson rpete...@redhat.com
This patch changes the logging when duplicate block references are
flagged. The idea is to print whether or not the inode with the reference
is valid or invalid, which helps in diagnosing problems when duplicate
block references are resolved.
rhbz#902920
From: Bob Peterson rpete...@redhat.com
This patch aims to not change functionality at all. What it does is
adds a standard set of three return codes with the following meanings:
meta_is_good - all is well, keep processing metadata normally
meta_skip_further - an non-fatal error occurred, so
From: Bob Peterson rpete...@redhat.com
This patch makes libgfs2 externalize function dir_split_leaf so that
fsck.gfs2 can split leafs in a future patch.
rhbz#902920
---
gfs2/libgfs2/fs_ops.c | 3 +--
gfs2/libgfs2/libgfs2.h | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git
From: Bob Peterson rpete...@redhat.com
There were several places in the fsck.gfs2 code that referenced
variables of type struct duptree, but sometimes they were called
dt, d, b or even data. This patch achieves a level of consistency
and calls them all dt. This helps readability: when you see a
From: Bob Peterson rpete...@redhat.com
Before this patch, when fsck.gfs2 encountered a dinode with an invalid
mode, it would take steps to invalidate its metadata. That's wrong
because if the mode is invalid, you don't know how to treat it.
It's especially wrong if its metadata references the
From: Bob Peterson rpete...@redhat.com
Function gfs2_bitfit was checking for state 3, but that's
impossible since it is only called from rgblk_search, which receives
only GFS2_BLKST_ constants.
---
fs/gfs2/rgrp.c |2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git
From: Bob Peterson rpete...@redhat.com
Since function gfs2_glock_schedule_for_reclaim is only two
significant lines, we can eliminate it, simplifying the code
and making it more readable.
---
fs/gfs2/glock.c | 19 +++
1 files changed, 3 insertions(+), 16 deletions(-)
diff
I've taken Steve Whitehouse's advice and broken the previous set of
changes into six individual patches. In some cases, the patches are
not so much for optimization as they are for readability and to make
GFS2 easier to understand. The patches are as follows:
[PATCH 1/6] GFS2: change function
From: Bob Peterson rpete...@redhat.com
Function gfs2_glock_dq_wait called two-line function wait_on_demote,
so they were combined.
---
fs/gfs2/glock.c |9 ++---
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 5c87909..fca6a87 100644
From: Bob Peterson rpete...@redhat.com
Function gfs2_glock_wait only called function wait_on_holder and
returned its return code, so they were combined for readability.
---
fs/gfs2/glock.c | 23 +--
1 files changed, 9 insertions(+), 14 deletions(-)
diff --git
From: Bob Peterson rpete...@redhat.com
This patch changes function gfs2_direct_IO so that it uses a normal
call to gfs2_glock_dq rather than a call to a multiple-dq of one item.
---
fs/gfs2/aops.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/aops.c
This big set of 66 patches are cross-written from upstream to RHEL6.
It allows RHEL6's fsck.gfs2 to operate on GFS1 file systems.
There are many reasons to do that. This is for bugzilla #675723.
Regards,
Bob Peterson
Red Hat File Systems
[PATCH 01/66] fsck.gfs2: Make functions use sdp rather
From: Bob Peterson rpete...@redhat.com
This patch adds allow_gfs1 parameters to the read_sb and check_sb functions.
This will allow gfs2-utils to read and operate on gfs1 file systems in
follow-up patches.
rhbz#675723
---
gfs2/edit/savemeta.c | 38 +---
From: Bob Peterson rpete...@redhat.com
Before this patch, fsck.gfs2 would ask for every unlinked metadata bit
whether you wanted to reclaim it as free space. This patch makes it
ask only once per resource group, and reports which resource group
so that the user doesn't think it's stuck in an
From: Bob Peterson rpete...@redhat.com
This function factors out a section of code from function add_inode_to_lf.
This makes it easier to read and gives it the ability to print better
messages regarding where the block was previously linked.
rhbz#675723
---
gfs2/fsck/lost_n_found.c | 113
From: Bob Peterson rpete...@redhat.com
This patch changes the logic of the code from being triple-negative
to single-negative so it won't twist your brain into knots.
rhbz#675723
---
gfs2/fsck/metawalk.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git
From: Bob Peterson rpete...@redhat.com
This patch adds a call to bmodified to function dirent_repair. Without
setting the modified bit, directory repairs may be forgotten and never
written back to disk, leaving the damage in place.
rhbz#675723
---
gfs2/fsck/metawalk.c |1 +
1 files
From: Bob Peterson rpete...@redhat.com
In pass2, all metadata was deleted for inodes that were marked either
bad or invalid but that is wrong, and here is why:
Blocks marked invalid were invalidated due to duplicate block references.
Pass1b should have already taken care of deleting their
From: Bob Peterson rpete...@redhat.com
This patch changes the debug output of gfs2-utils to use __FUNCTION__
rather than __FILE__. The output file is much smaller. Digging through
a 6.5GB output is better and faster than a 9GB output file.
rhbz#675723
---
gfs2/fsck/metawalk.c | 13
From: Bob Peterson rpete...@redhat.com
This patch changes several fsck output messages so that they make more
sense. Digging through very big and complex fsck.gfs2 output, I found
myself lost in many occasions. This patch makes it a lot easier to see
what decisions are made by fsck.gfs2 and
From: Bob Peterson rpete...@redhat.com
Part of fsck's checks is to verify the count of links for directories,
but the variable names and function names are too confusing to understand
without in-depth analysis of what the code is doing.
This patch renames the structure variable link_count to
From: Bob Peterson rpete...@redhat.com
This patch shortens some of the output of fsck.gfs2, thereby making
the output files smaller and more manageable.
rhbz#675723
---
gfs2/fsck/lost_n_found.c |6 +++---
gfs2/fsck/metawalk.c |7 ---
gfs2/fsck/pass5.c| 13 +++--
From: Bob Peterson rpete...@redhat.com
When pass2 decided to delete a bad/corrupt dinode from disk, it was
not deleting extended attributes associated with that dinode. Oops.
This patch corrects the situation and allows it to delete them.
rhbz#675723
---
gfs2/fsck/pass2.c | 55
From: Bob Peterson rpete...@redhat.com
Duplicate references that were in leaf blocks were never found nor
cleared. This patch adds that capability.
rhbz#675723
---
gfs2/fsck/pass1b.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/gfs2/fsck/pass1b.c
From: Bob Peterson rpete...@redhat.com
This patch refactors function set_dotdot_dir to make it more readable.
rhbz#675723
---
gfs2/fsck/pass2.c | 46 ++
1 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/gfs2/fsck/pass2.c
From: Bob Peterson rpete...@redhat.com
This patch renames function check_leaf_block to check_ealeaf_block to
avoid confusion between directory leaf block handling and extended
attribute leaf block handling.
rhbz#675723
---
gfs2/fsck/pass1.c | 11 +++
1 files changed, 7 insertions(+),
From: Bob Peterson rpete...@redhat.com
Now that function rindex_read is able to handle gfs1 file reading,
this patch eliminates the gfs1-specific function gfs1_rindex_read.
rhbz#675723
---
gfs2/edit/hexedit.c | 13 +++---
gfs2/libgfs2/gfs1.c | 62
From: Bob Peterson rpete...@redhat.com
The problem was that if an inode was determined to be bad (lots of
corruption) and its metadata blocks were invalidated in pass1, the
bad block for the inode was set as data in the bitmap. Later,
that caused duplicate reference processing (pass1b) to not
From: Bob Peterson rpete...@redhat.com
This patch reforms the duplicate block reference processing by
introducing a new four-step duplicate elimination process.
Step 1. Delete inodes that reference the block and were previously
marked invalid.
Step 2. Delete inodes that reference the
From: Bob Peterson rpete...@redhat.com
This patch expands many of the libgfs2 functions so that they may
operate on gfs1 file systems, depending on the sdp-gfs1 variable.
rhbz#675723
---
gfs2/libgfs2/fs_ops.c | 113 +++
gfs2/libgfs2/gfs1.c| 126
From: Bob Peterson rpete...@redhat.com
Before this patch, the libgfs2 rebuild functions in structures.c
were not consistent about reading in the gfs2_inode in-core struct.
Some of the functions did and some didn't. The previous patch to
make fsck.gfs2 operate on gfs1 introduced a problem because
From: Bob Peterson rpete...@redhat.com
This patch fixes a couple of problems fsck.gfs2 when it discovered
corrupt extended attributes and tried to delete them. First, in
check_eattr_entries it wasn't reporting the corruption. Second,
when the EA block was freed, it wasn't returning a proper
From: Bob Peterson rpete...@redhat.com
In testing fsck.gfs2 I noticed some incorrect behavior: If a block
was referenced incorrectly by two dinodes, fsck deleted which
ever reference it found first. Therefore, if a system dinode
and a user dinode referenced the same block, fsck.gfs2 could
From: Bob Peterson rpete...@redhat.com
In initialize.c there are several places where it can exit with an error.
These places return with -1 where they should return the standard fsck
error FSCK_ERROR.
rhbz#675723
---
gfs2/fsck/initialize.c | 12 ++--
1 files changed, 6 insertions(+),
From: Bob Peterson rpete...@redhat.com
When counting directory links, fsck.gfs2 was using a 16-bit integer.
Therefore, if a directory had more than 65535 links, it would wrap to
zero and the counts would be damaged by fsck.gfs2. Subsequent runs would
not find the corruption, but it was there
From: Bob Peterson rpete...@redhat.com
This patch refactors pass3 function mark_and_return_parent. Before
it was so complex and indented you could hardly interpret it. Now you
can actually follow the logic.
rhbz#675723
---
gfs2/fsck/pass3.c | 162
From: Bob Peterson rpete...@redhat.com
This patch adds a couple new functions to util.c: find_remove_dup
and free_block_if_notdup. This is a centralized function that
is used to remove a duplicate reference. Each reference needs to be
removed to determine when all duplicate references have been
From: Bob Peterson rpete...@redhat.com
This patch fixes several problems detected by the coverity
tool whereby variables could be accessed without being
initialized, and where return codes should be checked and
were not.
rhbz#675723
---
gfs2/fsck/fs_recovery.c |9
From: Bob Peterson rpete...@redhat.com
This patch eliminates a variable bh from all the check_leaf metawalk
functions because it is no longer referenced.
rhbzs#675723
---
gfs2/fsck/metawalk.c | 10 --
gfs2/fsck/metawalk.h |5 ++---
gfs2/fsck/pass1.c| 14 ++
3
From: Bob Peterson rpete...@redhat.com
In testing fsck.gfs2 I noticed that if a file system had some
leftover gfs2 dinodes (due to an interrupted gfs2_convert or
in my case, because I had previously loaded gfs2 metadata that
left gfs2 blocks laying around the gfs1 file system) those gfs2
dinodes
From: Bob Peterson rpete...@redhat.com
In function check_leaf_blks fsck.gfs2 keeps track of the current leaf
and the previous leaf. It can only check the number of pointers is
correct for the old leaf after it finds a new leaf block. However,
it was getting confused if the old leaf was a
From: Bob Peterson rpete...@redhat.com
Since the blockmap functions were only used in fsck.gfs2 they don't
have a place in libgfs2. This patch moves them to fsck.gfs2.
rhbz#675723
---
gfs2/fsck/metawalk.h |2 +
gfs2/fsck/util.c | 72 ++
From: Bob Peterson rpete...@redhat.com
Fix a null pointer dereference by checking the value of the bh set by
get_first_leaf(). Looking down the call tree the bh is set to NULL when
__bread fails to allocate memory so we can use errno as the return value
here.
rhbz#675723
---
From: Bob Peterson rpete...@redhat.com
This patch adds checks for duplicate block references to the leaf block
processing.
rhbz#675723
---
gfs2/fsck/pass1.c | 20
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index
From: Bob Peterson rpete...@redhat.com
This patch moves a number of gfs1-specific structures from gfs2_edit to
libgfs2 so other utils can reference them.
It also changes function rindex_read so it can operate on gfs1 or gfs2
rindex files.
rhbz#675723
---
gfs2/edit/extended.c | 11 +++--
From: Bob Peterson rpete...@redhat.com
This patch splits function check_leaf_blks into two functions to make it
more understandable. Before, it had way too many levels of indentation and
spanned multiple screens. This makes it a lot more clear.
rhbz#675723
---
gfs2/fsck/metawalk.c | 255
From: Bob Peterson rpete...@redhat.com
The output from fsck.gfs2 was wrong when it reported about a
link count change for lost+found. This patch fixes the message
so it reports the correct dinode block number.
rhbz#675723
---
gfs2/fsck/lost_n_found.c |2 +-
1 files changed, 1
From: Bob Peterson rpete...@redhat.com
This patch fixes a memory leak whereby dinodes were not being freed
under certain conditions.
rhbz#675723
---
gfs2/fsck/initialize.c | 25 -
1 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/gfs2/fsck/initialize.c
From: Bob Peterson rpete...@redhat.com
When fsck found a duplicate reference to a block it invalidated the dinode's
metadata. But if it encountered an invalid block, for example, out of range,
the invalidating would stop. If we encounter a block that isn't valid, we
obviously can't invalidate
From: Bob Peterson rpete...@redhat.com
When adding new blocks to the file system for GFS1, function
gfs1_lookup_block was not marking the buffer and dinode buffer
as modified like gfs2_lookup_block does. This patch fixes that.
rhbz#675723
---
gfs2/libgfs2/gfs1.c |2 ++
1 files changed, 2
From: Bob Peterson rpete...@redhat.com
Since gfs1_ri_update is nearly identical to ri_update, I decided to
combine the main logic into a common function. That simplifies the
code and if one gets fixed, they both get fixed automatically.
rhbz#675723
---
gfs2/libgfs2/gfs1.c | 49
From: Bob Peterson rpete...@redhat.com
The logic in gfs2_edit savemeta was wrong for saving inode blocks.
This patch fixes the logic.
rhbz#675723
---
gfs2/edit/savemeta.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
From: Bob Peterson rpete...@redhat.com
In cases where fsck.gfs2 is trying to repair damaged resource groups or
rindex, it tries several levels of repair. Some of those levels build a
list of expected resource groups and check them against the actual ones,
and the previous list is freed before
From: Bob Peterson rpete...@redhat.com
In testing I noticed that pass1c, which checks all extended
attributes, counted percent-complete backwards. It's better to
count forward because disk block seeks will be more efficient.
This patch changes the special_list functions of block_list to
add
From: Bob Peterson rpete...@redhat.com
It's not enough to range_check blocks in order to call them valid.
We also need to check whether those block collide with resource groups.
We don't want a bitmap block to ever be referenced unless it's part of
the rgrp and rindex functions. This patch
From: Bob Peterson rpete...@redhat.com
This patch rearranges the declares in util.h such that all the inode
types are grouped together. There's a place in fsck.gfs2 that checks
whether a block is an inode by checking the range of block types.
But that's only valid if they are all grouped
From: Bob Peterson rpete...@redhat.com
This patch moves some gfs1-specific functions from gfs2_edit to
libgfs2 so that other utils can eventually operate on gfs1 file
systems.
rhbz#675723
---
gfs2/edit/hexedit.c| 47 ---
gfs2/edit/hexedit.h|
From: Bob Peterson rpete...@redhat.com
When adding a .. entry to a directory newly linked to lost+found
fsck.gfs2 needs to update its di_nlink value to account for the new
link. If not, it can correct the di_nlink value to the wrong
value and not find the error until a second fsck.gfs2 is done.
From: Bob Peterson rpete...@redhat.com
This patch considerably shortens the debug output of fsck.gfs2 by
doing a few things. First, if fsck is just reporting the setting
of block types, it abbreviates the output by just listing other
blocks in parenthesis. Second, some of the key debug messages
From: Bob Peterson rpete...@redhat.com
This patch removes the calls to strerror from initialize.c.
The errors returned by libgfs2 currently don't conform to system
errors. For example, they can return positive or negative numbers.
Therefore, strerror could segfault or give nonsense messages.
I
From: Bob Peterson rpete...@redhat.com
The fsck.gfs2 tool was not properly handling cases where dinode
blocks were referenced by other dinodes as another type. For example,
if some dinode wrongly thought that another dinode was one of its
metadata blocks or data blocks. This patch fixes that
From: Bob Peterson rpete...@redhat.com
Functions gfs_inode_read and gfs_inode_get were nearly identical.
They did the same exact thing, but one operated on a buffer passed in
while the other read the buffer from the media. This patch combines
the two into a common function and two replacement
From: Bob Peterson rpete...@redhat.com
This patch is just cosmetic changes. It cleans up comments and code
but there should be no logic changes.
rhbz#675723
---
gfs2/fsck/metawalk.c | 17 +++--
gfs2/fsck/pass1.c|8
gfs2/fsck/pass1b.c |9 +
From: Bob Peterson rpete...@redhat.com
When function gfs1_block_map found a block for a stuffed file it
wasn't returning the dinode buffer, it was returning the block as a
new buffer. The problem is, if changes are made to the block, they
will be overwritten by the dinode buffer when that is
From: Bob Peterson rpete...@redhat.com
This patch plugs a couple memory leaks found by valgrind.
rhbz#675723
---
gfs2/edit/savemeta.c | 10 --
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 33f2970..1b9d0a8 100644
---
From: Bob Peterson rpete...@redhat.com
For years, the fsck.gfs2 tool used two different variable names to refer to the
same structure: sdp and sbp. This patch changes them all to sdp so they are now
consistent with the kernel code.
rhbz#675723
---
gfs2/fsck/fsck.h | 20 ++--
1 - 100 of 193 matches
Mail list logo