Skip to content

Commit cf283ad

Browse files
author
Boaz Harrosh
committed
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>
1 parent 8ff660a commit cf283ad

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

fs/exofs/Kbuild

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
# Kbuild - Gets included from the Kernels Makefile and build system
1313
#
1414

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
1619
obj-$(CONFIG_EXOFS_FS) += exofs.o

fs/exofs/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
config ORE
2+
tristate
3+
14
config EXOFS_FS
25
tristate "exofs: OSD based file system support"
36
depends on SCSI_OSD_ULD
7+
select ORE
48
help
59
EXOFS is a file system that uses an OSD storage device,
610
as its backing storage.

fs/exofs/ore.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
#define ORE_DBGMSG2(M...) do {} while (0)
4444
/* #define ORE_DBGMSG2 ORE_DBGMSG */
4545

46+
MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>");
47+
MODULE_DESCRIPTION("Objects Raid Engine ore.ko");
48+
MODULE_LICENSE("GPL");
49+
4650
static u8 *_ios_cred(struct ore_io_state *ios, unsigned index)
4751
{
4852
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,
8488
*pios = ios;
8589
return 0;
8690
}
91+
EXPORT_SYMBOL(ore_get_rw_state);
8792

8893
int ore_get_io_state(struct ore_layout *layout, struct ore_components *comps,
8994
struct ore_io_state **ios)
9095
{
9196
return ore_get_rw_state(layout, comps, true, 0, 0, ios);
9297
}
98+
EXPORT_SYMBOL(ore_get_io_state);
9399

94100
void ore_put_io_state(struct ore_io_state *ios)
95101
{
@@ -108,6 +114,7 @@ void ore_put_io_state(struct ore_io_state *ios)
108114
kfree(ios);
109115
}
110116
}
117+
EXPORT_SYMBOL(ore_put_io_state);
111118

112119
static void _sync_done(struct ore_io_state *ios, void *p)
113120
{
@@ -236,6 +243,7 @@ int ore_check_io(struct ore_io_state *ios, u64 *resid)
236243

237244
return acumulated_lin_err;
238245
}
246+
EXPORT_SYMBOL(ore_check_io);
239247

240248
/*
241249
* L - logical offset into the file
@@ -487,6 +495,7 @@ int ore_create(struct ore_io_state *ios)
487495
out:
488496
return ret;
489497
}
498+
EXPORT_SYMBOL(ore_create);
490499

491500
int ore_remove(struct ore_io_state *ios)
492501
{
@@ -511,6 +520,7 @@ int ore_remove(struct ore_io_state *ios)
511520
out:
512521
return ret;
513522
}
523+
EXPORT_SYMBOL(ore_remove);
514524

515525
static int _write_mirror(struct ore_io_state *ios, int cur_comp)
516526
{
@@ -617,6 +627,7 @@ int ore_write(struct ore_io_state *ios)
617627
ret = ore_io_execute(ios);
618628
return ret;
619629
}
630+
EXPORT_SYMBOL(ore_write);
620631

621632
static int _read_mirror(struct ore_io_state *ios, unsigned cur_comp)
622633
{
@@ -685,6 +696,7 @@ int ore_read(struct ore_io_state *ios)
685696
ret = ore_io_execute(ios);
686697
return ret;
687698
}
699+
EXPORT_SYMBOL(ore_read);
688700

689701
int extract_attr_from_ios(struct ore_io_state *ios, struct osd_attr *attr)
690702
{
@@ -706,6 +718,7 @@ int extract_attr_from_ios(struct ore_io_state *ios, struct osd_attr *attr)
706718

707719
return -EIO;
708720
}
721+
EXPORT_SYMBOL(extract_attr_from_ios);
709722

710723
static int _truncate_mirrors(struct ore_io_state *ios, unsigned cur_comp,
711724
struct osd_attr *attr)
@@ -815,6 +828,8 @@ int ore_truncate(struct ore_layout *layout, struct ore_components *comps,
815828
ore_put_io_state(ios);
816829
return ret;
817830
}
831+
EXPORT_SYMBOL(ore_truncate);
818832

819833
const struct osd_attr g_attr_logical_length = ATTR_DEF(
820834
OSD_APAGE_OBJECT_INFORMATION, OSD_ATTR_OI_LOGICAL_LENGTH, 8);
835+
EXPORT_SYMBOL(g_attr_logical_length);

0 commit comments

Comments
 (0)