[Cluster-devel] [PATCH] gfs2: add native setup to man page

2013-05-14 Thread David Teigland
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

[Cluster-devel] [GFS2 PATCH] GFS2: Use single-block reservations for directories

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [PATCH -next] gfs2: fix DLM depends to fix build errors

2013-05-14 Thread Randy Dunlap
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

[Cluster-devel] [PATCH v4 08/20] gfs2: use ->invalidatepage() length argument

2013-05-14 Thread Lukas Czerner
->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/

[Cluster-devel] [gfs2-utils PATCH 44/47] fsck.gfs2: Stop "undo" process when error data block is reached

2013-05-14 Thread Bob Peterson
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'

[Cluster-devel] [gfs2-utils PATCH 47/47] fsck.gfs2: delete all duplicates from unrecoverable damaged dinodes

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 46/47] fsck.gfs2: take hash table start boundaries into account

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 45/47] fsck.gfs2: Don't allocate leaf blocks in pass1

2013-05-14 Thread Bob Peterson
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'

[Cluster-devel] [gfs2-utils PATCH 43/47] fsck.gfs2: double-check transitions from dinode to data

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 42/47] fsck.gfs2: Remove unused variable

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 38/47] fsck.gfs2: check for duplicate first references

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 36/47] fsck.gfs2: standardize check_metatree return codes

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 33/47] fsck.gfs2: Don't flag GFS1 non-dinode blocks as duplicates

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 28/47] fsck.gfs2: print metadata block reference on data errors

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 31/47] fsck.gfs2: Log when unrecoverable data block errors are encountered

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 41/47] fsck.gfs2: Remove all bad eattr blocks

2013-05-14 Thread Bob Peterson
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,

[Cluster-devel] [gfs2-utils PATCH 32/47] fsck.gfs2: don't remove buffers from the list when errors are found

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 16/47] fsck.gfs2: fix leaf blocks, don't try to patch the hash table

2013-05-14 Thread Bob Peterson
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 |

[Cluster-devel] [gfs2-utils PATCH 21/47] fsck.gfs2: link dinodes that only have extended attribute problems

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 39/47] fsck.gfs2: When flagging a duplicate reference, show valid or invalid

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 18/47] fsck.gfs2: small cleanups

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 35/47] fsck.gfs2: pass2: check leaf blocks when fixing hash table

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 22/47] fsck.gfs2: Add clarifying message to duplicate processing

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 14/47] fsck.gfs2: Verify dirent hash values correspond to proper leaf block

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 03/47] libgfs2: let dir_split_leaf receive a "broken" lindex

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 23/47] fsck.gfs2: separate function to calculate metadata block header size

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 08/47] fsck.gfs2: Move basic directory entry checks to separate function

2013-05-14 Thread Bob Peterson
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 --

[Cluster-devel] [gfs2-utils PATCH 37/47] fsck.gfs2: don't invalidate files with duplicate data block refs

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 29/47] fsck.gfs2: print block count values when fixing them

2013-05-14 Thread Bob Peterson
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,

[Cluster-devel] [gfs2-utils PATCH 34/47] fsck.gfs2: externalize check_leaf

2013-05-14 Thread Bob Peterson
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(

[Cluster-devel] [gfs2-utils PATCH 13/47] fsck.gfs2: Misc cleanups

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 06/47] fsck.gfs2: Check for formal inode mismatch when adding to lost+found

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 20/47] fsck.gfs2: Remove redundant leaf depth check

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 25/47] fsck.gfs2: Check for interrupt when resolving duplicates

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 09/47] fsck.gfs2: Add formal inode check to basic dirent checks

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 24/47] fsck.gfs2: Rework the "undo" functions

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 10/47] fsck.gfs2: Add new function to check dir hash tables

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 27/47] fsck.gfs2: Keep proper counts when duplicates are found

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 26/47] fsck.gfs2: Consistent naming of struct duptree variables

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 30/47] fsck.gfs2: Do not invalidate metablocks of dinodes with invalid mode

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 15/47] fsck.gfs2: re-read hash table if directory height or depth changes

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 17/47] fsck.gfs2: check leaf depth when validating leaf blocks

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 11/47] fsck.gfs2: Special case '..' when processing bad formal inode number

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 07/47] fsck.gfs2: shorten some debug messages in lost+found

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 19/47] fsck.gfs2: reprocess inodes when blocks are added

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 04/47] fsck.gfs2: Move function find_free_blk to util.c

