LU-8066 obdclass: don't copy ops structures in to new type.
The obd_ops and md_ops structures passed to class_register_type() are
read-only, and have a lifetime that is exceeds the lifetime of the
obd_type - they are static in a module which unregisters the type before
being unloaded.
So there is no need to copy the ops, just store a pointer.
Also mark all the structures as read-only to confirm they don't get
written. This is best-practice for structures of function pointers.
Linux-commit:
2233f57f1b95b9a85a3129ddcc2860ddbc4c2a94
Signed-off-by: NeilBrown <neilb@suse.com>
Change-Id: Id0be1477925e0c878e3edb6a9d892f3c89a8b19b
Reviewed-on: https://review.whamcloud.com/35687
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>