[Cluster-devel] cluster/cman/cman_tool join_ccs.c

2008-01-11 Thread pcaulfield
CVSROOT:/cvs/cluster
Module name:cluster
Branch: RHEL46
Changes by: [EMAIL PROTECTED]   2008-01-11 14:24:19

Modified files:
cman/cman_tool : join_ccs.c 

Log message:
Always the node name from cluster.conf as the node name.
Fix fixes fencing and routing problems too in some circumstances.
bz#428219

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/cman_tool/join_ccs.c.diff?cvsroot=clusteronly_with_tag=RHEL46r1=1.7.2.8r2=1.7.2.8.4.1

--- cluster/cman/cman_tool/Attic/join_ccs.c 2006/12/18 13:37:55 1.7.2.8
+++ cluster/cman/cman_tool/Attic/join_ccs.c 2008/01/11 14:24:19 
1.7.2.8.4.1
@@ -118,8 +118,8 @@
 
if (strlen(nodename2) == strlen(nodename3) 
!strncmp(nodename2, nodename3, strlen(nodename3))) {
+   strcpy(nodename, str);
free(str);
-   strcpy(nodename, nodename3);
return 0;
}
 



Re: [Cluster-devel] [GFS2] [Patch] gfs2_alloc_required performance

2008-01-11 Thread Steven Whitehouse
Hi,

Now in the -nmw git tree,

Steve.

On Fri, 2008-01-11 at 13:44 -0600, Bob Peterson wrote:
 Hi,
 
 This is a small I/O performance enhancement to gfs2.  (Actually, it is a 
 rework of
 an earlier version I got wrong).  The idea here is to check if the write 
 extends
 past the last block in the file.  If so, the function can save itself a lot of
 time and trouble because it knows an allocate will be required.  Benchmarks 
 like
 iozone should see better performance.
 
 Regards,
 
 Bob Peterson
 Red Hat GFS
 
 Signed-off-by: Bob Peterson [EMAIL PROTECTED] 
 --
  fs/gfs2/bmap.c   |5 +
  1 files changed, 5 insertions(+), 0 deletions(-)
 
 diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
 index 73dfad7..4356cc2 100644
 --- a/fs/gfs2/bmap.c
 +++ b/fs/gfs2/bmap.c
 @@ -1224,6 +1224,11 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, 
 u64 offset,
   unsigned int shift = sdp-sd_sb.sb_bsize_shift;
   lblock = offset  shift;
   lblock_stop = (offset + len + sdp-sd_sb.sb_bsize - 1)  shift;
 + if (lblock_stop  ip-i_di.di_blocks) { /* writing past the
 +last block */
 + *alloc_required = 1;
 + return 0;
 + }
   }
  
   for (; lblock  lblock_stop; lblock += extlen) {
 
 



Re: [Cluster-devel] [GFS2] [Patch] Remove unneeded i_spin

2008-01-11 Thread Steven Whitehouse
Hi,

Now in the -nmw git tree. Thanks,

Steve.


On Fri, 2008-01-11 at 13:31 -0600, Bob Peterson wrote:
 Hi,
 
 This patch removes a vestigial variable i_spin from the gfs2_inode
 structure.  This not only saves us memory (30 of these in memory
 for the oom test) it also saves us time because we don't have to
 spend time initializing it (i.e. slightly better performance).
 
 Regards,
 
 Bob Peterson
 Red Hat GFS
 
 Signed-off-by: Bob Peterson [EMAIL PROTECTED] 
 --
  fs/gfs2/incore.h |1 -
  fs/gfs2/main.c   |1 -
  2 files changed, 0 insertions(+), 2 deletions(-)
 
 diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
 index bd92a6d..1339996 100644
 --- a/fs/gfs2/incore.h
 +++ b/fs/gfs2/incore.h
 @@ -267,7 +267,6 @@ struct gfs2_inode {
   struct gfs2_alloc *i_alloc;
   u64 i_last_rg_alloc;
  
 - spinlock_t i_spin;
   struct rw_semaphore i_rw_mutex;
  };
  
 diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
 index 88686fc..9c7765c 100644
 --- a/fs/gfs2/main.c
 +++ b/fs/gfs2/main.c
 @@ -29,7 +29,6 @@ static void gfs2_init_inode_once(struct kmem_cache *cachep, 
 void *foo)
   struct gfs2_inode *ip = foo;
  
   inode_init_once(ip-i_inode);
 - spin_lock_init(ip-i_spin);
   init_rwsem(ip-i_rw_mutex);
   ip-i_alloc = NULL;
  }
 
 



[Cluster-devel] cluster/rgmanager/src/resources lvm_by_vg.sh

2008-01-11 Thread jbrassow
CVSROOT:/cvs/cluster
Module name:cluster
Changes by: [EMAIL PROTECTED]   2008-01-11 21:32:51

Modified files:
rgmanager/src/resources: lvm_by_vg.sh 

Log message:
- Bug #428448
- HA LVM service fails to relocate when I/O is running

Was failing to add new tag when relocating.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/lvm_by_vg.sh.diff?cvsroot=clusterr1=1.2r2=1.3

--- cluster/rgmanager/src/resources/lvm_by_vg.sh2008/01/03 21:02:53 
1.2
+++ cluster/rgmanager/src/resources/lvm_by_vg.sh2008/01/11 21:32:48 
1.3
@@ -74,7 +74,8 @@
return $OCF_ERR_GENERIC
fi
 
-   if ! vgchange --addtag $(local_node_name) $OCF_RESKEY_vg_name; then
+   vgchange --addtag $(local_node_name) $OCF_RESKEY_vg_name
+   if [ $? -ne 0 ]; then
ocf_log err Failed to add ownership tag to $OCF_RESKEY_vg_name
return $OCF_ERR_GENERIC
 fi



[Cluster-devel] cluster/rgmanager/src/resources lvm_by_vg.sh

2008-01-11 Thread jbrassow
CVSROOT:/cvs/cluster
Module name:cluster
Branch: RHEL5
Changes by: [EMAIL PROTECTED]   2008-01-11 21:32:55

Modified files:
rgmanager/src/resources: lvm_by_vg.sh 

Log message:
- Bug #428448
- HA LVM service fails to relocate when I/O is running

Was failing to add new tag when relocating.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/lvm_by_vg.sh.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.1.4.1r2=1.1.4.2

--- cluster/rgmanager/src/resources/lvm_by_vg.sh2008/01/03 20:45:37 
1.1.4.1
+++ cluster/rgmanager/src/resources/lvm_by_vg.sh2008/01/11 21:32:55 
1.1.4.2
@@ -74,7 +74,8 @@
return $OCF_ERR_GENERIC
fi
 
-   if ! vgchange --addtag $(local_node_name) $OCF_RESKEY_vg_name; then
+   vgchange --addtag $(local_node_name) $OCF_RESKEY_vg_name
+   if [ $? -ne 0 ]; then
ocf_log err Failed to add ownership tag to $OCF_RESKEY_vg_name
return $OCF_ERR_GENERIC
 fi



[Cluster-devel] [GFS2] [Patch] gfs2_alloc_required performance

2008-01-11 Thread Bob Peterson
Hi,

This is a small I/O performance enhancement to gfs2.  (Actually, it is a rework 
of
an earlier version I got wrong).  The idea here is to check if the write extends
past the last block in the file.  If so, the function can save itself a lot of
time and trouble because it knows an allocate will be required.  Benchmarks like
iozone should see better performance.

Regards,

Bob Peterson
Red Hat GFS

Signed-off-by: Bob Peterson [EMAIL PROTECTED] 
--
 fs/gfs2/bmap.c   |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 73dfad7..4356cc2 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1224,6 +1224,11 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 
