@@ -30,6 +30,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <lustre_errno.h>
+#include <lustre_dlm.h>
/*
* The two translation tables below must define a one-to-one mapping between
@@ -187,6 +188,19 @@
[EBADTYPE] = LUSTRE_EBADTYPE,
[EJUKEBOX] = LUSTRE_EJUKEBOX,
[EIOCBQUEUED] = LUSTRE_EIOCBQUEUED,
+
+ /*
+ * The ELDLM errors are Lustre specific errors whose ranges
+ * lie in the middle of the above system errors. The ELDLM
+ * numbers must be preserved to avoid LU-9793.
+ */
+ [ELDLM_LOCK_CHANGED] = ELDLM_LOCK_CHANGED,
+ [ELDLM_LOCK_ABORTED] = ELDLM_LOCK_ABORTED,
+ [ELDLM_LOCK_REPLACED] = ELDLM_LOCK_REPLACED,
+ [ELDLM_NO_LOCK_DATA] = ELDLM_NO_LOCK_DATA,
+ [ELDLM_LOCK_WOULDBLOCK] = ELDLM_LOCK_WOULDBLOCK,
+ [ELDLM_NAMESPACE_EXISTS] = ELDLM_NAMESPACE_EXISTS,
+ [ELDLM_BAD_NAMESPACE] = ELDLM_BAD_NAMESPACE,
};
static int lustre_errno_ntoh_mapping[] = {
@@ -333,6 +347,19 @@
[LUSTRE_EBADTYPE] = EBADTYPE,
[LUSTRE_EJUKEBOX] = EJUKEBOX,
[LUSTRE_EIOCBQUEUED] = EIOCBQUEUED,
+
+ /*
+ * The ELDLM errors are Lustre specific errors whose ranges
+ * lie in the middle of the above system errors. The ELDLM
+ * numbers must be preserved to avoid LU-9793.
+ */
+ [ELDLM_LOCK_CHANGED] = ELDLM_LOCK_CHANGED,
+ [ELDLM_LOCK_ABORTED] = ELDLM_LOCK_ABORTED,
+ [ELDLM_LOCK_REPLACED] = ELDLM_LOCK_REPLACED,
+ [ELDLM_NO_LOCK_DATA] = ELDLM_NO_LOCK_DATA,
+ [ELDLM_LOCK_WOULDBLOCK] = ELDLM_LOCK_WOULDBLOCK,
+ [ELDLM_NAMESPACE_EXISTS] = ELDLM_NAMESPACE_EXISTS,
+ [ELDLM_BAD_NAMESPACE] = ELDLM_BAD_NAMESPACE,
};
unsigned int lustre_errno_hton(unsigned int h)