Whamcloud - gitweb
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>