#include <linux/rwsem.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
+#include <linux/slab.h>
#include <linux/statfs.h>
#include <linux/string.h>
#include <linux/version.h>
Opt_wsize,
Opt_rsize,
Opt_osdtimeout,
+ Opt_osdkeepalivetimeout,
Opt_mount_timeout,
+ Opt_osd_idle_ttl,
Opt_caps_wanted_delay_min,
Opt_caps_wanted_delay_max,
Opt_readdir_max_entries,
{Opt_wsize, "wsize=%d"},
{Opt_rsize, "rsize=%d"},
{Opt_osdtimeout, "osdtimeout=%d"},
+ {Opt_osdkeepalivetimeout, "osdkeepalive=%d"},
{Opt_mount_timeout, "mount_timeout=%d"},
+ {Opt_osd_idle_ttl, "osd_idle_ttl=%d"},
{Opt_caps_wanted_delay_min, "caps_wanted_delay_min=%d"},
{Opt_caps_wanted_delay_max, "caps_wanted_delay_max=%d"},
{Opt_readdir_max_entries, "readdir_max_entries=%d"},
/* start with defaults */
args->sb_flags = flags;
args->flags = CEPH_OPT_DEFAULT;
- args->osd_timeout = 5; /* seconds */
+ args->osd_timeout = CEPH_OSD_TIMEOUT_DEFAULT;
+ args->osd_keepalive_timeout = CEPH_OSD_KEEPALIVE_DEFAULT;
args->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT; /* seconds */
+ args->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT; /* seconds */
args->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT;
args->caps_wanted_delay_max = CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT;
args->rsize = CEPH_MOUNT_RSIZE_DEFAULT;
case Opt_osdtimeout:
args->osd_timeout = intval;
break;
+ case Opt_osdkeepalivetimeout:
+ args->osd_keepalive_timeout = intval;
+ break;
case Opt_mount_timeout:
args->mount_timeout = intval;
break;
mutex_init(&client->mount_mutex);
- init_waitqueue_head(&client->mount_wq);
+ init_waitqueue_head(&client->auth_wq);
client->sb = NULL;
client->mount_state = CEPH_MOUNT_MOUNTING;
client->msgr = NULL;
- client->mount_err = 0;
+ client->auth_err = 0;
atomic_long_set(&client->writeback_count, 0);
err = bdi_init(&client->backing_dev_info);
if (!client->wb_pagevec_pool)
goto fail_trunc_wq;
+ /* caps */
+ client->min_caps = args->max_readdir;
+ ceph_adjust_min_caps(client->min_caps);
/* subsystems */
err = ceph_monc_init(&client->monc, client);
ceph_monc_stop(&client->monc);
ceph_osdc_stop(&client->osdc);
+ ceph_adjust_min_caps(-client->min_caps);
+
ceph_debugfs_client_cleanup(client);
destroy_workqueue(client->wb_wq);
destroy_workqueue(client->pg_inv_wq);
/* wait */
dout("mount waiting for mon_map\n");
- err = wait_event_interruptible_timeout(client->mount_wq, /* FIXME */
- have_mon_map(client) || (client->mount_err < 0),
+ err = wait_event_interruptible_timeout(client->auth_wq,
+ have_mon_map(client) || (client->auth_err < 0),
timeout);
if (err == -EINTR || err == -ERESTARTSYS)
goto out;
- if (client->mount_err < 0) {
- err = client->mount_err;
+ if (client->auth_err < 0) {
+ err = client->auth_err;
goto out;
}
}