flexfilelayoutxdr.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2016 Tom Haynes <loghyr@primarydata.com>
  3. */
  4. #ifndef _NFSD_FLEXFILELAYOUTXDR_H
  5. #define _NFSD_FLEXFILELAYOUTXDR_H 1
  6. #include <linux/inet.h>
  7. #include "xdr4.h"
  8. #define FF_FLAGS_NO_LAYOUTCOMMIT 1
  9. #define FF_FLAGS_NO_IO_THRU_MDS 2
  10. #define FF_FLAGS_NO_READ_IO 4
  11. struct xdr_stream;
  12. #define FF_NETID_LEN (4)
  13. #define FF_ADDR_LEN (INET6_ADDRSTRLEN + 8)
  14. struct pnfs_ff_netaddr {
  15. char netid[FF_NETID_LEN + 1];
  16. char addr[FF_ADDR_LEN + 1];
  17. u32 netid_len;
  18. u32 addr_len;
  19. };
  20. struct pnfs_ff_device_addr {
  21. struct pnfs_ff_netaddr netaddr;
  22. u32 version;
  23. u32 minor_version;
  24. u32 rsize;
  25. u32 wsize;
  26. bool tightly_coupled;
  27. };
  28. struct pnfs_ff_layout {
  29. u32 flags;
  30. u32 stats_collect_hint;
  31. kuid_t uid;
  32. kgid_t gid;
  33. struct nfsd4_deviceid deviceid;
  34. stateid_t stateid;
  35. struct nfs_fh fh;
  36. };
  37. __be32 nfsd4_ff_encode_getdeviceinfo(struct xdr_stream *xdr,
  38. struct nfsd4_getdeviceinfo *gdp);
  39. __be32 nfsd4_ff_encode_layoutget(struct xdr_stream *xdr,
  40. struct nfsd4_layoutget *lgp);
  41. #endif /* _NFSD_FLEXFILELAYOUTXDR_H */