aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2010-02-26 18:32:31 -0500
committerSage Weil <sage@newdream.net>2010-03-04 14:26:35 -0500
commit422d2cb8f9afadba1ecd3614f658b6daaaa480fb (patch)
tree22e1a61acdbbe1459b190c4dbb6019360464b2e9 /fs/ceph/super.c
parente9964c102312967a4bc1fd501cb628c4a3b19034 (diff)
ceph: reset osd after relevant messages timed out
This simplifies the process of timing out messages. We keep lru of current messages that are in flight. If a timeout has passed, we reset the osd connection, so that messages will be retransmitted. This is a failsafe in case we hit some sort of problem sending out message to the OSD. Normally, we'll get notification via an updated osdmap if there are problems. If a request is older than the keepalive timeout, send a keepalive to ensure we detect any breaks in the TCP connection. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 74953be75f8f..4290a6e860b0 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -292,6 +292,7 @@ enum {
292 Opt_wsize, 292 Opt_wsize,
293 Opt_rsize, 293 Opt_rsize,
294 Opt_osdtimeout, 294 Opt_osdtimeout,
295 Opt_osdkeepalivetimeout,
295 Opt_mount_timeout, 296 Opt_mount_timeout,
296 Opt_osd_idle_ttl, 297 Opt_osd_idle_ttl,
297 Opt_caps_wanted_delay_min, 298 Opt_caps_wanted_delay_min,
@@ -322,6 +323,7 @@ static match_table_t arg_tokens = {
322 {Opt_wsize, "wsize=%d"}, 323 {Opt_wsize, "wsize=%d"},
323 {Opt_rsize, "rsize=%d"}, 324 {Opt_rsize, "rsize=%d"},
324 {Opt_osdtimeout, "osdtimeout=%d"}, 325 {Opt_osdtimeout, "osdtimeout=%d"},
326 {Opt_osdkeepalivetimeout, "osdkeepalive=%d"},
325 {Opt_mount_timeout, "mount_timeout=%d"}, 327 {Opt_mount_timeout, "mount_timeout=%d"},
326 {Opt_osd_idle_ttl, "osd_idle_ttl=%d"}, 328 {Opt_osd_idle_ttl, "osd_idle_ttl=%d"},
327 {Opt_caps_wanted_delay_min, "caps_wanted_delay_min=%d"}, 329 {Opt_caps_wanted_delay_min, "caps_wanted_delay_min=%d"},
@@ -367,7 +369,8 @@ static struct ceph_mount_args *parse_mount_args(int flags, char *options,
367 /* start with defaults */ 369 /* start with defaults */
368 args->sb_flags = flags; 370 args->sb_flags = flags;
369 args->flags = CEPH_OPT_DEFAULT; 371 args->flags = CEPH_OPT_DEFAULT;
370 args->osd_timeout = 5; /* seconds */ 372 args->osd_timeout = CEPH_OSD_TIMEOUT_DEFAULT;
373 args->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT;
371 args->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; /* seconds */ 374 args->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; /* seconds */
372 args->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; /* seconds */ 375 args->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; /* seconds */
373 args->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT; 376 args->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT;
@@ -468,6 +471,9 @@ static struct ceph_mount_args *parse_mount_args(int flags, char *options,
468 case Opt_osdtimeout: 471 case Opt_osdtimeout:
469 args->osd_timeout = intval; 472 args->osd_timeout = intval;
470 break; 473 break;
474 case Opt_osdkeepalivetimeout:
475 args->osd_keepalive_timeout = intval;
476 break;
471 case Opt_mount_timeout: 477 case Opt_mount_timeout:
472 args->mount_timeout = intval; 478 args->mount_timeout = intval;
473 break; 479 break;