diff options
Diffstat (limited to 'xlators/features/sdfs')
-rw-r--r-- | xlators/features/sdfs/src/sdfs-messages.h | 14 | ||||
-rw-r--r-- | xlators/features/sdfs/src/sdfs.h | 48 |
2 files changed, 30 insertions, 32 deletions
diff --git a/xlators/features/sdfs/src/sdfs-messages.h b/xlators/features/sdfs/src/sdfs-messages.h index 6c7a9d90667..cf866c8512a 100644 --- a/xlators/features/sdfs/src/sdfs-messages.h +++ b/xlators/features/sdfs/src/sdfs-messages.h @@ -39,16 +39,14 @@ * holes. */ -#define GLFS_SDFS_BASE GLFS_MSGID_COMP_SDFS -#define GLFS_SDFS_NUM_MESSAGES 2 -#define GLFS_MSGID_END (GLFS_SDFS_BASE + \ - GLFS_SDFS_NUM_MESSAGES + 1) +#define GLFS_SDFS_BASE GLFS_MSGID_COMP_SDFS +#define GLFS_SDFS_NUM_MESSAGES 2 +#define GLFS_MSGID_END (GLFS_SDFS_BASE + GLFS_SDFS_NUM_MESSAGES + 1) /* Messaged with message IDs */ -#define glfs_msg_start_x GLFS_DFS_BASE, "Invalid: Start of messages" +#define glfs_msg_start_x GLFS_DFS_BASE, "Invalid: Start of messages" /*------------*/ - -#define SDFS_MSG_ENTRYLK_ERROR (GLFS_SDFS_BASE + 1) +#define SDFS_MSG_ENTRYLK_ERROR (GLFS_SDFS_BASE + 1) /*! * @messageid * @diagnosis @@ -56,7 +54,7 @@ * */ -#define SDFS_MSG_MKDIR_ERROR (GLFS_SDFS_BASE + 2) +#define SDFS_MSG_MKDIR_ERROR (GLFS_SDFS_BASE + 2) /*! * @messageid * @diagnosis diff --git a/xlators/features/sdfs/src/sdfs.h b/xlators/features/sdfs/src/sdfs.h index d28257eda5e..986d7c2731c 100644 --- a/xlators/features/sdfs/src/sdfs.h +++ b/xlators/features/sdfs/src/sdfs.h @@ -13,37 +13,37 @@ #include "sdfs-messages.h" #include "atomic.h" -#define SDFS_LOCK_COUNT_MAX 2 +#define SDFS_LOCK_COUNT_MAX 2 -typedef struct{ - loc_t parent_loc; - char *basename; - int locked[SDFS_LOCK_COUNT_MAX]; +typedef struct { + loc_t parent_loc; + char *basename; + int locked[SDFS_LOCK_COUNT_MAX]; } sdfs_entry_lock_t; typedef struct { - sdfs_entry_lock_t entrylk[SDFS_LOCK_COUNT_MAX]; - int lock_count; + sdfs_entry_lock_t entrylk[SDFS_LOCK_COUNT_MAX]; + int lock_count; } sdfs_lock_t; struct sdfs_local { - call_frame_t *main_frame; - loc_t loc; - loc_t parent_loc; - call_stub_t *stub; - sdfs_lock_t *lock; - int op_ret; - int op_errno; - gf_atomic_t call_cnt; + call_frame_t *main_frame; + loc_t loc; + loc_t parent_loc; + call_stub_t *stub; + sdfs_lock_t *lock; + int op_ret; + int op_errno; + gf_atomic_t call_cnt; }; typedef struct sdfs_local sdfs_local_t; -#define SDFS_STACK_DESTROY(frame) do { \ - sdfs_local_t *__local = NULL; \ - __local = frame->local; \ - frame->local = NULL; \ - gf_client_unref (frame->root->client); \ - STACK_DESTROY (frame->root); \ - sdfs_local_cleanup (__local); \ - } while (0) - +#define SDFS_STACK_DESTROY(frame) \ + do { \ + sdfs_local_t *__local = NULL; \ + __local = frame->local; \ + frame->local = NULL; \ + gf_client_unref(frame->root->client); \ + STACK_DESTROY(frame->root); \ + sdfs_local_cleanup(__local); \ + } while (0) |