From 893e5a99e766ab97e95217b7b201b9d293bed6e0 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 27 Feb 2018 21:50:23 -0500 Subject: [PATCH] LU-4423 lov: use correct env in lov_io_data_version_end() lov - the logical object volume manager - is responsible for striping data across multiple volumes. So when it is given a request, it creates one or more sub-requests, one for each target volume. Each sub_io request has a sub_env environment which it operates in. When lov_io_data_version_end() calls lov_io_end_wrapper() to wait for and close off a sub_io, it passes the wrong environment. This causes an LINVRNT() to fail in cl2osc_io(), and may cause other problems. This patch changes the call to use ->sub_env, much like other code in the same file. Change-Id: Id120929f4189196232d18103007e45ba89195fff Fixes: fcd45488711a (LU-5683 clio: add CIT_DATA_VERSION) Signed-off-by: NeilBrown Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/31418 Reviewed-by: Jinshan Xiong Reviewed-by: Bobi Jam Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/lov/lov_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/lov/lov_io.c b/lustre/lov/lov_io.c index 4c4f32f..7ac4590f 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -956,7 +956,7 @@ lov_io_data_version_end(const struct lu_env *env, const struct cl_io_slice *ios) list_for_each_entry(sub, &lio->lis_active, sub_linkage) { struct cl_data_version_io *sdv = &sub->sub_io.u.ci_data_version; - lov_io_end_wrapper(env, &sub->sub_io); + lov_io_end_wrapper(sub->sub_env, &sub->sub_io); pdv->dv_data_version += sdv->dv_data_version; if (pdv->dv_layout_version > sdv->dv_layout_version) -- 1.8.3.1