From: Mr NeilBrown Date: Fri, 6 Mar 2020 04:59:17 +0000 (+1100) Subject: LU-4198 clio: Remove pl_owner X-Git-Tag: 2.13.53~78 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e880a6fccbc57ae335949c1dd20335359b1cb220 LU-4198 clio: Remove pl_owner The pl_owner field is only used for invariant testing, but standard tests to enable that testing, so it doesn't really serve any purpose. If you do enable it, you will finx the invariant in cl_page_list_del() fails. As async-io allows completion to happen in a different thread to submission, this might not be a surprise. So let's remove the field. Sample stack trace: LustreError: 2813:0:(cl_io.c:823:cl_page_list_del()) ASSERTION( plist->pl_owner == get_current() ) failed: LustreError: 2813:0:(cl_io.c:823:cl_page_list_del()) LBUG Pid: 2813, comm: ptlrpcd_01_01 3.10.0-7.7-debug #1 SMP Fri Oct 25 00:19:37 EDT 2019 Call Trace: [] libcfs_call_trace+0x8c/0xc0 [libcfs] [] lbug_with_loc+0x4c/0xa0 [libcfs] [] cl_page_list_del+0x1c1/0x200 [obdclass] [] cl_aio_end+0x5e/0x180 [obdclass] [] cl_sync_io_note+0xa1/0x280 [obdclass] [] cl_page_completion+0xd0/0x410 [obdclass] [] osc_ap_completion.isra.29+0x169/0x4c0 [osc] [] osc_extent_finish+0x3a2/0xb10 [osc] [] brw_interpret+0x1f3/0xd60 [osc] [] ptlrpc_check_set+0x520/0x1ec0 [ptlrpc] [] ptlrpcd_check+0x48b/0x580 [ptlrpc] [] ptlrpcd+0x303/0x6c0 [ptlrpc] [] kthread+0xe4/0xf0 [] ret_from_fork_nospec_begin+0x7/0x21 [] 0xffffffffffffffff Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Icc3af742140ddc5dd31426154d578da0ba4300fe Reviewed-on: https://review.whamcloud.com/37824 Tested-by: Maloo Tested-by: jenkins Reviewed-by: Patrick Farrell Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/cl_object.h b/lustre/include/cl_object.h index 8edb653..d1e8f7a 100644 --- a/lustre/include/cl_object.h +++ b/lustre/include/cl_object.h @@ -1293,7 +1293,6 @@ do { \ struct cl_page_list { unsigned pl_nr; struct list_head pl_pages; - struct task_struct *pl_owner; }; /** diff --git a/lustre/obdclass/cl_io.c b/lustre/obdclass/cl_io.c index fdc80ae..76fe87b 100644 --- a/lustre/obdclass/cl_io.c +++ b/lustre/obdclass/cl_io.c @@ -787,7 +787,6 @@ void cl_page_list_init(struct cl_page_list *plist) ENTRY; plist->pl_nr = 0; INIT_LIST_HEAD(&plist->pl_pages); - plist->pl_owner = current; EXIT; } EXPORT_SYMBOL(cl_page_list_init); @@ -801,7 +800,6 @@ void cl_page_list_add(struct cl_page_list *plist, struct cl_page *page) /* it would be better to check that page is owned by "current" io, but * it is not passed here. */ LASSERT(page->cp_owner != NULL); - LINVRNT(plist->pl_owner == current); LASSERT(list_empty(&page->cp_batch)); list_add_tail(&page->cp_batch, &plist->pl_pages); @@ -820,7 +818,6 @@ void cl_page_list_del(const struct lu_env *env, { LASSERT(plist->pl_nr > 0); LASSERT(cl_page_is_vmlocked(env, page)); - LINVRNT(plist->pl_owner == current); ENTRY; list_del_init(&page->cp_batch); @@ -838,8 +835,6 @@ void cl_page_list_move(struct cl_page_list *dst, struct cl_page_list *src, struct cl_page *page) { LASSERT(src->pl_nr > 0); - LINVRNT(dst->pl_owner == current); - LINVRNT(src->pl_owner == current); ENTRY; list_move_tail(&page->cp_batch, &dst->pl_pages); @@ -858,8 +853,6 @@ void cl_page_list_move_head(struct cl_page_list *dst, struct cl_page_list *src, struct cl_page *page) { LASSERT(src->pl_nr > 0); - LINVRNT(dst->pl_owner == current); - LINVRNT(src->pl_owner == current); ENTRY; list_move(&page->cp_batch, &dst->pl_pages); @@ -879,8 +872,6 @@ void cl_page_list_splice(struct cl_page_list *list, struct cl_page_list *head) struct cl_page *page; struct cl_page *tmp; - LINVRNT(list->pl_owner == current); - LINVRNT(head->pl_owner == current); ENTRY; cl_page_list_for_each_safe(page, tmp, list) @@ -898,7 +889,6 @@ void cl_page_list_disown(const struct lu_env *env, struct cl_page *page; struct cl_page *temp; - LINVRNT(plist->pl_owner == current); ENTRY; cl_page_list_for_each_safe(page, temp, plist) { @@ -931,7 +921,6 @@ void cl_page_list_fini(const struct lu_env *env, struct cl_page_list *plist) struct cl_page *page; struct cl_page *temp; - LINVRNT(plist->pl_owner == current); ENTRY; cl_page_list_for_each_safe(page, temp, plist) @@ -949,7 +938,6 @@ void cl_page_list_assume(const struct lu_env *env, { struct cl_page *page; - LINVRNT(plist->pl_owner == current); cl_page_list_for_each(page, plist) cl_page_assume(env, io, page); @@ -963,7 +951,6 @@ void cl_page_list_discard(const struct lu_env *env, struct cl_io *io, { struct cl_page *page; - LINVRNT(plist->pl_owner == current); ENTRY; cl_page_list_for_each(page, plist) cl_page_discard(env, io, page);