dlm_netlink.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2007 Red Hat, Inc. All rights reserved.
  3. *
  4. * This copyrighted material is made available to anyone wishing to use,
  5. * modify, copy, or redistribute it subject to the terms and conditions
  6. * of the GNU General Public License v.2.
  7. */
  8. #ifndef _DLM_NETLINK_H
  9. #define _DLM_NETLINK_H
  10. #include <linux/types.h>
  11. enum {
  12. DLM_STATUS_WAITING = 1,
  13. DLM_STATUS_GRANTED = 2,
  14. DLM_STATUS_CONVERT = 3,
  15. };
  16. #define DLM_LOCK_DATA_VERSION 1
  17. struct dlm_lock_data {
  18. __u16 version;
  19. __u32 lockspace_id;
  20. int nodeid;
  21. int ownpid;
  22. __u32 id;
  23. __u32 remid;
  24. __u64 xid;
  25. __s8 status;
  26. __s8 grmode;
  27. __s8 rqmode;
  28. unsigned long timestamp;
  29. int resource_namelen;
  30. char resource_name[DLM_RESNAME_MAXLEN];
  31. };
  32. enum {
  33. DLM_CMD_UNSPEC = 0,
  34. DLM_CMD_HELLO, /* user->kernel */
  35. DLM_CMD_TIMEOUT, /* kernel->user */
  36. __DLM_CMD_MAX,
  37. };
  38. #define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
  39. enum {
  40. DLM_TYPE_UNSPEC = 0,
  41. DLM_TYPE_LOCK,
  42. __DLM_TYPE_MAX,
  43. };
  44. #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
  45. #define DLM_GENL_VERSION 0x1
  46. #define DLM_GENL_NAME "DLM"
  47. #endif /* _DLM_NETLINK_H */