dlm_netlink.h 1.1 KB

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