Whamcloud - gitweb
LU-4843 mdt: disallow old clients access striped dir
[fs/lustre-release.git] / lustre / mdt / mdt_internal.h
index d1a3b66..de5bd8f 100644 (file)
@@ -589,11 +589,18 @@ static inline void mdt_export_evict(struct obd_export *exp)
 
 /* Here we use LVB_TYPE to check dne client, because it is
  * also landed on 2.4. */
 
 /* Here we use LVB_TYPE to check dne client, because it is
  * also landed on 2.4. */
-static inline int mdt_is_dne_client(struct obd_export *exp)
+static inline bool mdt_is_dne_client(struct obd_export *exp)
 {
        return !!(exp_connect_flags(exp) & OBD_CONNECT_LVB_TYPE);
 }
 
 {
        return !!(exp_connect_flags(exp) & OBD_CONNECT_LVB_TYPE);
 }
 
+/* Here we use OBD_CONNECT_DISP_STRIPE to check the client who support
+ * striped directory, because it is also landed on 2.6 */
+static inline bool mdt_is_striped_client(struct obd_export *exp)
+{
+       return exp_connect_flags(exp) & OBD_CONNECT_DISP_STRIPE;
+}
+
 int mdt_get_disposition(struct ldlm_reply *rep, int flag);
 void mdt_set_disposition(struct mdt_thread_info *info,
                         struct ldlm_reply *rep, int flag);
 int mdt_get_disposition(struct ldlm_reply *rep, int flag);
 void mdt_set_disposition(struct mdt_thread_info *info,
                         struct ldlm_reply *rep, int flag);