summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorHarshavardhana <harsha@zresearch.com>2009-02-19 04:59:29 -0800
committerAnand V. Avati <avati@amp.gluster.com>2009-02-21 21:14:47 +0530
commita7b514ab8ec879a67e5a290743b4be6f0b58de1d (patch)
tree52054f968eba124059b2ec92d88fe246603f7753 /xlators
parenta2131aeafa94d671b0121631922d823c8a7ab988 (diff)
command line and mount/fuse now use float attr/entry timeouts
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 8e70558782d..43d3af76ac5 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -70,8 +70,8 @@ struct fuse_private {
pthread_t fuse_thread;
char fuse_thread_started;
uint32_t direct_io_mode;
- uint32_t entry_timeout;
- uint32_t attribute_timeout;
+ double entry_timeout;
+ double attribute_timeout;
};
typedef struct fuse_private fuse_private_t;
@@ -2720,15 +2720,15 @@ init (xlator_t *this_xl)
priv->mount_point = strdup (value_string);
- ret = dict_get_uint32 (options, "attribute-timeout",
+ ret = dict_get_double (options, "attribute-timeout",
&priv->attribute_timeout);
if (!priv->attribute_timeout)
- priv->attribute_timeout = 1; /* default */
+ priv->attribute_timeout = 1.0; /* default */
- ret = dict_get_uint32 (options, "entry-timeout",
+ ret = dict_get_double (options, "entry-timeout",
&priv->entry_timeout);
if (!priv->entry_timeout)
- priv->entry_timeout = 1; /* default */
+ priv->entry_timeout = 1.0; /* default */
priv->direct_io_mode = 1;
@@ -2846,14 +2846,10 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_PATH
},
{ .key = {"attribute-timeout"},
- .type = GF_OPTION_TYPE_TIME,
- .min = 0,
- .max = 3600
+ .type = GF_OPTION_TYPE_DOUBLE
},
{ .key = {"entry-timeout"},
- .type = GF_OPTION_TYPE_TIME,
- .min = 0,
- .max = 3600
+ .type = GF_OPTION_TYPE_DOUBLE
},
{ .key = {NULL} },
};