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