Commit cf283ade08c454e884394a4720f22421dd33a715

Authored by Boaz Harrosh
1 parent 8ff660ab85

ore: Make ore its own module

Export everything from ore need exporting. Change Kbuild and Kconfig
to build ore.ko as an independent module. Import ore from exofs

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>

Showing 3 changed files with 23 additions and 1 deletions Side-by-side Diff

... ... @@ -12,6 +12,9 @@
12 12 # Kbuild - Gets included from the Kernels Makefile and build system
13 13 #
14 14  
15   -exofs-y := ore.o inode.o file.o symlink.o namei.o dir.o super.o
  15 +# ore module library
  16 +obj-$(CONFIG_ORE) += ore.o
  17 +
  18 +exofs-y := inode.o file.o symlink.o namei.o dir.o super.o
16 19 obj-$(CONFIG_EXOFS_FS) += exofs.o
  1 +config ORE
  2 + tristate
  3 +
1 4 config EXOFS_FS
2 5 tristate "exofs: OSD based file system support"
3 6 depends on SCSI_OSD_ULD
  7 + select ORE
4 8 help
5 9 EXOFS is a file system that uses an OSD storage device,
6 10 as its backing storage.
... ... @@ -43,6 +43,10 @@
43 43 #define ORE_DBGMSG2(M...) do {} while (0)
44 44 /* #define ORE_DBGMSG2 ORE_DBGMSG */
45 45  
  46 +MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>");
  47 +MODULE_DESCRIPTION("Objects Raid Engine ore.ko");
  48 +MODULE_LICENSE("GPL");
  49 +
46 50 static u8 *_ios_cred(struct ore_io_state *ios, unsigned index)
47 51 {
48 52 return ios->comps->comps[index & ios->comps->single_comp].cred;
49 53  
... ... @@ -84,12 +88,14 @@
84 88 *pios = ios;
85 89 return 0;
86 90 }
  91 +EXPORT_SYMBOL(ore_get_rw_state);
87 92  
88 93 int ore_get_io_state(struct ore_layout *layout, struct ore_components *comps,
89 94 struct ore_io_state **ios)
90 95 {
91 96 return ore_get_rw_state(layout, comps, true, 0, 0, ios);
92 97 }
  98 +EXPORT_SYMBOL(ore_get_io_state);
93 99  
94 100 void ore_put_io_state(struct ore_io_state *ios)
95 101 {
... ... @@ -108,6 +114,7 @@
108 114 kfree(ios);
109 115 }
110 116 }
  117 +EXPORT_SYMBOL(ore_put_io_state);
111 118  
112 119 static void _sync_done(struct ore_io_state *ios, void *p)
113 120 {
... ... @@ -236,6 +243,7 @@
236 243  
237 244 return acumulated_lin_err;
238 245 }
  246 +EXPORT_SYMBOL(ore_check_io);
239 247  
240 248 /*
241 249 * L - logical offset into the file
... ... @@ -487,6 +495,7 @@
487 495 out:
488 496 return ret;
489 497 }
  498 +EXPORT_SYMBOL(ore_create);
490 499  
491 500 int ore_remove(struct ore_io_state *ios)
492 501 {
... ... @@ -511,6 +520,7 @@
511 520 out:
512 521 return ret;
513 522 }
  523 +EXPORT_SYMBOL(ore_remove);
514 524  
515 525 static int _write_mirror(struct ore_io_state *ios, int cur_comp)
516 526 {
... ... @@ -617,6 +627,7 @@
617 627 ret = ore_io_execute(ios);
618 628 return ret;
619 629 }
  630 +EXPORT_SYMBOL(ore_write);
620 631  
621 632 static int _read_mirror(struct ore_io_state *ios, unsigned cur_comp)
622 633 {
... ... @@ -685,6 +696,7 @@
685 696 ret = ore_io_execute(ios);
686 697 return ret;
687 698 }
  699 +EXPORT_SYMBOL(ore_read);
688 700  
689 701 int extract_attr_from_ios(struct ore_io_state *ios, struct osd_attr *attr)
690 702 {
... ... @@ -706,6 +718,7 @@
706 718  
707 719 return -EIO;
708 720 }
  721 +EXPORT_SYMBOL(extract_attr_from_ios);
709 722  
710 723 static int _truncate_mirrors(struct ore_io_state *ios, unsigned cur_comp,
711 724 struct osd_attr *attr)
712 725  
... ... @@ -815,7 +828,9 @@
815 828 ore_put_io_state(ios);
816 829 return ret;
817 830 }
  831 +EXPORT_SYMBOL(ore_truncate);
818 832  
819 833 const struct osd_attr g_attr_logical_length = ATTR_DEF(
820 834 OSD_APAGE_OBJECT_INFORMATION, OSD_ATTR_OI_LOGICAL_LENGTH, 8);
  835 +EXPORT_SYMBOL(g_attr_logical_length);