Description: rewrite ext2-derived code in llite/dir.c and obdclass/uuid.c
Details : rewrite inherited code (uuid parsing code from ext2 utils and
readdir code from ext3) from scratch preserving functionality.
+
+Severity : normal
+Bugzilla : 13436
+Description: Only those disconnect error should be returned by rq_status.
+Details : In open/enqueue processs, Some errors, which will cause client
+ disconnected, should be returned by rq_status, while other
+ errors should still be returned by intent, then mdc or llite will
+ detect them.
+
--------------------------------------------------------------------------------
2007-08-27 Cluster File Systems, Inc. <info@clusterfs.com>
rep->lock_policy_res1 |= flag;
}
+#define IS_CLIENT_DISCONNECT_ERROR(error) \
+ (error == -ENOTCONN || error == -ENODEV)
+
static int mds_intent_policy(struct ldlm_namespace *ns,
struct ldlm_lock **lockp, void *req_cookie,
ldlm_mode_t mode, int flags, void *data)
/* If there was an error of some sort or if we are not
* returning any locks */
- if (rep->lock_policy_res2)
- RETURN(rep->lock_policy_res2);
- if (!intent_disposition(rep, DISP_OPEN_LOCK))
- RETURN(ELDLM_LOCK_ABORTED);
+ if (rep->lock_policy_res2 ||
+ !intent_disposition(rep, DISP_OPEN_LOCK)) {
+ /* If it is the disconnect error (ENODEV & ENOCONN)
+ * ptlrpc layer should know this imediately, it should
+ * be replied by rq_stats, otherwise, return it by
+ * intent here
+ */
+ if (IS_CLIENT_DISCONNECT_ERROR(rep->lock_policy_res2))
+ RETURN(rep->lock_policy_res2);
+ else
+ RETURN(ELDLM_LOCK_ABORTED);
+ }
break;
case IT_LOOKUP:
getattr_part = MDS_INODELOCK_LOOKUP;