Whamcloud - gitweb
LU-2110 mount: do not start osp twice
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Mon, 8 Oct 2012 19:31:20 +0000 (23:31 +0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 9 Oct 2012 05:44:42 +0000 (01:44 -0400)
failover nid can be added under the same marker as the
main device setup block. so do not call lustre_osp_setup()
on a subsequent LCFG_ADD_UUID command in the config.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ic4858812e942f73dd264dca5e33b27d51509f670
Reviewed-on: http://review.whamcloud.com/4227
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lustre/obdclass/obd_mount.c

index 4c82860..865b451 100644 (file)
@@ -1286,6 +1286,9 @@ static int client_osp_config_process(const struct lu_env *env,
        case LCFG_ADD_UUID: {
                if (clli->cfg_flags == CFG_F_MARKER) {
                        rc = lustre_osp_setup(lcfg, lsi);
        case LCFG_ADD_UUID: {
                if (clli->cfg_flags == CFG_F_MARKER) {
                        rc = lustre_osp_setup(lcfg, lsi);
+                       /* XXX: process only the first nid as
+                        * we don't need another instance of osp */
+                       clli->cfg_flags |= CFG_F_SKIP;
                } else if (clli->cfg_flags == (CFG_F_MARKER | CFG_F_SKIP)) {
                        rc = class_add_uuid(lustre_cfg_string(lcfg, 1),
                                        lcfg->lcfg_nid);
                } else if (clli->cfg_flags == (CFG_F_MARKER | CFG_F_SKIP)) {
                        rc = class_add_uuid(lustre_cfg_string(lcfg, 1),
                                        lcfg->lcfg_nid);