2013-05-14 Thread Bob Peterson
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 |

[Cluster-devel] [gfs2-utils PATCH 12/47] fsck.gfs2: Move function to read directory hash table to util.c

2013-05-14 Thread Bob Peterson
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(+),

[Cluster-devel] [gfs2-utils PATCH 00/47] fsck.gfs2 is unable to fix misplaced directory leaf blocks

2013-05-14 Thread Bob Peterson
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,

[Cluster-devel] [gfs2-utils PATCH 01/47] libgfs2: externalize dir_split_leaf

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 05/47] fsck.gfs2: Split out function to make sure lost+found exists

2013-05-14 Thread Bob Peterson
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

[Cluster-devel] [gfs2-utils PATCH 02/47] libgfs2: allow dir_split_leaf to receive a leaf buffer

2013-05-14 Thread Bob Peterson
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 |

Re: [Cluster-devel] [PATCH 1/6 v2] mkfs.gfs2: Add options for stripe size and width

2013-05-14 Thread Steven Whitehouse
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-

[Cluster-devel] [PATCH 1/6 v2] mkfs.gfs2: Add options for stripe size and width

2013-05-14 Thread Andrew Price
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

Re: [Cluster-devel] [PATCH 0/6] More mkfs.gfs2 reworking

2013-05-14 Thread Bob Peterson
- 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 |

Re: [Cluster-devel] [PATCH 1/6] mkfs.gfs2: Add options for stripe size and width

2013-05-14 Thread Andrew Price
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

Re: [Cluster-devel] [PATCH 4/6] mkfs.gfs2: Use libblkid for checking contents

2013-05-14 Thread Andrew Price
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

Re: [Cluster-devel] [PATCH 6/6] libgfs2: Clarify gfs2_compute_bitstructs's parameters

2013-05-14 Thread Steven Whitehouse
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

Re: [Cluster-devel] [PATCH 4/6] mkfs.gfs2: Use libblkid for checking contents

2013-05-14 Thread Steven Whitehouse
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

Re: [Cluster-devel] [PATCH 1/6] mkfs.gfs2: Add options for stripe size and width

2013-05-14 Thread Steven Whitehouse
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

[Cluster-devel] [PATCH 3/6] mkfs.gfs2: Link to libblkid

2013-05-14 Thread Andrew Price
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

[Cluster-devel] [PATCH 6/6] libgfs2: Clarify gfs2_compute_bitstructs's parameters

2013-05-14 Thread Andrew Price
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

[Cluster-devel] [PATCH 4/6] mkfs.gfs2: Use libblkid for checking contents

2013-05-14 Thread Andrew Price
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

[Cluster-devel] [PATCH 2/6] libgfs2: Remove 'writes' field from gfs2_sbd

2013-05-14 Thread Andrew Price
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

[Cluster-devel] [PATCH 5/6] mkfs.gfs2: Add a struct to store device info

2013-05-14 Thread Andrew Price
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 ++

[Cluster-devel] [PATCH 0/6] More mkfs.gfs2 reworking

2013-05-14 Thread Andrew Price
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

[Cluster-devel] [PATCH 1/6] mkfs.gfs2: Add options for stripe size and width

2013-05-14 Thread Andrew Price
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

Re: [Cluster-devel] [PATCH] gfs2: add native setup to man page

2013-05-14 Thread Andrew Price
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,

Re: [Cluster-devel] linux-next: Tree for May 8 (dlm)

2013-05-14 Thread Steven Whitehouse
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, > >>