summaryrefslogtreecommitdiffstats
path: root/xlators/features/shard/src/shard.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/shard/src/shard.h')
-rw-r--r--xlators/features/shard/src/shard.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/xlators/features/shard/src/shard.h b/xlators/features/shard/src/shard.h
index f877591faee..4fe181b64d5 100644
--- a/xlators/features/shard/src/shard.h
+++ b/xlators/features/shard/src/shard.h
@@ -11,10 +11,10 @@
#ifndef __SHARD_H__
#define __SHARD_H__
-#include "xlator.h"
-#include "compat-errno.h"
+#include <glusterfs/xlator.h>
+#include <glusterfs/compat-errno.h>
#include "shard-messages.h"
-#include "syncop.h"
+#include <glusterfs/syncop.h>
#define GF_SHARD_DIR ".shard"
#define GF_SHARD_REMOVE_ME_DIR ".remove_me"
@@ -200,10 +200,10 @@ shard_unlock_entrylk(call_frame_t *frame, xlator_t *this);
} while (0)
typedef enum {
- SHARD_FIRST_LOOKUP_PENDING = 0,
- SHARD_FIRST_LOOKUP_IN_PROGRESS,
- SHARD_FIRST_LOOKUP_DONE,
-} shard_first_lookup_state_t;
+ SHARD_BG_DELETION_NONE = 0,
+ SHARD_BG_DELETION_LAUNCHING,
+ SHARD_BG_DELETION_IN_PROGRESS,
+} shard_bg_deletion_state_t;
/* rm = "remove me" */
@@ -217,7 +217,8 @@ typedef struct shard_priv {
int inode_count;
struct list_head ilist_head;
uint32_t deletion_rate;
- shard_first_lookup_state_t first_lookup;
+ shard_bg_deletion_state_t bg_del_state;
+ gf_boolean_t first_lookup_done;
uint64_t lru_limit;
} shard_priv_t;
@@ -253,9 +254,9 @@ typedef int32_t (*shard_post_update_size_fop_handler_t)(call_frame_t *frame,
typedef struct shard_local {
int op_ret;
int op_errno;
- int first_block;
- int last_block;
- int num_blocks;
+ uint64_t first_block;
+ uint64_t last_block;
+ uint64_t num_blocks;
int call_count;
int eexist_count;
int create_count;
@@ -274,7 +275,7 @@ typedef struct shard_local {
size_t req_size;
size_t readdir_size;
int64_t delta_size;
- int delta_blocks;
+ gf_atomic_t delta_blocks;
loc_t loc;
loc_t dot_shard_loc;
loc_t dot_shard_rm_loc;
@@ -317,6 +318,7 @@ typedef struct shard_local {
uint32_t deletion_rate;
gf_boolean_t cleanup_required;
uuid_t base_gfid;
+ char *name;
} shard_local_t;
typedef struct shard_inode_ctx {