diff options
author | Amar Tumballi <amar@gluster.com> | 2009-05-27 17:50:32 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-06-11 08:15:24 -0700 |
commit | 7aa062466f34cd1eee911d34bdb87591d410c399 (patch) | |
tree | ceeb0c187351522abf9d424690e5ac5c5fa8fcda /xlators/cluster/stripe/src/stripe.h | |
parent | a20d4929663ccbfa45d574d62240a5277b47ab39 (diff) |
strict check of extended attribute flags while opening a striped file
Added a fd_ctx structure for stripe, which takes care of understanding the
extended attribute flags, and opening the right blocks in order (to make
sure the read/write operations happen in order).
Helps to handle situations like accidentally adding subvolumes to stripe, etc
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators/cluster/stripe/src/stripe.h')
-rw-r--r-- | xlators/cluster/stripe/src/stripe.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/cluster/stripe/src/stripe.h b/xlators/cluster/stripe/src/stripe.h index fbaf8fad6af..5ffbc367094 100644 --- a/xlators/cluster/stripe/src/stripe.h +++ b/xlators/cluster/stripe/src/stripe.h @@ -29,6 +29,7 @@ #include "xlator.h" #include "logging.h" #include "defaults.h" +#include "common-utils.h" #include "compat.h" #include "compat-errno.h" #include <fnmatch.h> @@ -71,6 +72,14 @@ struct readv_replies { struct stat stbuf; /* 'stbuf' is also a part of reply */ }; +typedef struct _stripe_fd_ctx { + off_t stripe_size; + int stripe_count; + int static_array; + xlator_t **xl_array; +} stripe_fd_ctx_t; + + /** * Local structure to be passed with all the frames in case of STACK_WIND */ @@ -79,6 +88,8 @@ struct stripe_local; /* this itself is used inside the structure; */ struct stripe_local { struct stripe_local *next; call_frame_t *orig_frame; + + stripe_fd_ctx_t *fctx; /* Used by _cbk functions */ struct stat stbuf; @@ -91,6 +102,7 @@ struct stripe_local { int8_t failed; int8_t unwind; + int32_t entry_count; int32_t node_index; int32_t call_count; int32_t wind_count; /* used instead of child_cound @@ -112,6 +124,9 @@ struct stripe_local { off_t offset; off_t stripe_size; + int xattr_self_heal_needed; + int entry_self_heal_needed; + int8_t *list; struct flock lock; fd_t *fd; |