Whamcloud - gitweb
LU-5370 mdt: return -MDT_EREMOTE_OPEN for remote open
[fs/lustre-release.git] / lustre / mdt / mdt_internal.h
index dbfb7c5..75127e3 100644 (file)
@@ -307,6 +307,13 @@ enum {
         MDT_CROSS_LOCK
 };
 
+/* Special magical errno for communicaiton between mdt_reint_open()
+ * and mdt_intent_reint() which means return the lock to the client
+ * for subsequent cross ref open. Previously we used plain -EREMOTE
+ * but other functions called in that path might return it too and
+ * confuse us. This is not returned to the client. See LU-5370. */
+#define MDT_EREMOTE_OPEN (EREMOTE + 1024)
+
 struct mdt_reint_record {
        mdt_reint_t                      rr_opcode;
        const struct lustre_handle      *rr_handle;
@@ -594,11 +601,9 @@ static inline bool mdt_is_dne_client(struct obd_export *exp)
        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;
+       return exp_connect_flags(exp) & OBD_CONNECT_DIR_STRIPE;
 }
 
 int mdt_get_disposition(struct ldlm_reply *rep, int flag);