nfs4filelayout.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Module for the pnfs nfs4 file layout driver.
  3. * Defines all I/O and Policy interface operations, plus code
  4. * to register itself with the pNFS client.
  5. *
  6. * Copyright (c) 2002
  7. * The Regents of the University of Michigan
  8. * All Rights Reserved
  9. *
  10. * Dean Hildebrand <dhildebz@umich.edu>
  11. *
  12. * Permission is granted to use, copy, create derivative works, and
  13. * redistribute this software and such derivative works for any purpose,
  14. * so long as the name of the University of Michigan is not used in
  15. * any advertising or publicity pertaining to the use or distribution
  16. * of this software without specific, written prior authorization. If
  17. * the above copyright notice or any other identification of the
  18. * University of Michigan is included in any copy of any portion of
  19. * this software, then the disclaimer below must also be included.
  20. *
  21. * This software is provided as is, without representation or warranty
  22. * of any kind either express or implied, including without limitation
  23. * the implied warranties of merchantability, fitness for a particular
  24. * purpose, or noninfringement. The Regents of the University of
  25. * Michigan shall not be liable for any damages, including special,
  26. * indirect, incidental, or consequential damages, with respect to any
  27. * claim arising out of or in connection with the use of the software,
  28. * even if it has been or is hereafter advised of the possibility of
  29. * such damages.
  30. */
  31. #include <linux/nfs_fs.h>
  32. #include "pnfs.h"
  33. #define NFSDBG_FACILITY NFSDBG_PNFS_LD
  34. MODULE_LICENSE("GPL");
  35. MODULE_AUTHOR("Dean Hildebrand <dhildebz@umich.edu>");
  36. MODULE_DESCRIPTION("The NFSv4 file layout driver");
  37. int
  38. filelayout_initialize_mountpoint(struct nfs_server *nfss)
  39. {
  40. return 0;
  41. }
  42. int
  43. filelayout_uninitialize_mountpoint(struct nfs_server *nfss)
  44. {
  45. dprintk("--> %s\n", __func__);
  46. return 0;
  47. }
  48. static struct pnfs_layoutdriver_type filelayout_type = {
  49. .id = LAYOUT_NFSV4_1_FILES,
  50. .name = "LAYOUT_NFSV4_1_FILES",
  51. .owner = THIS_MODULE,
  52. .initialize_mountpoint = filelayout_initialize_mountpoint,
  53. .uninitialize_mountpoint = filelayout_uninitialize_mountpoint,
  54. };
  55. static int __init nfs4filelayout_init(void)
  56. {
  57. printk(KERN_INFO "%s: NFSv4 File Layout Driver Registering...\n",
  58. __func__);
  59. return pnfs_register_layoutdriver(&filelayout_type);
  60. }
  61. static void __exit nfs4filelayout_exit(void)
  62. {
  63. printk(KERN_INFO "%s: NFSv4 File Layout Driver Unregistering...\n",
  64. __func__);
  65. pnfs_unregister_layoutdriver(&filelayout_type);
  66. }
  67. module_init(nfs4filelayout_init);
  68. module_exit(nfs4filelayout_exit);