Andrew Price | 25 May 17:05
Picon
Favicon
Gravatar

[PATCH] libgfs2: Use flags for versions in metadata description

Consolidate the .gfs1 and .gfs2 fields into one .versions field and add
constants so we can test lgfs2_metadata versions more easily.

Signed-off-by: Andrew Price <anprice <at> redhat.com>
---
 gfs2/edit/hexedit.c    |    8 +++---
 gfs2/libgfs2/libgfs2.h |    5 ++-
 gfs2/libgfs2/meta.c    |   67 ++++++++++++++++++++----------------------------
 3 files changed, 35 insertions(+), 45 deletions(-)

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index b4e6d15..2ff1125 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -813,14 +813,13 @@ int display_block_type(int from_restore)
 	return ret_type;
 }

-static const struct lgfs2_metadata *find_mtype(uint32_t mtype, int gfs1)
+static const struct lgfs2_metadata *find_mtype(uint32_t mtype, const unsigned versions)
 {
 	const struct lgfs2_metadata *m = lgfs2_metadata;
 	unsigned n = 0;

 	do {
-		if (((gfs1 && m[n].gfs1) || (!gfs1 && m[n].gfs2))
-		                         && m[n].mh_type == mtype)
+		if ((m[n].versions & versions) && m[n].mh_type == mtype)
 			return &m[n];
 		n++;
(Continue reading)

Andrew Price | 25 May 12:07
Picon
Favicon
Gravatar

[PATCH 1/3] gfs2-utils: Remove references to unlinked file tag

Remove references to an obsolete unlinked tag file (or file tag).

Signed-off-by: Andrew Price <anprice <at> redhat.com>
---
 gfs2/libgfs2/libgfs2.h |    1 -
 gfs2/man/gfs2_jadd.8   |    3 ---
 gfs2/man/mkfs.gfs2.8   |    3 ---
 gfs2/mkfs/main_mkfs.c  |    5 +----
 4 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index e2a7e45..8ed08dd 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -255,7 +255,6 @@ struct gfs2_sbd {
 	unsigned int bsize;	     /* The block size of the FS (in bytes) */
 	unsigned int jsize;	     /* Size of journals (in MB) */
 	unsigned int rgsize;     /* Size of resource groups (in MB) */
-	unsigned int utsize;     /* Size of unlinked tag files (in MB) */
 	unsigned int qcsize;     /* Size of quota change files (in MB) */

 	int debug;
diff --git a/gfs2/man/gfs2_jadd.8 b/gfs2/man/gfs2_jadd.8
index a645fb7..5453edd 100644
--- a/gfs2/man/gfs2_jadd.8
+++ b/gfs2/man/gfs2_jadd.8
@@ -50,9 +50,6 @@ The number of new journals to add.
 \fB-q\fP
 Be quiet.  Don't print anything.
 .TP
(Continue reading)

Steven Whitehouse | 22 May 12:28
Picon
Favicon

GFS2 git tree

Hi,

Linus has pulled all the patches for the merge window. Although I've got
a few patches queued up, I'll put them in at -rc1 as usual to avoid the
next window's patches getting tangled up with the current window. So the
tree is empty again for the time being,

Steve.

Benjamin Marzinski | 22 May 07:25
Picon
Favicon

[PATCH] GFS2: Use lvbs for storing rgrp information

Instead of reading in the resource groups when gfs2 is checking
for free space to allocate from, gfs2 can store the necessary infromation
in the resource group's lvb.  Also, instead of searching for unlinked
inodes in every resource group that's checked for free space, gfs2 can
store the number of unlinked but inodes in the lvb, and only check for
unlinked inodes if it will find some.

The first time a resource group is locked, the lvb must initialized.
Since this involves counting the unlinked inodes in the resource group,
this takes a little extra time.  But after that, if the resource group
is locked with GL_SKIP, the buffer head won't be read in unless it's
actually needed.

Signed-off-by: Benjamin Marzinski <bmarzins <at> redhat.com>
---
 fs/gfs2/glock.c             |    1 
 fs/gfs2/incore.h            |    1 
 fs/gfs2/rgrp.c              |  138 +++++++++++++++++++++++++++++++++++++++++---
 include/linux/gfs2_ondisk.h |   10 +++
 4 files changed, 141 insertions(+), 9 deletions(-)

Index: gfs2-3.0-nmw/fs/gfs2/glock.c
===================================================================
--- gfs2-3.0-nmw.orig/fs/gfs2/glock.c
+++ gfs2-3.0-nmw/fs/gfs2/glock.c
@@ -767,6 +767,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp,
 	gl->gl_stats.stats[GFS2_LKS_DCOUNT] = 0;
 	gl->gl_stats.stats[GFS2_LKS_QCOUNT] = 0;
 	memset(&gl->gl_lksb, 0, sizeof(struct dlm_lksb));
+	memset(gl->gl_lvb, 0, 32 * sizeof(char));
(Continue reading)

David Teigland | 21 May 17:39
Picon
Favicon

Re: [patch] dlm: remove stray unlock

On Mon, May 21, 2012 at 05:35:26PM +0300, Dan Carpenter wrote:
> Smatch complains that we unlock this twice.  It looks like an accidental
> to me.

Thanks, will fix that.

Bob Peterson | 18 May 15:28
Picon
Favicon

[GFS2 Patch][TRY #3] GFS2: Fold quota data into the reservations struct

Hi,

I posted this patch earlier. The only thing that's changed is
the diff offsets, due to other patches that have gone in.

The question was previously asked: Does it matter that I removed
a bunch of calls to gfs2_qadata_get, which itself called function
gfs2_rindex_update? The answer is yes, it matters, and that's why
I've replaced some of the calls with calls directly to function
gfs2_rindex_update rather. Hopefully I've gotten all the places
that matter. Perhaps someone should check my work. :)

This patch moves the ancillary quota data structures into the
block reservations structure. This saves GFS2 some time and
effort in allocating and deallocating the qadata structure.

Regards,

Bob Peterson
Red Hat File Systems

Signed-off-by: Bob Peterson <rpeterso <at> redhat.com> 
---
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index aba77b5..d652634 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -614,7 +614,6 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
 	unsigned int data_blocks = 0, ind_blocks = 0, rblocks;
 	int alloc_required;
(Continue reading)

Fabio M. Di Nitto | 16 May 15:37
Picon
Favicon

[PATCH] rgmanager: add nfsdrestart option as last resource to umount fs

From: "Fabio M. Di Nitto" <fdinitto <at> redhat.com>

Resolves: rhbz#822066

Signed-off-by: Fabio M. Di Nitto <fdinitto <at> redhat.com>
---
 rgmanager/src/resources/fs.sh |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index 49912c2..f67f80e 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -202,6 +202,18 @@ meta_data()
 	    <content type="boolean"/>
 	</parameter>

+	<parameter name="nfsrestart" inherit="nfsrestart">
+	    <longdesc lang="en">
+		If set and unmounting the file system fails, the node will
+		try to restart nfs daemon and nfs lockd to drop all filesystem
+		references. Use this option as last resource.
+	    </longdesc>
+	    <shortdesc lang="en">
+		Enable NFS daemon and lockd workaround
+	    </shortdesc>
+	    <content type="boolean"/>
+	</parameter>
+
 	<parameter name="fsid">
(Continue reading)

Fabio M. Di Nitto | 16 May 15:36
Picon
Favicon

[PATCH] rgmanager: add nfsdrestart option as last resource to umount fs

From: "Fabio M. Di Nitto" <fdinitto <at> redhat.com>

Resolves: rhbz#822053

Signed-off-by: Fabio M. Di Nitto <fdinitto <at> redhat.com>
---
 rgmanager/src/resources/fs.sh.in |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/resources/fs.sh.in b/rgmanager/src/resources/fs.sh.in
index c43c177..404fe01 100644
--- a/rgmanager/src/resources/fs.sh.in
+++ b/rgmanager/src/resources/fs.sh.in
@@ -135,6 +135,18 @@ do_metadata()
 	    <content type="boolean"/>
 	</parameter>

+	<parameter name="nfsrestart" inherit="nfsrestart">
+	    <longdesc lang="en">
+		If set and unmounting the file system fails, the node will
+		try to restart nfs daemon and nfs lockd to drop all filesystem
+		references. Use this option as last resource.
+	    </longdesc>
+	    <shortdesc lang="en">
+		Enable NFS daemon and lockd workaround
+	    </shortdesc>
+	    <content type="boolean"/>
+	</parameter>
+
 	<parameter name="fsid">
(Continue reading)

Bob Peterson | 15 May 20:51
Picon
Favicon

[GFS2 Patch] GFS2: Fix quota adjustment return code

Hi,

This patch changes function gfs2_adjust_quota so that it properly
returns a good (zero) return code on the normal path through the code.
Without this, mounting GFS2 with -o quota=account periodically gave
this error message: GFS2: fsid=cluster:fs: gfs2_quotad: sync error -5

Regards,

Bob Peterson
Red Hat File Systems

Signed-off-by: Bob Peterson <rpeterso <at> redhat.com> 
---
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 02df0de..197cc2d 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -744,7 +744,7 @@ get_a_page:
 		i_size_write(inode, size);
 	inode->i_mtime = inode->i_atime = CURRENT_TIME;
 	mark_inode_dirty(inode);
-	return err;
+	return 0;

 unlock_out:
 	unlock_page(page);

David Teigland | 15 May 17:40
Picon
Favicon

Re: [patch] dlm: NULL dereference on failure in kmem_cache_create()

On Tue, May 15, 2012 at 11:58:12AM +0300, Dan Carpenter wrote:
> We aren't allowed to pass NULL pointers to kmem_cache_destroy() so if
> both allocations fail, it leads to a NULL dereference.

thanks, added that to next branch.

Fabio M. Di Nitto | 15 May 16:38
Picon
Favicon

[PATCH] cman init: add extra documentation for FENCE_JOIN=""

From: "Fabio M. Di Nitto" <fdinitto <at> redhat.com>

Related: rhbz#821016

Signed-off-by: Fabio M. Di Nitto <fdinitto <at> redhat.com>
---
 cman/init.d/cman.in               |    3 +++
 cman/init.d/cman.init.defaults.in |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index dddfe6e..95323b4 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -135,6 +135,9 @@ fi
 #     set to "yes", then the script will attempt to join the fence domain.
 #     If FENCE_JOIN is set to any other value, the default behavior is
 #     to join the fence domain (equivalent to "yes").
+#     When setting FENCE_JOIN to "no", it is important to check 
+#     DLM_CONTROLD_OPTS to reflect expected behavior regarding fencing
+#     and quorum.
 [ -z "$FENCE_JOIN" ] && FENCE_JOIN="yes"

 # FENCED_OPTS -- allow extra options to be passed to fence daemon.
diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in
index adde8d9..b981bab 100644
--- a/cman/init.d/cman.init.defaults.in
+++ b/cman/init.d/cman.init.defaults.in
@@ -58,6 +58,9 @@
 #     set to "yes", then the script will attempt to join the fence domain.
(Continue reading)


Gmane