From 651514dd66019a9f37dfa96374e31dd497a18a59 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Tue, 24 Mar 2015 11:36:59 +0530 Subject: features/shard: Bug fixes * Return number of bytes written in writev cbk on success * Eliminate separate inode table for sharding xlator. * Fix appearance of "shard" as an option within the volfile for subvolume of type features/shard. * Fix values of min and max allowed shard block size * Return @new as opposed to NULL in shard_create_gfid_dict() on success Change-Id: I6319d377a196d1c5ceed1f65d337ff8eabcb21f8 BUG: 1205661 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/10003 Reviewed-by: Pranith Kumar Karampuri Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/shard/src/shard.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/features/shard/src/shard.h') diff --git a/xlators/features/shard/src/shard.h b/xlators/features/shard/src/shard.h index 03d881079e6..aa1f8851e15 100644 --- a/xlators/features/shard/src/shard.h +++ b/xlators/features/shard/src/shard.h @@ -21,7 +21,8 @@ #include "compat-errno.h" #define GF_SHARD_DIR ".shard" -#define SHARD_MIN_BLOCK_SIZE (128*GF_UNIT_KB) +#define SHARD_MIN_BLOCK_SIZE (4 * GF_UNIT_MB) +#define SHARD_MAX_BLOCK_SIZE (4 * GF_UNIT_TB) #define GF_XATTR_SHARD_BLOCK_SIZE "trusted.glusterfs.shard.block-size" #define SHARD_ROOT_GFID "be318638-e8a0-4c6d-977d-7a937aa84806" #define SHARD_INODE_LRU_LIMIT 4096 @@ -69,7 +70,6 @@ typedef struct shard_priv { uint64_t block_size; uuid_t dot_shard_gfid; - inode_table_t *inode_table; inode_t *dot_shard_inode; } shard_priv_t; @@ -93,7 +93,7 @@ typedef struct shard_local { uint64_t block_size; off_t offset; size_t total_size; - uuid_t shard_gfid; + size_t written_size; loc_t loc; loc_t dot_shard_loc; fd_t *fd; -- cgit