List the simplest sequence of steps to manually
set up and run gfs2/dlm.
Signed-off-by: David Teigland
---
gfs2/man/gfs2.5 | 188
1 file changed, 188 insertions(+)
diff --git a/gfs2/man/gfs2.5 b/gfs2/man/gfs2.5
index 25effdd..220a10d 1006
Hi,
This patch changes the multi-block allocation code, such that
directory inodes only get a single block reserved in the bitmap.
That way, the bitmaps are more tightly packed together, and there
are fewer spans of free blocks for in-use block reservations.
This means it takes less time to find a
From: Randy Dunlap
Fix build errors by correcting DLM dependencies in GFS2.
Build errors happen when CONFIG_GFS2_FS_LOCKING_DLM=y and CONFIG_DLM=m:
fs/built-in.o: In function `gfs2_lock':
file.c:(.text+0xc7abd): undefined reference to `dlm_posix_get'
file.c:(.text+0xc7ad0): undefined reference t
->invalidatepage() aop now accepts range to invalidate so we can make
use of it in gfs2_invalidatepage().
Signed-off-by: Lukas Czerner
Acked-by: Steven Whitehouse
Cc: cluster-devel@redhat.com
---
fs/gfs2/aops.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/
When fsck.gfs2 discovers a data block in error, it flags the error
and especially in pass1, it tries to "undo" the block designations
it previously marked in the blockmap. Before this patch, the "undo"
functions didn't know when to stop. So it could "undo" designations
in the blockmap that it hadn'
When pass1 encounters a dinode with unrecoverable damage, it tries
to "undo" the metadata and data block designations it marked in the
blockmap prior to finding the damage. That's all fine, but if the
damaged dinode has a duplicate reference, we also need to delete that
from the duplicate reference
When checking the hash table in pass2, we can't just keep doubling
the length for each consecutive check because the number of pointer
copies (aka length) is also tied to the starting offset. If the
starting offset is invalid for the length, it might treat a chunk of
the hash table as bigger than i
Before this patch, if leaf blocks were found to be corrupt, pass1
tried to fix them by allocating new leaf blocks in place of the bad
ones. That's a bad idea, because pass1 populates the blockmap and
sets the bitmap accordingly. In other words, it's dynamically changing.
Say, for example, that you'
If a corrupt dinode references a bunch of blocks as data blocks,
and those blocks occur later in the bitmap (as is usually the case)
but they're really dinodes, we have a problem. Before it finds the
corruption, it can change the bitmap markings from 'dinode' to 'data'
blocks. Later, when it determ
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 15a3f3a..9c76eda 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fsck/pass1b.c
@@ -146,7 +146,6 @@ static void resolve_dup_refe
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 because pass1
tries to "undo" its referenc
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 further metadata
processi
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, take a
GFS1 file of height 2, which looks
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 the bad data
so it may be backtracked easi
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 insertions(+), 2 deletions(-)
diff --git a/gfs
Before this patch, bad extended attributes were not properly removed
from a dinode, and blocks were not freed. This patch properly
removes them all.
rhbz#872564
---
gfs2/fsck/pass1.c | 12
gfs2/fsck/pass1c.c | 8 +++-
gfs2/fsck/pass2.c | 18 ++
3 files changed,
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
buffers on the linked list so they're f
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.
rhbz#902920
---
gfs2/fsck/metawalk.c |
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 improperly referenced the block
as data or m
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
---
gfs2/fsck/util.c | 3 ++-
1 file chang
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 deletions(-)
diff --git a/gfs2/fsck/metaw
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 could cause all kinds of
errors, including se
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 insertions(+)
diff --git a/gfs2/fsck/pass1b.c
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 file name,
but that's not enough. The hash
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
violate this rule and fix it. In that ca
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 insertions(+), 21 deletions(-)
diff --git a/gfs2/fsc
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 | 160 --
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 deleted.
This patch adds an additional che
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 blocks
were counted for metadata, data,
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 | 6 +++---
4 files changed, 11 insertions(
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
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawal
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 insertions(+), 16 deletions(-)
diff --git a/gf
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
index 5137559..04e5289 100644
--- a/gfs2/fsck
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 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fs
This patch adds a check to the basic directory entry checks which
compares the formal inode number of the directory entry to the
formal inode number in the inode tree that was set up by pass1.
If the numbers don't match, this directory entry is corrupt.
rhbz#902920
---
gfs2/fsck/pass2.c | 20
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 processing of
duplicate block references. S
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 patch replaces
that scheme with a new on
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. This patch
makes it increment the counters
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
variable dt, you know it's a struct duptre
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 same blocks
that other valid dinodes referen
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. We may
in fact have doubled our exhash ta
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
the hash table. This patch adds a call t
In a recent patch to fsck.gfs2, we added the ability to make sure the
formal inode number in each directory entry matches the formal inode
number in the dinode. If it doesn't match, fsck tries to fix it up.
We can't do much for regular files, but we can fix up directories.
If the directory linkage
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 insertions(+), 8 deletions(-)
diff --git a/gfs
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 new
blocks in the fsck blockmap. If we don
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.
rhbz#902920
---
gfs2/fsck/lost_n_found.c |
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 | 1 +
3 files changed, 20 insertions(+),
Hi,
Back on April 8, I posted a set of 43 patches to fix certain fsck.gfs2
problems relating to corrupt directory hash tables. Since that time, I've
discovered a few more problems, fixed some patches, and wrote 5 others.
Here is a revised set of patches for fsck.gfs2. These are mostly bug fixes,
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 a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_o
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 +++
gfs2/fsck/lost_n_found.h | 1 +
2 files changed, 66 insertions
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 | 9 -
gfs2/libgfs2/libgfs2.h |
Hi,
That looks good. Thanks,
Steve.
On Tue, 2013-05-14 at 13:53 +0100, Andrew Price wrote:
> Add generic parsing of options passed in with -o and use it to accept
> sunit and swidth options (names chosen to be the same as mkfs.xfs). We
> don't do anything with these options yet.
>
> Signed-off-
Add generic parsing of options passed in with -o and use it to accept
sunit and swidth options (names chosen to be the same as mkfs.xfs). We
don't do anything with these options yet.
Signed-off-by: Andrew Price
---
gfs2/mkfs/main_mkfs.c | 100 +-
1
- Original Message -
| The stripe alignment work is ongoing but these patches are ready to go so I
| thought I'd get them posted.
|
| Andrew Price (6):
| mkfs.gfs2: Add options for stripe size and width
| libgfs2: Remove 'writes' field from gfs2_sbd
| mkfs.gfs2: Link to libblkid
|
On 14/05/13 11:49, Steven Whitehouse wrote:
Hi,
On Tue, 2013-05-14 at 11:45 +0100, Andrew Price wrote:
Add generic parsing of options passed in with -o and use it to accept
sunit and swidth options (names chosen to be the same as mkfs.xfs). We
don't do anything with these options yet.
Signed-o
On 14/05/13 11:52, Steven Whitehouse wrote:
Hi,
Looks good. Do we need to change the package spec file now we no longer
need file?
Yes, I've made a note to do that when we do the next release along with
updating the build docs.
Andy
Steve.
On Tue, 2013-05-14 at 11:45 +0100, Andrew Price
Hi,
Other patches all look good too. Thanks,
Steve.
On Tue, 2013-05-14 at 11:45 +0100, Andrew Price wrote:
> gfs2_compute_bitstructs accepted an sdp and only used it to look up the
> block size. Replace the sdp parameter with a bsize parameter to make it
> easier to reason through code which use
Hi,
Looks good. Do we need to change the package spec file now we no longer
need file?
Steve.
On Tue, 2013-05-14 at 11:45 +0100, Andrew Price wrote:
> Use libblkid to probe the contents of the target device instead of
> execing 'file'.
>
> Signed-off-by: Andrew Price
> ---
> gfs2/mkfs/main_mk
Hi,
On Tue, 2013-05-14 at 11:45 +0100, Andrew Price wrote:
> Add generic parsing of options passed in with -o and use it to accept
> sunit and swidth options (names chosen to be the same as mkfs.xfs). We
> don't do anything with these options yet.
>
> Signed-off-by: Andrew Price
> ---
> gfs2/mk
Add the build system bits to check for, and link mkfs.gfs2 to libblkid.
Signed-off-by: Andrew Price
---
configure.ac | 1 +
gfs2/mkfs/Makefile.am | 3 +++
2 files changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index 45b38eb..6940d79 100644
--- a/configure.ac
+++ b/co
gfs2_compute_bitstructs accepted an sdp and only used it to look up the
block size. Replace the sdp parameter with a bsize parameter to make it
easier to reason through code which uses this function.
Signed-off-by: Andrew Price
---
gfs2/convert/gfs2_convert.c | 2 +-
gfs2/fsck/rgrepair.c
Use libblkid to probe the contents of the target device instead of
execing 'file'.
Signed-off-by: Andrew Price
---
gfs2/mkfs/main_mkfs.c | 181 ++
1 file changed, 51 insertions(+), 130 deletions(-)
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/ma
This was only used to print out how many writes mkfs.gfs2 had made
during its run in debug mode, which doesn't really make sense any more
as we don't use bwrite for much of the mkfs process now.
Signed-off-by: Andrew Price
---
gfs2/libgfs2/buf.c | 1 -
gfs2/libgfs2/libgfs2.h | 1 -
gfs2/mkfs
Adds a struct mkfs_dev to store the fd, topology and stat info for the
target. Not using lgfs2_device_info as we now probe the topology with
libblkid so that functionality should eventually disappear from libgfs2.
Signed-off-by: Andrew Price
---
gfs2/mkfs/main_mkfs.c | 173 ++
The stripe alignment work is ongoing but these patches are ready to go so I
thought I'd get them posted.
Andrew Price (6):
mkfs.gfs2: Add options for stripe size and width
libgfs2: Remove 'writes' field from gfs2_sbd
mkfs.gfs2: Link to libblkid
mkfs.gfs2: Use libblkid for checking content
Add generic parsing of options passed in with -o and use it to accept
sunit and swidth options (names chosen to be the same as mkfs.xfs). We
don't do anything with these options yet.
Signed-off-by: Andrew Price
---
gfs2/mkfs/main_mkfs.c | 107 +-
1
Hi,
Looks good to me. Just a couple of tweaks:
On 13/05/13 17:09, David Teigland wrote:
List the simplest sequence of steps to manually
set up and run gfs2/dlm.
Signed-off-by: David Teigland
---
gfs2/man/gfs2.5 | 188
1 file changed,
Hi,
On Mon, 2013-05-13 at 12:45 -0700, Randy Dunlap wrote:
> [resending since mail server dropped it]
>
> On 05/13/13 12:34, Randy Dunlap wrote:
> > On 05/13/13 12:31, Randy Dunlap wrote:
> >> On 05/13/13 09:30, Randy Dunlap wrote:
> >>> On 05/13/13 02:18, Steven Whitehouse wrote:
> Hi,
> >>
68 matches
Mail list logo