Add an obd_import parameter ("allow_intr") to make all requests from a
given import interruptible. Remove hot-pools test_16() from
ALWAYS_EXCEPT.
Remove the unconditional setting of allow_intr added by EX-3749 mdc:
non blocking close and changelog release.
Lustre-change: https://review.whamcloud.com/45005
Lustre-commit:
c5803ee670b57d05568f4c0ef527be6977772540
Test-Parameters: trivial testlist=hot-pools env=ONLY=16,ONLY_REPEAT=20
Change-Id: Ibc258a0e89dab204f2a10ba29e3eea19030ad444
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45129
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lprocfs_evict_client_seq_write(struct file *file, const char __user *buffer,
size_t count, loff_t *off);
#endif
+ssize_t allow_intr_show(struct kobject *kobj, struct attribute *attr,
+ char *buf);
+ssize_t allow_intr_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count);
+
ssize_t ping_store(struct kobject *kobj, struct attribute *attr,
const char *buffer, size_t count);
ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
/* grant shrink disabled */
imp_grant_shrink_disabled:1,
/* to supress LCONSOLE() at conn.restore */
- imp_was_idle:1;
+ imp_was_idle:1,
+ /* set rq_allow_intr on all requests for this import */
+ imp_allow_intr:1;
u32 imp_connect_op;
u32 imp_idle_timeout;
u32 imp_idle_debug;
}
LUSTRE_RW_ATTR(active);
+LUSTRE_RW_ATTR(allow_intr);
+
static ssize_t max_rpcs_in_flight_show(struct kobject *kobj,
struct attribute *attr,
char *buf)
static struct attribute *mdc_attrs[] = {
&lustre_attr_active.attr,
+ &lustre_attr_allow_intr.attr,
&lustre_attr_checksums.attr,
&lustre_attr_checksum_dump.attr,
&lustre_attr_max_rpcs_in_flight.attr,
GOTO(out, rc = -ENOMEM);
}
- req->rq_allow_intr = 1;
-
if (u32_count > 0)
req_capsule_set_size(&req->rq_pill, &RMF_U32, RCL_CLIENT,
u32_count * sizeof(__u32));
}
LUSTRE_RW_ATTR(active);
+LUSTRE_RW_ATTR(allow_intr);
+
static ssize_t max_rpcs_in_flight_show(struct kobject *kobj,
struct attribute *attr,
char *buf)
static struct attribute *osc_attrs[] = {
&lustre_attr_active.attr,
+ &lustre_attr_allow_intr.attr,
&lustre_attr_checksums.attr,
&lustre_attr_checksum_dump.attr,
&lustre_attr_cur_dirty_bytes.attr,
}
}
+ if (imp->imp_allow_intr)
+ request->rq_allow_intr = 1;
+
req_capsule_init(&request->rq_pill, request, RCL_CLIENT);
req_capsule_set(&request->rq_pill, format);
return request;
if (!req)
GOTO(out, rc = -ENOMEM);
- req->rq_allow_intr = 1;
-
if (name)
req_capsule_set_size(&req->rq_pill, &RMF_NAME, RCL_CLIENT,
strlen(name) + 1);
if (!req)
GOTO(err_exit, rc = -ENOMEM);
- req->rq_allow_intr = 1;
-
body = req_capsule_client_get(&req->rq_pill, &RMF_LLOGD_BODY);
body->lgd_logid = loghandle->lgh_id;
body->lgd_ctxt_idx = loghandle->lgh_ctxt->loc_idx - 1;
if (!req)
GOTO(err_exit, rc = -ENOMEM);
- req->rq_allow_intr = 1;
-
body = req_capsule_client_get(&req->rq_pill, &RMF_LLOGD_BODY);
body->lgd_logid = loghandle->lgh_id;
body->lgd_ctxt_idx = loghandle->lgh_ctxt->loc_idx - 1;
if (!req)
GOTO(err_exit, rc = -ENOMEM);
- req->rq_allow_intr = 1;
-
body = req_capsule_client_get(&req->rq_pill, &RMF_LLOGD_BODY);
body->lgd_logid = handle->lgh_id;
body->lgd_ctxt_idx = handle->lgh_ctxt->loc_idx - 1;
}
EXPORT_SYMBOL(ptlrpc_lprocfs_unregister_obd);
+ssize_t allow_intr_show(struct kobject *kobj, struct attribute *attr,
+ char *buf)
+{
+ struct obd_device *obd = container_of(kobj, struct obd_device,
+ obd_kset.kobj);
+ struct obd_import *imp;
+ ssize_t rc;
+
+ with_imp_locked(obd, imp, rc)
+ rc = snprintf(buf, PAGE_SIZE, "%d\n", (int)imp->imp_allow_intr);
+
+ return rc;
+}
+EXPORT_SYMBOL(allow_intr_show);
+
+ssize_t allow_intr_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count)
+{
+ struct obd_device *obd = container_of(kobj, struct obd_device,
+ obd_kset.kobj);
+ struct obd_import *imp;
+ bool val;
+ int rc;
+
+ rc = kstrtobool(buffer, &val);
+ if (rc)
+ return rc;
+
+ with_imp_locked(obd, imp, rc)
+ imp->imp_allow_intr = val;
+
+ return count;
+}
+EXPORT_SYMBOL(allow_intr_store);
+
ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
char *buffer)
{
facet=${LAMIGO_MDT_FACET[0]}
pid_file=${LAMIGO_PIDFILE[0]}
+ do_facet $facet lctl set_param "mdc.*.allow_intr=1" "osc.*.allow_intr=1"
+
start_one_lamigo_cmd
start_pid=$!
echo "start_pid = '${start_pid}'" >&2
check_one_lamigo_is_started || error "failed to start lamigo"
stop $facet
- do_facet $facet "pkill --pidfile=${pid_file} lamigo"
+
+ # XXX Double kill needed to interrupt close RPCs from do_exit().
+ # XXX This doesn't work when -TERM is used in both pkills.
+ do_facet $facet "pkill -TERM --pidfile=${pid_file} lamigo"
+ sleep 10
+ do_facet $facet "pkill -KILL --pidfile=${pid_file} lamigo"
wait ${start_pid}
status=$?