offset,
unsigned int shift = sdp-sd_sb.sb_bsize_shift;
lblock = offset  shift;
lblock_stop = (offset + len + sdp-sd_sb.sb_bsize - 1)  shift;
+   if (lblock_stop  ip-i_di.di_blocks) { /* writing past the
+  last block */
+   *alloc_required = 1;
+   return 0;
+   }
}
 
for (; lblock  lblock_stop; lblock += extlen) {




[Cluster-devel] cluster/rgmanager/src/resources lvm_by_vg.sh

2008-01-11 Thread jbrassow
CVSROOT:/cvs/cluster
Module name:cluster
Branch: RHEL4
Changes by: [EMAIL PROTECTED]   2008-01-11 21:33:31

Modified files:
rgmanager/src/resources: lvm_by_vg.sh 

Log message:
- Bug #428475
- HA LVM service fails to relocate when I/O is running

Was failing to add new tag when relocating.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/lvm_by_vg.sh.diff?cvsroot=clusteronly_with_tag=RHEL4r1=1.1.2.1r2=1.1.2.2

--- cluster/rgmanager/src/resources/lvm_by_vg.sh2008/01/03 20:35:39 
1.1.2.1
+++ cluster/rgmanager/src/resources/lvm_by_vg.sh2008/01/11 21:33:31 
1.1.2.2
@@ -74,7 +74,8 @@
return $OCF_ERR_GENERIC
fi
 
-   if ! vgchange --addtag $(local_node_name) $OCF_RESKEY_vg_name; then
+   vgchange --addtag $(local_node_name) $OCF_RESKEY_vg_name
+   if [ $? -ne 0 ]; then
ocf_log err Failed to add ownership tag to $OCF_RESKEY_vg_name
return $OCF_ERR_GENERIC
 fi



[Cluster-devel] [GFS2] [Patch] Remove unneeded i_spin

2008-01-11 Thread Bob Peterson
Hi,

This patch removes a vestigial variable i_spin from the gfs2_inode
structure.  This not only saves us memory (30 of these in memory
for the oom test) it also saves us time because we don't have to
spend time initializing it (i.e. slightly better performance).

Regards,

Bob Peterson
Red Hat GFS

Signed-off-by: Bob Peterson [EMAIL PROTECTED] 
--
 fs/gfs2/incore.h |1 -
 fs/gfs2/main.c   |1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index bd92a6d..1339996 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -267,7 +267,6 @@ struct gfs2_inode {
struct gfs2_alloc *i_alloc;
u64 i_last_rg_alloc;
 
-   spinlock_t i_spin;
struct rw_semaphore i_rw_mutex;
 };
 
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index 88686fc..9c7765c 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -29,7 +29,6 @@ static void gfs2_init_inode_once(struct kmem_cache *cachep, 
void *foo)
struct gfs2_inode *ip = foo;
 
inode_init_once(ip-i_inode);
-   spin_lock_init(ip-i_spin);
init_rwsem(ip-i_rw_mutex);
ip-i_alloc = NULL;
 }




[Cluster-devel] Re: [PATCH 2/2] Fix lockd panic

2008-01-11 Thread Wendy Cheng

Wendy Cheng wrote:

The point here is with this patch, f_locks it not used at all any 
more. Note that we have a nice inline function nlm_file_inuse, why 
should we use f_locks (that I assume people agree that it is awkward) 
? Could we simply drop f_locks all together in this section of code?



Start to have a second thought about this 

Removing f_locks does make the code much more readable. However, if 
inode-i_flock list is long, e.g. large amount of (clients) hosts and/or 
processes from other hosts competing for the same lock, we don't want to 
do the list walk twice within nlm_traverse_files(). Intuitively this is 
unlikely but I prefer not changing the current behavior. As the result, 
I'm withdrawing the patch all together.


The first patch will handle the issue correctly. Will submit it after 
this post.


-- Wendy