[DRBD-cvs] svn commit by phil - r2123 - in trunk: drbd user - *
Fixed two bugs with the expansion of the options from
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Thu Mar 16 17:54:10 CET 2006
Author: phil
Date: 2006-03-16 17:54:09 +0100 (Thu, 16 Mar 2006)
New Revision: 2123
Modified:
trunk/drbd/drbd_main.c
trunk/drbd/drbd_receiver.c
trunk/user/drbdadm_main.c
Log:
* Fixed two bugs with the expansion of the options from the common
section in drbdadm.
* Made it to compile on Linux-2.6.16-rc6 by disabling the barrier
code for now.
* Made the md_sync timeout from one second to 5 seconds.
Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c 2006-03-14 10:48:59 UTC (rev 2122)
+++ trunk/drbd/drbd_main.c 2006-03-16 16:54:09 UTC (rev 2123)
@@ -2556,12 +2556,12 @@
* drbd_md_mark_dirty:
* Call this function if you change enything that should be written to
* the meta-data super block. This function sets MD_DIRTY, and starts a
- * timer that ensures that within one second you have to call drbd_md_sync().
+ * timer that ensures that within five seconds you have to call drbd_md_sync().
*/
void drbd_md_mark_dirty(drbd_dev *mdev)
{
set_bit(MD_DIRTY,&mdev->flags);
- mod_timer(&mdev->md_sync_timer,jiffies + HZ );
+ mod_timer(&mdev->md_sync_timer,jiffies + 5*HZ );
}
static void drbd_uuid_move_history(drbd_dev *mdev)
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2006-03-14 10:48:59 UTC (rev 2122)
+++ trunk/drbd/drbd_receiver.c 2006-03-16 16:54:09 UTC (rev 2123)
@@ -1796,6 +1796,7 @@
STATIC void drbd_setup_order_type(drbd_dev *mdev, int peer)
{
+#if 0
int self = drbd_queue_order_type(mdev);
int type;
@@ -1824,6 +1825,7 @@
order_txt[type]);
blk_queue_ordered(mdev->rq_queue,type);
}
+#endif
}
/* warn if the arguments differ by more than 12.5% */
Modified: trunk/user/drbdadm_main.c
===================================================================
--- trunk/user/drbdadm_main.c 2006-03-14 10:48:59 UTC (rev 2122)
+++ trunk/user/drbdadm_main.c 2006-03-16 16:54:09 UTC (rev 2123)
@@ -436,8 +436,8 @@
if(!find_opt(*opts,co->name)) {
// prepend new item to opts
no = malloc(sizeof(struct d_option));
- no->name=strdup(co->name);
- no->value=strdup(co->value);
+ no->name = strdup(co->name);
+ no->value = co->value ? strdup(co->value) : NULL ;
no->next = *opts;
*opts = no;
}
@@ -1547,12 +1547,13 @@
if (optind + 1 > argc && !is_dump)
print_usage_and_exit("missing arguments"); // arguments missing.
+ if(!is_dump) expand_common();
+
if ( optind==argc || !strcmp(argv[optind],"all") ) {
if (is_dump) {
dump_global_info();
dump_common_info();
} else {
- expand_common(); // Propagate common options to resources.
global_validate();
if(!config_valid) exit(E_config_invalid);
}
More information about the drbd-cvs
mailing list