diff options
author | Miles Bader <miles@gnu.org> | 1996-09-14 17:44:34 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-09-14 17:44:34 +0000 |
commit | f7ab47cbed929ef8587c344c3e49de2f637696d0 (patch) | |
tree | 35eada4760500247cdab59b72802e9726513b27e | |
parent | 33879dcfec625bebed25c6aaba12c8982cd29ff7 (diff) |
(ileave_class, concat_class): Initialize the REMAP field.
(stripe_remap): New function.
(stripe_read, stripe_write): Use void * for buffers, not char *.
-rw-r--r-- | libstore/stripe.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/libstore/stripe.c b/libstore/stripe.c index 055c548f..6b694152 100644 --- a/libstore/stripe.c +++ b/libstore/stripe.c @@ -42,8 +42,8 @@ addr_adj (off_t addr, struct store *store, struct store *stripe) static error_t stripe_read (struct store *store, - off_t addr, size_t index, mach_msg_type_number_t amount, - char **buf, mach_msg_type_number_t *len) + off_t addr, size_t index, size_t amount, + void **buf, size_t *len) { struct store *stripe = store->children[index]; return store_read (stripe, addr_adj (addr, store, stripe), amount, buf, len); @@ -51,13 +51,21 @@ stripe_read (struct store *store, static error_t stripe_write (struct store *store, - off_t addr, size_t index, char *buf, mach_msg_type_number_t len, - mach_msg_type_number_t *amount) + off_t addr, size_t index, void *buf, size_t len, + size_t *amount) { struct store *stripe = store->children[index]; return store_write (stripe, addr_adj (addr, store, stripe), buf, len, amount); } + +error_t +stripe_remap (struct store *source, + const struct store_run *runs, size_t num_runs, + struct store **store) +{ + return store_remap_create (source, runs, num_runs, 0, store); +} error_t ileave_allocate_encoding (const struct store *store, struct store_enc *enc) @@ -101,6 +109,7 @@ ileave_class = { STORAGE_INTERLEAVE, "interleave", stripe_read, stripe_write, ileave_allocate_encoding, ileave_encode, ileave_decode, + 0, 0, 0, 0, stripe_remap }; _STORE_STD_CLASS (ileave_class); @@ -143,7 +152,8 @@ static struct store_class concat_class = { STORAGE_CONCAT, "concat", stripe_read, stripe_write, - concat_allocate_encoding, concat_encode, concat_decode + concat_allocate_encoding, concat_encode, concat_decode, + 0, 0, 0, 0, stripe_remap }; _STORE_STD_CLASS (concat_class); |