#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)
};
/*
- * 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;
};