diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2009-11-08 07:54:08 -0500 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2009-12-10 02:59:22 -0500 |
commit | 06886a5a3dc5a5abe0a4d257c26317bde7047be8 (patch) | |
tree | 858ac56e120c0473d764fc64a2660e6d79729c8c /fs/exofs/common.h | |
parent | 8ce9bdd1fbe962933736d7977e972972cd5d754c (diff) |
exofs: Move all operations to an io_engine
In anticipation for multi-device operations, we separate osd operations
into an abstract I/O API. Currently only one device is used but later
when adding more devices, we will drive all devices in parallel according
to a "data_map" that describes how data is arranged on multiple devices.
The file system level operates, like before, as if there is one object
(inode-number) and an i_size. The io engine will split this to the same
object-number but on multiple device.
At first we introduce Mirror (raid 1) layout. But at the final outcome
we intend to fully implement the pNFS-Objects data-map, including
raid 0,4,5,6 over mirrored devices, over multiple device-groups. And
more. See: http://tools.ietf.org/html/draft-ietf-nfsv4-pnfs-obj-12
* Define an io_state based API for accessing osd storage devices
in an abstract way.
Usage:
First a caller allocates an io state with:
exofs_get_io_state(struct exofs_sb_info *sbi,
struct exofs_io_state** ios);
Then calles one of:
exofs_sbi_create(struct exofs_io_state *ios);
exofs_sbi_remove(struct exofs_io_state *ios);
exofs_sbi_write(struct exofs_io_state *ios);
exofs_sbi_read(struct exofs_io_state *ios);
exofs_oi_truncate(struct exofs_i_info *oi, u64 new_len);
And when done
exofs_put_io_state(struct exofs_io_state *ios);
* Convert all source files to use this new API
* Convert from bio_alloc to bio_kmalloc
* In io engine we make use of the now fixed osd_req_decode_sense
There are no functional changes or on disk additions after this patch.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/common.h')
-rw-r--r-- | fs/exofs/common.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/fs/exofs/common.h b/fs/exofs/common.h index c6718e4817fe..ce1c71692599 100644 --- a/fs/exofs/common.h +++ b/fs/exofs/common.h | |||
@@ -155,22 +155,4 @@ enum { | |||
155 | (((name_len) + offsetof(struct exofs_dir_entry, name) + \ | 155 | (((name_len) + offsetof(struct exofs_dir_entry, name) + \ |
156 | EXOFS_DIR_ROUND) & ~EXOFS_DIR_ROUND) | 156 | EXOFS_DIR_ROUND) & ~EXOFS_DIR_ROUND) |
157 | 157 | ||
158 | /************************* | ||
159 | * function declarations * | ||
160 | *************************/ | ||
161 | /* osd.c */ | ||
162 | void exofs_make_credential(u8 cred_a[OSD_CAP_LEN], | ||
163 | const struct osd_obj_id *obj); | ||
164 | |||
165 | int exofs_check_ok_resid(struct osd_request *or, u64 *in_resid, u64 *out_resid); | ||
166 | static inline int exofs_check_ok(struct osd_request *or) | ||
167 | { | ||
168 | return exofs_check_ok_resid(or, NULL, NULL); | ||
169 | } | ||
170 | int exofs_sync_op(struct osd_request *or, int timeout, u8 *cred); | ||
171 | int exofs_async_op(struct osd_request *or, | ||
172 | osd_req_done_fn *async_done, void *caller_context, u8 *cred); | ||
173 | |||
174 | int extract_attr_from_req(struct osd_request *or, struct osd_attr *attr); | ||
175 | |||
176 | #endif /*ifndef __EXOFS_COM_H__*/ | 158 | #endif /*ifndef __EXOFS_COM_H__*/ |