summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMikhail Pershin <mike.pershin@intel.com>2016-10-02 22:28:24 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-16 10:24:35 +0200
commitef3a1d2a82bba70f836b324137f0fa3e6c61db1c (patch)
tree0e543e0b049b6a9d10f841f151b59dd705d878a6 /drivers
parent090a648530c13adc7e27ed2bb0a6d48b66635c1f (diff)
downloadop-kernel-dev-ef3a1d2a82bba70f836b324137f0fa3e6c61db1c.zip
op-kernel-dev-ef3a1d2a82bba70f836b324137f0fa3e6c61db1c.tar.gz
staging: lustre: hsm: make HSM modification requests replayable
There are several HSM requests which modify data on server and reply on Lustre recovery, e.g. they should replay changes in case of recovery. Patch allows such requests to be replayed in recovery time and they are issued from client using mdc_rpc_lock to serialize them and avoid concurrent last_rcvd update on server. Signed-off-by: Mikhail Pershin <mike.pershin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5939 Reviewed-on: http://review.whamcloud.com/13684 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Faccini Bruno <bruno.faccini@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/lustre/lustre/mdc/mdc_request.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 7b9fb90..1d1eaa5 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1505,7 +1505,9 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp,
ptlrpc_request_set_replen(req);
- rc = mdc_queue_wait(req);
+ mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
+ rc = ptlrpc_queue_wait(req);
+ mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
out:
ptlrpc_req_finished(req);
return rc;
@@ -1683,7 +1685,9 @@ static int mdc_ioc_hsm_state_set(struct obd_export *exp,
ptlrpc_request_set_replen(req);
- rc = mdc_queue_wait(req);
+ mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
+ rc = ptlrpc_queue_wait(req);
+ mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
out:
ptlrpc_req_finished(req);
return rc;
@@ -1746,7 +1750,9 @@ static int mdc_ioc_hsm_request(struct obd_export *exp,
ptlrpc_request_set_replen(req);
- rc = mdc_queue_wait(req);
+ mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
+ rc = ptlrpc_queue_wait(req);
+ mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
out:
ptlrpc_req_finished(req);
return rc;
OpenPOWER on IntegriCloud