[Ocfs2-tools-commits] jlbec commits r1050 - trunk/o2cb_ctl

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Aug 17 19:35:10 CDT 2005


Author: jlbec
Date: 2005-08-17 19:35:09 -0500 (Wed, 17 Aug 2005)
New Revision: 1050

Modified:
   trunk/o2cb_ctl/o2cb_ctl.c
Log:

o Don't rewrite the O2CB config if we haven't changed anything.  Not
  really a bug, but it can bite us.



Modified: trunk/o2cb_ctl/o2cb_ctl.c
===================================================================
--- trunk/o2cb_ctl/o2cb_ctl.c	2005-08-16 21:55:43 UTC (rev 1049)
+++ trunk/o2cb_ctl/o2cb_ctl.c	2005-08-18 00:35:09 UTC (rev 1050)
@@ -67,6 +67,7 @@
     GList *oc_objects;
     GList *oc_attrs;
     gboolean oc_compact_info;
+    gboolean oc_changed;
     gboolean oc_modify_running;
     O2CBConfig *oc_config;
 };
@@ -987,6 +988,7 @@
         rc = o2cb_cluster_set_name(cluster, val);
         if (rc)
             return rc;
+        ctxt->oc_changed = TRUE;
     }
     /* FIXME: Should perhaps store config before changing online info */
     if (attr_set(ctxt, "online"))
@@ -1083,7 +1085,8 @@
         goto out_error;
     }
 
-    rc = write_config(ctxt);
+    if (ctxt->oc_changed)
+        rc = write_config(ctxt);
 
 out_error:
     return rc;
@@ -1355,7 +1358,7 @@
 
 out_error:
     return rc;
-}  /* run_change() */
+}  /* run_create() */
 
 gint main(gint argc, gchar *argv[])
 {



More information about the Ocfs2-tools-commits mailing list