xfs_vfsops_bhv.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #include "xfs_linux.h"
  2. #include "xfs_vfsops.h"
  3. #include "xfs_inum.h"
  4. #include "xfs_dmapi.h"
  5. #include "xfs_sb.h"
  6. #include "xfs_log.h"
  7. #include "xfs_trans.h"
  8. #include "xfs_ag.h"
  9. #include "xfs_mount.h"
  10. STATIC int
  11. xfs_bhv_mount(
  12. struct bhv_desc *bhvp,
  13. struct xfs_mount_args *args,
  14. cred_t *credp)
  15. {
  16. return xfs_mount(XFS_BHVTOM(bhvp), args, credp);
  17. }
  18. STATIC int
  19. xfs_bhv_unmount(
  20. bhv_desc_t *bdp,
  21. int flags,
  22. cred_t *credp)
  23. {
  24. return xfs_unmount(XFS_BHVTOM(bdp), flags, credp);
  25. }
  26. STATIC int
  27. xfs_bhv_mntupdate(
  28. bhv_desc_t *bdp,
  29. int *flags,
  30. struct xfs_mount_args *args)
  31. {
  32. return xfs_mntupdate(XFS_BHVTOM(bdp), flags, args);
  33. }
  34. STATIC int
  35. xfs_bhv_root(
  36. bhv_desc_t *bdp,
  37. bhv_vnode_t **vpp)
  38. {
  39. return xfs_root(XFS_BHVTOM(bdp), vpp);
  40. }
  41. STATIC int
  42. xfs_bhv_statvfs(
  43. bhv_desc_t *bdp,
  44. bhv_statvfs_t *statp,
  45. bhv_vnode_t *vp)
  46. {
  47. return xfs_statvfs(XFS_BHVTOM(bdp), statp, vp);
  48. }
  49. STATIC int
  50. xfs_bhv_sync(
  51. bhv_desc_t *bdp,
  52. int flags,
  53. cred_t *credp)
  54. {
  55. return xfs_sync(XFS_BHVTOM(bdp), flags);
  56. }
  57. STATIC int
  58. xfs_bhv_vget(
  59. bhv_desc_t *bdp,
  60. bhv_vnode_t **vpp,
  61. fid_t *fidp)
  62. {
  63. return xfs_vget(XFS_BHVTOM(bdp), vpp, fidp);
  64. }
  65. STATIC int
  66. xfs_bhv_parseargs(
  67. struct bhv_desc *bhv,
  68. char *options,
  69. struct xfs_mount_args *args,
  70. int update)
  71. {
  72. return xfs_parseargs(XFS_BHVTOM(bhv), options, args, update);
  73. }
  74. STATIC int
  75. xfs_bhv_showargs(
  76. struct bhv_desc *bhv,
  77. struct seq_file *m)
  78. {
  79. return xfs_showargs(XFS_BHVTOM(bhv), m);
  80. }
  81. STATIC void
  82. xfs_bhv_freeze(
  83. bhv_desc_t *bdp)
  84. {
  85. return xfs_freeze(XFS_BHVTOM(bdp));
  86. }
  87. STATIC void
  88. xfs_bhv_force_shutdown(
  89. bhv_desc_t *bdp,
  90. int flags,
  91. char *fname,
  92. int lnnum)
  93. {
  94. return xfs_do_force_shutdown(XFS_BHVTOM(bdp), flags, fname, lnnum);
  95. }
  96. STATIC struct inode *
  97. xfs_bhv_get_inode(
  98. bhv_desc_t *bdp,
  99. xfs_ino_t ino,
  100. int flags)
  101. {
  102. return xfs_get_inode(XFS_BHVTOM(bdp), ino, flags);
  103. }
  104. STATIC void
  105. xfs_bhv_initialize_vnode(
  106. bhv_desc_t *bdp,
  107. bhv_vnode_t *vp,
  108. struct xfs_inode *ip,
  109. int unlock)
  110. {
  111. return xfs_initialize_vnode(XFS_BHVTOM(bdp), vp, ip, unlock);
  112. }
  113. bhv_vfsops_t xfs_vfsops = {
  114. BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS),
  115. .vfs_parseargs = xfs_bhv_parseargs,
  116. .vfs_showargs = xfs_bhv_showargs,
  117. .vfs_mount = xfs_bhv_mount,
  118. .vfs_unmount = xfs_bhv_unmount,
  119. .vfs_mntupdate = xfs_bhv_mntupdate,
  120. .vfs_root = xfs_bhv_root,
  121. .vfs_statvfs = xfs_bhv_statvfs,
  122. .vfs_sync = xfs_bhv_sync,
  123. .vfs_vget = xfs_bhv_vget,
  124. .vfs_get_inode = xfs_bhv_get_inode,
  125. .vfs_init_vnode = xfs_bhv_initialize_vnode,
  126. .vfs_force_shutdown = xfs_bhv_force_shutdown,
  127. .vfs_freeze = xfs_bhv_freeze,
  128. };