/*
* any type that can't be simply compared or doesn't need need
@@ -72,6 +73,7 @@ struct ceph_options {
#define CEPH_OSD_KEEPALIVE_DEFAULT msecs_to_jiffies(5 * 1000)
#define CEPH_OSD_IDLE_TTL_DEFAULT msecs_to_jiffies(60 * 1000)
#define CEPH_OSD_REQUEST_TIMEOUT_DEFAULT 0 /* no timeout */
+#define CEPH_OSDC_ABORT_ON_FULL_DEFAULT false
#define CEPH_MONC_HUNT_INTERVAL msecs_to_jiffies(3 * 1000)
#define CEPH_MONC_PING_INTERVAL msecs_to_jiffies(10 * 1000)
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index 87afb9e..e86ce76 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -255,6 +255,7 @@ enum {
Opt_nocephx_sign_messages,
Opt_tcp_nodelay,
Opt_notcp_nodelay,
+ Opt_abort_on_full,
};
static match_table_t opt_tokens = {
@@ -280,6 +281,7 @@ enum {
{Opt_nocephx_sign_messages, "nocephx_sign_messages"},
{Opt_tcp_nodelay, "tcp_nodelay"},
{Opt_notcp_nodelay, "notcp_nodelay"},
+ {Opt_abort_on_full, "abort_on_full"},
{-1, NULL}
};
@@ -369,6 +371,7 @@ struct ceph_options *
opt->mount_timeout = CEPH_MOUNT_TIMEOUT_DEFAULT;
opt->osd_idle_ttl = CEPH_OSD_IDLE_TTL_DEFAULT;
opt->osd_request_timeout = CEPH_OSD_REQUEST_TIMEOUT_DEFAULT;
+ opt->abort_on_full = CEPH_OSDC_ABORT_ON_FULL_DEFAULT;
/* get mon ip(s) */
/* ip1[:port1][,ip2[:port2]...] */
@@ -535,6 +538,10 @@ struct ceph_options *
opt->flags &= ~CEPH_OPT_TCP_NODELAY;
break;
+ case Opt_abort_on_full:
+ opt->abort_on_full = true;
+ break;
+
default:
BUG_ON(token);
}
@@ -587,6 +594,8 @@ int ceph_print_client_options(struct seq_file *m,
struct ceph_client *client)
if (opt->osd_request_timeout != CEPH_OSD_REQUEST_TIMEOUT_DEFAULT)
seq_printf(m, "osd_request_timeout=%d,",
jiffies_to_msecs(opt->osd_request_timeout) / 1000);
+ if (opt->abort_on_full != CEPH_OSDC_ABORT_ON_FULL_DEFAULT)
+ seq_puts(m, "abort_on_full,");
/* drop redundant comma */
if (m->count != pos)
@@ -653,6 +662,7 @@ struct ceph_client *ceph_create_client(struct
ceph_options *opt, void *private)
if (err < 0)
goto fail_monc;
+ client->osdc.abort_on_full = opt->abort_on_full;
return client;
fail_monc: