From ae9e5db3604803fca16d9c48d69dc015a24887d5 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 8 Oct 1996 21:24:19 +0000 Subject: (store_ileave_class, store_concat_class): Init set_flags & clear_flags fields. (stripe_set_flags, stripe_clear_flags): Remove functions. --- libstore/stripe.c | 48 ++---------------------------------------------- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/libstore/stripe.c b/libstore/stripe.c index 9db2b8bb..1bb4880d 100644 --- a/libstore/stripe.c +++ b/libstore/stripe.c @@ -59,50 +59,6 @@ stripe_write (struct store *store, store_write (stripe, addr_adj (addr, store, stripe), buf, len, amount); } -error_t -stripe_set_flags (struct store *store, int flags) -{ - int i; - error_t err = 0; - int old_flags[store->num_children]; - - for (i = 0; i < store->num_children && !err; i++) - { - old_flags[i] = store->children[i]->flags; - err = store_set_flags (store->children[i], flags); - } - - if (err) - while (i > 0) - store_clear_flags (store->children[--i], flags & ~old_flags[i]); - else - store->flags |= flags; - - return err; -} - -error_t -stripe_clear_flags (struct store *store, int flags) -{ - int i; - error_t err = 0; - int old_flags[store->num_children]; - - for (i = 0; i < store->num_children && !err; i++) - { - old_flags[i] = store->children[i]->flags; - err = store_clear_flags (store->children[i], flags); - } - - if (err) - while (i > 0) - store_set_flags (store->children[--i], flags & ~old_flags[i]); - else - store->flags &= ~flags; - - return err; -} - error_t stripe_remap (struct store *source, const struct store_run *runs, size_t num_runs, @@ -153,7 +109,7 @@ store_ileave_class = { STORAGE_INTERLEAVE, "interleave", stripe_read, stripe_write, ileave_allocate_encoding, ileave_encode, ileave_decode, - 0, 0, 0, 0, stripe_remap + store_set_child_flags, store_clear_child_flags, 0, 0, stripe_remap }; error_t @@ -196,7 +152,7 @@ store_concat_class = { STORAGE_CONCAT, "concat", stripe_read, stripe_write, concat_allocate_encoding, concat_encode, concat_decode, - 0, 0, 0, 0, stripe_remap + store_set_child_flags, store_clear_child_flags, 0, 0, stripe_remap }; /* Return a new store in STORE that interleaves all the stores in STRIPES -- cgit v1.2.3