Whamcloud - gitweb
LU-4879 lfsck: avoid check exp_connect_flags before connected 45/9945/2
authorFan Yong <fan.yong@intel.com>
Thu, 20 Mar 2014 13:48:41 +0000 (21:48 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 18 Apr 2014 05:46:25 +0000 (05:46 +0000)
It is possible that the connection among some MDTs and OSTs are not
ready yet when the LFSCK wants to start the scanning globally. Under
such case, the LFSCK RPC should trigger related initial connection or
recovery connection, but not check the exp_connect_flags() directly.

On the other hand, it is not important to check whether the remote
server to support the OBD_CONNECT_LFSCK or not, because if the peer
does not support the LFSCK, the lfsck_start RPC will get failure.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3b881dea23ccb7695d57ec422538f731fc77e657
Reviewed-on: http://review.whamcloud.com/9945
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/lfsck/lfsck_lib.c

index 3b1fe0c..c1304b5 100644 (file)
@@ -1615,9 +1615,6 @@ int lfsck_async_request(const struct lu_env *env, struct obd_export *exp,
        struct req_format                 *format;
        int                                rc;
 
-       if (!(exp_connect_flags(exp) & OBD_CONNECT_LFSCK))
-               return -EOPNOTSUPP;
-
        switch (request) {
        case LFSCK_NOTIFY:
                format = &RQF_LFSCK_NOTIFY;