dlm_netlink.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. enum {
  11. DLM_STATUS_WAITING = 1,
  12. DLM_STATUS_GRANTED = 2,
  13. DLM_STATUS_CONVERT = 3,
  14. };
  15. #define DLM_LOCK_DATA_VERSION 1
  16. struct dlm_lock_data {
  17. uint16_t version;
  18. uint32_t lockspace_id;
  19. int nodeid;
  20. int ownpid;
  21. uint32_t id;
  22. uint32_t remid;
  23. uint64_t xid;
  24. int8_t status;
  25. int8_t grmode;
  26. int8_t rqmode;
  27. unsigned long timestamp;
  28. int resource_namelen;
  29. char resource_name[DLM_RESNAME_MAXLEN];
  30. };
  31. enum {
  32. DLM_CMD_UNSPEC = 0,
  33. DLM_CMD_HELLO, /* user->kernel */
  34. DLM_CMD_TIMEOUT, /* kernel->user */
  35. __DLM_CMD_MAX,
  36. };
  37. #define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
  38. enum {
  39. DLM_TYPE_UNSPEC = 0,
  40. DLM_TYPE_LOCK,
  41. __DLM_TYPE_MAX,
  42. };
  43. #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
  44. #define DLM_GENL_VERSION 0x1
  45. #define DLM_GENL_NAME "DLM"
  46. #endif /* _DLM_NETLINK_H */