]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Make g_conf.osd_max_notify_timeout a uint32_t
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 4 Jan 2011 00:11:33 +0000 (16:11 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 4 Jan 2011 00:14:24 +0000 (16:14 -0800)
Make g_conf.osd_max_notify_timeout a uint32_t. Squashes an annoying
compiler warning and avoids the awkward issue of users specifying
negative timeouts.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/config.cc
src/config.h

index cf0333511bb008bc1eeb4fb018d931940ea23895..c32709a3bb19007af97493d2546895830aa88010 100644 (file)
@@ -1081,6 +1081,9 @@ int conf_read_key_ext(const char *conf_name, const char *conf_alt_name, const ch
         exit(1);
       }
       break;
+    case OPT_U32:
+      OPT_READ_TYPE(ret, section, key, uint32_t, out, def);
+      break;
     default:
        ret = 0;
         break;
index 832e63312a2fe00b3c1d0bc738a20b39debf78f8..9c35301db7fe470ebdda451fb7163e8a7cd9207c 100644 (file)
@@ -410,7 +410,7 @@ struct md_config_t {
 
   bool osd_use_stale_snap;
 
-  int osd_max_notify_timeout;
+  uint32_t osd_max_notify_timeout;
 
   // filestore
   bool filestore;
@@ -483,7 +483,7 @@ extern md_config_t g_conf;
 
 typedef enum {
        OPT_NONE, OPT_INT, OPT_LONGLONG, OPT_STR, OPT_DOUBLE, OPT_FLOAT, OPT_BOOL,
-       OPT_ADDR
+       OPT_ADDR, OPT_U32
 } opt_type_t;
 
 /**