Patchwork [BUG:1550] gluster log {rotate,filename} : uuid check for bricks

login
register
Submitter Amar Tumballi
Date 2010-09-13 12:29:55
Message ID <20100913122955.GA14178@gluster.com>
Download mbox | patch
Permalink /patch/4741/
State Accepted
Headers show

Comments

Amar Tumballi - 2010-09-13 12:29:55
Thanks to Raghavendra Bhat <raghavendrabhat@gluster.com> for 
pointing out the fix.

Signed-off-by: Amar Tumballi <amar@gluster.com>
---
 xlators/mgmt/glusterd/src/glusterd-op-sm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 7a063f6..cdec2e0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2490,6 +2490,9 @@  glusterd_op_log_filename (gd1_mgmt_stage_op_req *req)
                 goto out;
 
         list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
+                if (uuid_compare (brickinfo->uuid, priv->uuid))
+                        continue;
+
                 if (brick && strcmp (brickinfo->path, brick))
                         continue;
 
@@ -2571,6 +2574,9 @@  glusterd_op_log_rotate (gd1_mgmt_stage_op_req *req)
                 goto out;
 
         list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
+                if (uuid_compare (brickinfo->uuid, priv->uuid))
+                        continue;
+
                 if (brick && strcmp (brickinfo->path, brick))
                         continue;