Whamcloud - gitweb
LU-6273 lwp: notify LWP users in dedicated thread 03/16303/8
authorNiu Yawei <yawei.niu@intel.com>
Tue, 8 Sep 2015 13:41:58 +0000 (09:41 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 22 Sep 2015 02:55:33 +0000 (02:55 +0000)
commitb1848aa5b23fd332362e9ae3d5aab31d8dd9d920
tree2a00f5a9b1fe170ba6968701d6643f50545a8663
parent676c41a210fdc40b135403cb548b3ad5fe4e8845
LU-6273 lwp: notify LWP users in dedicated thread

On OST/MDT mount, the client config log will be processed to setup
the LWP as following:

1> Process the LCFG_ADD_UUID record to setup LWP device, then connect
   to the server target. (see lustre_lwp_setup());
2> Process the LCFG_ADD_CONN record to add failover connection;

We can see that if the mount process is blocked in step 1 it will
never have a chance to add failover connection, and LWP won't be able
to switch to failover node forever.

Unfortunately, the callbacks for FLD user could block the step 1.
See ofd/mdt_register_lwp_callback() calls fld_client_rpc() which will
send FLD RPC in a deadloop if the connection isn't available.

This patch solve the problem by using a per LWP dedicated thread to
run the notify callbacks.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ic0d89f1524ea0c1a3e7fc3833e16ecbad2123454
Reviewed-on: http://review.whamcloud.com/16303
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_class.h
lustre/obdclass/obd_mount_server.c
lustre/osp/lwp_dev.c