diff options
| -rw-r--r-- | fs/exofs/Kbuild | 5 | ||||
| -rw-r--r-- | fs/exofs/Kconfig | 4 | ||||
| -rw-r--r-- | fs/exofs/ore.c | 15 |
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 | ||
| 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 | obj-$(CONFIG_EXOFS_FS) += exofs.o | 19 | obj-$(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 @@ | |||
| 1 | config ORE | ||
| 2 | tristate | ||
| 3 | |||
| 1 | config EXOFS_FS | 4 | config 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 | ||
| 46 | MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>"); | ||
| 47 | MODULE_DESCRIPTION("Objects Raid Engine ore.ko"); | ||
| 48 | MODULE_LICENSE("GPL"); | ||
| 49 | |||
| 46 | static u8 *_ios_cred(struct ore_io_state *ios, unsigned index) | 50 | static 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 | } |
| 91 | EXPORT_SYMBOL(ore_get_rw_state); | ||
| 87 | 92 | ||
| 88 | int ore_get_io_state(struct ore_layout *layout, struct ore_components *comps, | 93 | int 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 | } |
| 98 | EXPORT_SYMBOL(ore_get_io_state); | ||
| 93 | 99 | ||
| 94 | void ore_put_io_state(struct ore_io_state *ios) | 100 | void 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 | } |
| 117 | EXPORT_SYMBOL(ore_put_io_state); | ||
| 111 | 118 | ||
| 112 | static void _sync_done(struct ore_io_state *ios, void *p) | 119 | static 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 | } |
| 246 | EXPORT_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) | |||
| 487 | out: | 495 | out: |
| 488 | return ret; | 496 | return ret; |
| 489 | } | 497 | } |
| 498 | EXPORT_SYMBOL(ore_create); | ||
| 490 | 499 | ||
| 491 | int ore_remove(struct ore_io_state *ios) | 500 | int ore_remove(struct ore_io_state *ios) |
| 492 | { | 501 | { |
| @@ -511,6 +520,7 @@ int ore_remove(struct ore_io_state *ios) | |||
| 511 | out: | 520 | out: |
| 512 | return ret; | 521 | return ret; |
| 513 | } | 522 | } |
| 523 | EXPORT_SYMBOL(ore_remove); | ||
| 514 | 524 | ||
| 515 | static int _write_mirror(struct ore_io_state *ios, int cur_comp) | 525 | static 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 | } |
| 630 | EXPORT_SYMBOL(ore_write); | ||
| 620 | 631 | ||
| 621 | static int _read_mirror(struct ore_io_state *ios, unsigned cur_comp) | 632 | static 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 | } |
| 699 | EXPORT_SYMBOL(ore_read); | ||
| 688 | 700 | ||
| 689 | int extract_attr_from_ios(struct ore_io_state *ios, struct osd_attr *attr) | 701 | int 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 | } |
| 721 | EXPORT_SYMBOL(extract_attr_from_ios); | ||
| 709 | 722 | ||
| 710 | static int _truncate_mirrors(struct ore_io_state *ios, unsigned cur_comp, | 723 | static 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 | } |
| 831 | EXPORT_SYMBOL(ore_truncate); | ||
| 818 | 832 | ||
| 819 | const struct osd_attr g_attr_logical_length = ATTR_DEF( | 833 | const 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); |
| 835 | EXPORT_SYMBOL(g_attr_logical_length); | ||
