vserver 1.9.5.x5
[linux-2.6.git] / include / linux / lockd / xdr.h
index ef14dbd..d7a5cc4 100644 (file)
 #include <linux/nfs.h>
 #include <linux/sunrpc/xdr.h>
 
+#define NLM_MAXCOOKIELEN       32
 #define NLM_MAXSTRLEN          1024
 
-#define QUADLEN(len)           (((len) + 3) >> 2)
-
 #define        nlm_granted             __constant_htonl(NLM_LCK_GRANTED)
 #define        nlm_lck_denied          __constant_htonl(NLM_LCK_DENIED)
 #define        nlm_lck_denied_nolocks  __constant_htonl(NLM_LCK_DENIED_NOLOCKS)
@@ -33,13 +32,14 @@ struct nlm_lock {
 };
 
 /*
- *     NLM cookies. Technically they can be 1K, Nobody uses over 8 bytes
- *     however.
+ *     NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes.
+ *     FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to
+ *     32 bytes.
  */
  
 struct nlm_cookie
 {
-       unsigned char data[8];
+       unsigned char data[NLM_MAXCOOKIELEN];
        unsigned int len;
 };